Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Complete the table below by matching each definition with the appropriate SQL constraint. Ensures that each value inserted in a column (or columns) is
Complete the table below by matching each definition with the appropriate SQL constraint. Ensures that each value inserted in a column (or columns) is A. FOREIGN KEY UNIQUE and NOT NULL B. DEFAULT Ensures that data in the column of a table matches the values in another column of the same, or another, table C. NOT NULL * Specifies a value given to an attribute when a tuple is inserted without specifying the value for the particular attribute D. UNIQUE E. CHECK A Ensures that each row (tuple) must have a unique value for a particular column (attribute) F. PRIMARY KEY Ensures that the value in a column meets a specific condition QUESTION 5 0.5 points Save Answer Below is a partially complete CREATE TABLE statement for the Customers table in the Clothing Store database. Fill in the two blanks below to make ID an auto incrementing attribute and ensure the lastName attribute of all tuples is not null. Your answer will be marked incorrect if there is a spelling mistake, missing spaces, or unnecessary spaces. CREATE TABLE Customers ( ID int lastName varchar(255) firstName varchar(255), streetAddress varchar(255), city varchar(255), DOB DATE, favoriteStore int(3), PRIMARY KEY (ID), FOREIGN KEY (favoriteStore) REFERENCES Stores (ID) ); QUESTION 6 0.5 points Save Answer Below is a partially complete CREATE TABLE statement for the Orders table in the Clothing Store database. Consider it in conjunction with the Customers table in the same database you constructed in the previous question. Fill in the blank line below to add a foreign key constraint on the customerID attribute which links it to the appropriate attribute in the Customers table. Do not include ON UPDATE and ON DELETE clauses. Your answer will be marked incorrect if there is a spelling mistake, missing spaces, or unnecessary spaces. CREATE TABLE Orders ( orderlD int, productID int, customerID int, storelD int, PRIMARY KEY (orderlD, productID), FOREIGN KEY (productID) REFERENCES Products (productID), FOREIGN KEY (storelD) REFERENCES Stores (ID), [x] );
Step by Step Solution
★★★★★
3.43 Rating (166 Votes )
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started