Lab: Structured Query Language (SQL) Queries with Data Manipulation Language (DML) Assignment Instructions LAB: STRUCTURED QUERY LANGUAGE
Fantastic news! We've Found the answer you've been seeking!
Question:
Lab: Structured Query Language (SQL) Queries with Data Manipulation Language (DML) Assignment Instructions
Transcribed Image Text:
LAB: STRUCTURED QUERY LANGUAGE (SQL) QUERIES WITH DATA MANIPULATION LANGUAGE (DML) ASSIGNMENT INSTRUCTIONS CSIS 325 INSTRUCTIONS Before beginning this lab, run the following script in the SQL Server query window. If you have already created a database called hourglass, be sure to drop the database before running these queries. create database hourglass go use hourglass go CREATE TABLE Regions (RegionID int not null, RegionName varchar(40), CONSTRAINT PK_Regions PRIMARY KEY (RegionID)); CREATE TABLE Countries (Country ID int not null, CountryName varchar(50), RegionID int not null, CONSTRAINT PK_Countries PRIMARY KEY (CountryID), CONSTRAINT FK_Countries Regions FOREIGN KEY (Region ID) References Regions); CREATE TABLE Offices (OfficeID int, Office Name varchar(50), CountryID int not null, CONSTRAINT pk_Offices PRIMARY KEY (OfficeID), CONSTRAINT fk_Offices_Countries FOREIGN KEY (CountryID) REFERENCES Countries) CREATE TABLE Employees (EmpID int, FirstName varchar(30), LastName varchar(50), Email varchar(50), Salary decimal (10, 2), Office ID int not null, Supervisor ID int, CONSTRAINT pk_Employees PRIMARY KEY (EmpID), CONSTRAINT fk_Employees_Offices FOREIGN KEY (OfficeID) REFERENCES Offices, CONSTRAINT fk_Employees_Employees FOREIGN KEY (SupervisorID) REFERENCES Employees) CREATE TABLE Clients (ClientID int, LegalName varchar(100), Client Name varchar(50), CountryID int not null, Page 1 of 5 LAB: STRUCTURED QUERY LANGUAGE (SQL) QUERIES WITH DATA MANIPULATION LANGUAGE (DML) ASSIGNMENT INSTRUCTIONS CSIS 325 INSTRUCTIONS Before beginning this lab, run the following script in the SQL Server query window. If you have already created a database called hourglass, be sure to drop the database before running these queries. create database hourglass go use hourglass go CREATE TABLE Regions (RegionID int not null, RegionName varchar(40), CONSTRAINT PK_Regions PRIMARY KEY (RegionID)); CREATE TABLE Countries (Country ID int not null, CountryName varchar(50), RegionID int not null, CONSTRAINT PK_Countries PRIMARY KEY (CountryID), CONSTRAINT FK_Countries Regions FOREIGN KEY (Region ID) References Regions); CREATE TABLE Offices (OfficeID int, Office Name varchar(50), CountryID int not null, CONSTRAINT pk_Offices PRIMARY KEY (OfficeID), CONSTRAINT fk_Offices_Countries FOREIGN KEY (CountryID) REFERENCES Countries) CREATE TABLE Employees (EmpID int, FirstName varchar(30), LastName varchar(50), Email varchar(50), Salary decimal (10, 2), Office ID int not null, Supervisor ID int, CONSTRAINT pk_Employees PRIMARY KEY (EmpID), CONSTRAINT fk_Employees_Offices FOREIGN KEY (OfficeID) REFERENCES Offices, CONSTRAINT fk_Employees_Employees FOREIGN KEY (SupervisorID) REFERENCES Employees) CREATE TABLE Clients (ClientID int, LegalName varchar(100), Client Name varchar(50), CountryID int not null, Page 1 of 5
Expert Answer:
Related Book For
Accounting Information Systems
ISBN: 978-0078025495
1st edition
Authors: Vernon Richardson, Chengyee Chang
Posted Date:
Students also viewed these databases questions
-
The manager of a computer software company wishes to study the number of hours per week senior executives by type of industry spend at their desktop computers. The manager selected a sample of five...
-
For those same T-shirts we expect the standard deviation of demand for one week to be 10 T-shirts. What do you expect a standard deviation of demand to be for three weeks round to two decimal points
-
Formula Sheet Normal strains = (0 +0k) Dilatation 1-2v -170 (9+0+0) e= The steel block shown in figure B2 is subjected to a uniform pressure on all its faces. Knowing that the change in length of...
-
A car of mass m starts from rest and accelerates so that the instantaneous power delivered to the car has a constant magnitude P. The instantaneous velocity of this car is proportional to : (a) t'P 0...
-
Starting with deuterium oxide (D2O), describe how you would prepare (a) NaOD, (b) DCl, (c) ND3, (d) C2D2, (e) CD4, (f) D2SO4.
-
Describe the limitations imposed on administrative agencies by the legislative branch, the executive branch, and the legally required disclosure of information.
-
Which backup method is the fastest? a. full daily backup c. differential daily backup b. incremental daily backup d. complete daily backup
-
Prepare adjusting journal entries for the year ended (date of) December 31, 2013, for each of these separate situations. Assume that prepaid expenses are initially recorded in asset accounts. Also...
-
1 Edward Food Processing Company is a wholesale distributor of biscuits in Holborn. The Company has achieved steady growth over the past few years while Biscuit prices have been on the increase. The...
-
JOB ANALYSIS AND DESIGN Case Study: How Google Searches for the Right Job Requirements Each year, around 2.5 million people apply to work at Googleabout 60 rsums for every current employee. What...
-
The 2 0 2 0 ' balance sheet of osaka's Tennis Shop, incorporated, showed long term debt of 2 . 7 million, and the 2 0 2 1 balance sheet showedlong term debt of 2 . 9 million, the 2 0 2 1 income...
-
The inertia effects of the spring in a mass-spring and viscous-damper system can be approximated by adding a particle of what to the mass?
-
The case study that involved balancing a gas turbine that could not pass through its first critical frequency called for use of the existing proximity probe outputs input into a digital FFT using...
-
A technician is laser aligning a motor-generator set. The first set of readings calls for 0.025 inch under all four feet. The next set of readings calls for 0.050-inch shims to be added to all four...
-
Which of the following is a ratio used to assess the extent to which operating cash flows are sufficient to cover replacement of property, plant, and equipment? a. Free cash flow. c. Current ratio....
-
A reconditioned motor with new ball bearings is placed on a truck for delivery. The shaft turns freely, indicating that the bearings are properly installed. The motor gets to the customer, and after...
-
Pick one case to review: 1) Mohamed Kohail OR 2) Omar Khadr OR 3) Brenda Martin Individually, In jot notes answer the following questions - 1 page: 1. Background information on the case - what is the...
-
A survey of 70 college freshmen asked whether students planned to take biology, chemistry, or physics during their first year. Use the diagram to answer each question. How many of the surveyed...
-
Are there differences among hubs, switches, and routers?
-
If social engineering is a common reason that confidential information was revealed, what needs to be done to prevent this from occurring?
-
Name five items that you think would be included in a digital dashboard for ESPN or for Disney. Why are these critical business processes for them?
-
For Example 16-1, estimate an average \(\mathrm{H}_{\mathrm{OG}}\) in the stripping section. Then calculate \(\mathrm{n}_{\mathrm{OG}}\) and \(\mathrm{h}_{\mathrm{E}}=\mathrm{H}_{\mathrm{OG}, \text {...
-
In part E of Example 16-2, a HETP value of \(2.15 \mathrm{ft}\) is calculated for the top of the enriching section. Since the average error in individual mass transfer coefficients...
-
A distillation column at \(101.3 \mathrm{kPa}\) is separating a two-phase feed that is \(60.0 \%\) liquid, \(40.0 \mathrm{~mol} \%\) methanol, and \(60.0 \mathrm{~mol} \%\) water. Distillate product...
Study smarter with the SolutionInn App