following SQL statements, some tables are created with different constraints. Give two foreign key constraints and...
Fantastic news! We've Found the answer you've been seeking!
Question:
Transcribed Image Text:
following SQL statements, some tables are created with different constraints. Give two foreign key constraints and specify in which table each is given? CREATE TABLE Customer T (Customer D CustomerName Customer Address CustomerCity CustomerState NUMBER(11,0) VARCHAR2(25) CustomerPostalCode CONSTRAINT Customer_PK PRIMARY KEY (CustomerID)); CREATE TABLE Product T (ProductID Product Description ProductFinish Product Standard Price VARCHAR2(30), VARCHAR2(20), CHAR(2), VARCHAR2(9), CREATE TABLE Order T (OrderID OrderDate Customer D CONSTRAINT Order_PK PRIMARY KEY (OrderID), CONSTRAINT Order FK FOREIGN KEY (CustomerID) REFERENCES Customer T (CustomerID)); CREATE TABLE OrderLine T (OrderID ProductID NOT NULL, NOT NULL, NUMBER(11,0) DATE DEFAULT SYSDATE, NUMBER(11,0), NUMBER(11,0) VARCHAR2(50), VARCHAR2(20), DECIMAL (6,2), NUMBER(11,0), ProductLineID CONSTRAINT Product PK PRIMARY KEY (ProductID)); NOT NULL, NOT NULL, NUMBER(11,0) NUMBER(11,0) OrderedQuantity NUMBER(11,0), CONSTRAINT OrderLine PK PRIMARY KEY (OrderID, ProductID), CONSTRAINT OrderLine_FK1 FOREIGN KEY (OrderID) REFERENCES Order_T (OrderID), CONSTRAINT OrderLine FK2 FOREIGN KEY (ProductID) REFERENCES Product_T (ProductID)); NOT NULL, NOT NULL, following SQL statements, some tables are created with different constraints. Give two foreign key constraints and specify in which table each is given? CREATE TABLE Customer T (Customer D CustomerName Customer Address CustomerCity CustomerState NUMBER(11,0) VARCHAR2(25) CustomerPostalCode CONSTRAINT Customer_PK PRIMARY KEY (CustomerID)); CREATE TABLE Product T (ProductID Product Description ProductFinish Product Standard Price VARCHAR2(30), VARCHAR2(20), CHAR(2), VARCHAR2(9), CREATE TABLE Order T (OrderID OrderDate Customer D CONSTRAINT Order_PK PRIMARY KEY (OrderID), CONSTRAINT Order FK FOREIGN KEY (CustomerID) REFERENCES Customer T (CustomerID)); CREATE TABLE OrderLine T (OrderID ProductID NOT NULL, NOT NULL, NUMBER(11,0) DATE DEFAULT SYSDATE, NUMBER(11,0), NUMBER(11,0) VARCHAR2(50), VARCHAR2(20), DECIMAL (6,2), NUMBER(11,0), ProductLineID CONSTRAINT Product PK PRIMARY KEY (ProductID)); NOT NULL, NOT NULL, NUMBER(11,0) NUMBER(11,0) OrderedQuantity NUMBER(11,0), CONSTRAINT OrderLine PK PRIMARY KEY (OrderID, ProductID), CONSTRAINT OrderLine_FK1 FOREIGN KEY (OrderID) REFERENCES Order_T (OrderID), CONSTRAINT OrderLine FK2 FOREIGN KEY (ProductID) REFERENCES Product_T (ProductID)); NOT NULL, NOT NULL,
Expert Answer:
Related Book For
Concepts of Database Management
ISBN: 978-1285427102
8th edition
Authors: Philip J. Pratt, Mary Z. Last
Posted Date:
Students also viewed these databases questions
-
Find all mixed strategy Nash Equilibria of the game in table 4 by first eliminating any strictly dominated actions and then constructing the players' best response functions. Player 2 LMR T 2,2 0,3...
-
1. What are common shares and preferred shares, and what are the key differences between the two? 2. What factors should investors consider when evaluating a company's shares for potential...
-
In the following exercises, you will use the data in the TAL Distributors database shown in Figure 2-1 in Chapter 2. (If you use a computer to complete these exercises, use a copy of the original TAL...
-
Determine whether the statement is true or false. If it is true, explain why. If it is false, explain why or give an example that disproves the statement.
-
What is the bandwidth-delay product for a 50-Mbps channel on a geostationary satellite? If the packets are all 1500 bytes (including overhead), how big should the window be in packets?
-
It is now December 31, 2012, and a jury just found in favour of a woman who sued the city for injuries sustained in a January 2011 accident. She requested recovery of lost wages, plus $100,000 for...
-
An element of a balanced orthotropic carbon/epoxy lamina is under the state of stress shown in Figure 2.20. If the properties of the woven carbon fabric/ epoxy material are \(E_{1}=70 \mathrm{GPa},...
-
A mixture of 40 mol% carbon disulfide (CS2) in carbon tetrachloride (CC4) is continuously distilled. The feed is 50% vaporized (q = 0.5). The top product from a total condenser is 95 mol% CS2, and...
-
Using BLS data, make a table comparing the changes in employment, unemployment rate, and the level of average hourly wage since the onset of the Great Recession in 2008. Discuss three specific ways...
-
Carrie D'Lake, Reed A. Green, and Doug A. Divot share a passion for golf and decide to go into the golf club manufacturing business together. On January 2, 2015, D'Lake, Green, and Divot form the...
-
The standard raw material requirement for 10 cens its of finished product 13 5 kg @ 225 pec kg. Ducing a period 1000 unite of finishe
-
Two charges, QA=-6.10 C and QB-4.15 C are placed a distance d=1.50 cm from each other. What is the electric potential energy of this system of charges? Provide your answer in joules with 2 decimal...
-
The prosecutor tried to convince the jury that the defendant was guilty because he owned a hammer that produced an impression similar to that found at the crime scene. As the defendants attorney, how...
-
A company with a beta of 2.2 pays dividends of $3.50 per share. Other companies in the market earn a return of 7%, while risk-free government bonds pay 2% annually. If the company's stock price is...
-
One of your colleagues Lily has learned that you are taking Managerial Economics at Lewis. Lily has never learned economics and is curious about Managerial Economics. Explain to Lily what Managerial...
-
Company A is financed by 29% of debt and the rest of the company is financed by common equity. The company's before-tax cost of debt is 3.5%, and its cost of equity is 6.9%. If the marginal tax rate...
-
A piston-cylinder arrangement contains an ideal gas mixture of 1 kg Nitrogen (M = 28 kg/kmol, y =1.4) and 2 kg of Argon (M 40kg/kmol, y=1.667), at 100 kPa, 300 K. The gas expands at constant pressure...
-
Is that Yelp review real or fake? The article A Framework for Fake Review Detection in Online Consumer Electronics Retailers (Information Processing and Management 2019: 12341244) tested five...
-
In Example 23 on page 58, would you get the same result if you performed the PROJECT command before the JOIN command? Why or why not?
-
What is a sub query? When is a sub query executed?
-
For the following exercises, you will answer problems and questions from management at TAL Distributors. You do not use the TAL Distributors database for any of these exercises. 1. Fragment the...
-
How can you identify a real option in a decision tree?
-
In 2022, Costco Wholesale Corporation had a market capitalization of \($238\) billion, debt of \($6.5\) billion, cash of \($12\) billion, and EBIT of about \($8\) billion. If Costco were to increase...
-
In what circumstances does the real option add value?
Study smarter with the SolutionInn App