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...
-
Large particles settle rapidly in water because their mass is so large relative to the density of the water. However, small clay-sized particles settle so slowly that a particle can take 100 years to...
-
Current assets and current liabilities for Brimstone Company follow: a. Determine the working capital and current ratio for 2019 and 2018. b. Does the change in the current ratio from 2018 to 2019...
-
The following data pertain to the processing speed (GHz) of a computer and the time (minutes) it takes to boot up: Calculate \(r\). Processing Speed Boot Time 1.2 5 1.0 1 1.3 1.6 2 1.8 324 3 1.1 8...
-
The following table gives the systolic blood pressure (SBP), body size (QUET), age (AGE), and smoking history (SMK = 0 if a nonsmoker, SMK = 1 if a current or previous smoker) for a hypothetical...
-
Sudoku is a fun little logic puzzle where the objective is to fill a 9x9 grid with digits so that each column, each row, and each of the nine 3x3 sub-grids contain all digits from 1 to 9. Solving one...
-
A network administrator has received reports of intermittent connectivity issues. To diagnose the problem, the network administrator has decided to use tcpdump. Which of the following are the primary...
-
Prepare journal entries to record the following merchandising transactions of Zhang's, which uses the perpetual inventory system and the gross method. (Hint: It will help to identify each receivable...
-
Analyse different forms of international assignments an recommend how IHR managers can reduce the risk of international assignment failure. Citing examples, explain some of the key IHRM policies and...
-
Do you think that organizations can measure employee engagement through a survey? Or how would you collect this information? Additionally, once the information is collected, then what would you do...
-
Explain the steps in an effective recruitment process that would be aligned with organizational goals to meet workforce planning needs. Provide an explanation for your response.
-
Do you think that unions have outlived their usefulness? Is there still a need for unions in the workplace?
-
Write a short paragraph about "What should a hiring process be?" In HRM
-
Which of the following is LEAST likely to be a health problem for someone with cystic fibrosis O frequent infections O diabetes O obesity Onutritional deficiencies Submit Part B Request Answer The...
-
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?
-
The trial balance for Oslo Co. on 31 July 20X7 is given below. The following additional information is relevant. 1. Closing inventory is valued at 180,000. 2. An allowance for doubtful debts is to be...
-
Find the heat transfer rate \(\mathrm{q}_{\mathrm{w}}\) at \(\mathrm{x}=10 \mathrm{~cm}\) and \(100 \mathrm{~cm}\) for the flat plate given in Problem 7.31. Problem 7.31 A flat plate of \(4...
-
Obtain the lift and propulsive force coefficients of an airfoil given in Example 8.6, and compare the results with Problem 8.30. Assume the profile pitches about midchord. Example 8.6 The NACA 0012...
Study smarter with the SolutionInn App