The following is the data in the tables: 1 2 3 4 5 STUDENT Table StudentID...
Fantastic news! We've Found the answer you've been seeking!
Question:
Transcribed Image Text:
The following is the data in the tables: 1 2 3 4 5 STUDENT Table StudentID FirstName LastName Adams Buchanan Carter Ford 6 7 8 The tables for this assignment have the following columns: 10 STUDENT (StudentID, FirstName, LastName. LockerID) LOCKER (LockerD, LoackerNumber Lackertxoa) 20 30 40 50 60 70 LOCKER Table LockerID LockerNumber LockerType 80 90 LockerID. John NULL James NULL James 10 Gerald 20 Herbert Hoover 30 John Kennedy 40 Theodore Roosevelt 50 Harry Truman 60 100 101 102 103 104 105 106 107 108 Full Full Half Full Full Half Full Full Half StudentID, in the STUDENT table and Locked in the LOCKER table are surrogate primary keys. Locked in the STUDENT table is a foreign key. These tables, keys, and data are used as the basis for the SQL statements you will create in the exercises that follow. Run the SQL that you create in your personal database in the AWS SQL Server. To do this work you will need to sign on to SQL Server using Azure Data Studio and launch a query window (select File->New Query or key in the shortcut CTRL-N). For each SQL statement you write, show the results based on these data. Use data types consistent with SQL Server. 3.1 Write and run the SQL statements necessary to create the tables and their referential integrity constraints. Populate the tables with the above data. Assumptions: StudentID, is a surrogate key starting at 1 and incrementing by 1. LockerID, is a surrogate key starting at 10 and incrementing by 10. 3.2 Write and run an SQL query that performs an INNER JOIN of the STUDENT and LOCKER tables. 3.3 Write and run an SQL query that performs a LEFT OUTER JOIN of the STUDENT and LOCKER tables. 3.4 Write and run an SQL query to that performs a RIGHT OUTER JOIN of the STUDENT and LOCKER tables. 3.5 Write and run an SQL query to that performs a FULL OUTER JOIN of the STUDENT and LOCKER tables. The following is the data in the tables: 1 2 3 4 5 STUDENT Table StudentID FirstName LastName Adams Buchanan Carter Ford 6 7 8 The tables for this assignment have the following columns: 10 STUDENT (StudentID, FirstName, LastName. LockerID) LOCKER (LockerD, LoackerNumber Lackertxoa) 20 30 40 50 60 70 LOCKER Table LockerID LockerNumber LockerType 80 90 LockerID. John NULL James NULL James 10 Gerald 20 Herbert Hoover 30 John Kennedy 40 Theodore Roosevelt 50 Harry Truman 60 100 101 102 103 104 105 106 107 108 Full Full Half Full Full Half Full Full Half StudentID, in the STUDENT table and Locked in the LOCKER table are surrogate primary keys. Locked in the STUDENT table is a foreign key. These tables, keys, and data are used as the basis for the SQL statements you will create in the exercises that follow. Run the SQL that you create in your personal database in the AWS SQL Server. To do this work you will need to sign on to SQL Server using Azure Data Studio and launch a query window (select File->New Query or key in the shortcut CTRL-N). For each SQL statement you write, show the results based on these data. Use data types consistent with SQL Server. 3.1 Write and run the SQL statements necessary to create the tables and their referential integrity constraints. Populate the tables with the above data. Assumptions: StudentID, is a surrogate key starting at 1 and incrementing by 1. LockerID, is a surrogate key starting at 10 and incrementing by 10. 3.2 Write and run an SQL query that performs an INNER JOIN of the STUDENT and LOCKER tables. 3.3 Write and run an SQL query that performs a LEFT OUTER JOIN of the STUDENT and LOCKER tables. 3.4 Write and run an SQL query to that performs a RIGHT OUTER JOIN of the STUDENT and LOCKER tables. 3.5 Write and run an SQL query to that performs a FULL OUTER JOIN of the STUDENT and LOCKER tables.
Expert Answer:
Answer rating: 100% (QA)
31 create table student studentID int IDENTITY11 PRIMARY KEY firstName varchar100 lastName varchar10... View the full answer
Related Book For
Posted Date:
Students also viewed these programming questions
-
Tacoma Accessories makes two laptop cases, Plastic and Leather, that require direct materials, direct labor, and overhead. The following data refer to operations expected for next quarter: Revenue...
-
Identify two specific examples of Jim Crow Legislation in the South during the early Twentieth Century.
-
Dana, runs an illegal gambling joint and here are her expenses and income. Gross income $300,000 Expenses: Rent $30,000 Maintenance $6000 Bribes to police $20,000 Supplies. $4,000 Food and drink...
-
Four different processes for baking Oreo cookies are considered for the 2008 season. The cookies produced by each process are evaluated in terms of their overall quality. Since the cookies sometimes...
-
Determine whether the function has an inverse function. If it does, find the inverse function. 1. f (x) = x2 + 8 2. f (x) = |x2 - 3| + 6 3. f (x) = 3x x
-
The EU passed the Electronic Signature Directive in 2000. It is technology neutral. Germany already had a law that required a specific encrypted form. Was this a conflict? How did this impact...
-
1. What was the first thing that PM Solutions did when it was hired by VELCO? 2. Why was the VELCO project compared to a political campaign? 3. Why do you think VELCO was so successful in cutting the...
-
Presented below are a number of balance sheet accounts of Cunningham, Inc. (a) Investment in Preferred Stock. (b) Treasury Stock. (c) Common Stock. (d) Dividends Payable. (e) Accumulated...
-
Two artifacts in a museum display are hung from vertical walls by very light wires, as shown in the figure. A. Find the tension in the horizontal wire if w=171N and m=33.0kg (T1) B. Find the tension...
-
Peyton Smith enjoys listening to all types of music and owns countless CDs. Over the years, Peyton has gained a local reputation for knowledge of music from classical to rap and the ability to put...
-
Martha borrows $50,000 from the Mighty Bank today and the Bank requests her to repay her loan in four equal payments along with 12% interest. Each of the four payments must be paid at the end of the...
-
Review the options for targeting particular audience groups online with different digital media.
-
The 4 Ps are all a marketing manager needs to create a marketing strategy for a service business. Prepare an argument that opposes this statement, and support it with examples.
-
Describe the difference between high-contact and low-contact services, and explain how the nature of a customers experience may differ between the two.
-
How can an organisation vary its promotional mix using the Internet?
-
What are the five powerful forces transforming the service landscape, and what impact do they have on the service economy?
-
The above figure depicts a ball of mass m which is equipped on its lower side with a massless spring of uncompressed length Lo and spring constant k. The spring is initially compressed to a length L...
-
Will the prediction interval always be wider than the estimation interval for the same value of the independent variable? Briefly explain.
-
Some of us may remember a police car lurking on a side of the road, engine running, and a radar gun trained on passing traffic. And if one is caught speeding, the ensuing process of issuing an...
-
Consider the following problem Maximize f(x, y) = xsin (4x) + 1.1sin(2y), x = 0, 1, 2,,10, y = 0, 1, 2,,10 Carry out five GA iterations to estimate the optimum solution.
-
A fair die is rolled 10 times. What is the probability that the rolled die will not show an even number?
-
In a stage of impulse-reaction turbine, steam enters with a speed of \(250 \mathrm{~m} / \mathrm{s}\) at an angle of \(30^{\circ}\) in the direction of blade motion. The mean blade speed is \(150...
-
A single row impulse turbine develops \(130 \mathrm{~kW}\) at a blade speed of \(180 \mathrm{~m} / \mathrm{s}\) using \(2 \mathrm{~kg} / \mathrm{s}\) of steam. The steam leaves the nozzle at \(400...
-
A simple impulse turbine has one ring of moving blades running at \(150 \mathrm{~m} / \mathrm{s}\). The absolute velocity of steam at exit from the stage is \(80 \mathrm{~m} / \mathrm{s}\) at an...
Study smarter with the SolutionInn App