DATA C170 Practice Test 2 with Answer Key DATA C170 Practice Test 2 with Answer Key DATA C170 Practice Test 2 with Answer Key DATA C170 Practice Test 2 with Answer Key DATA C170 Practice Test 2 with Answer Key DATA C170 Practice Test 2 with Answer Key
C170 Practice Test 2
Refer to this diagram for questions 1 though 3
1.
You are creating a database which will have the 2 tables shown above.
You need to ensure that if a category is removed from the Category table, all related product rows would
have their CategoryID set to a null value.
What should you use?
a. ON DELETE CASCADE
b. ON DELETE SET TO NULL
c. ON DELETE RESTRICT
d. ON UPDATE CASCADE
, 2.
Which rule would you use in your CREATE TABLE statement for your Category table if you would like to
have all products related to a specific category deleted if they are linked to a category that is deleted?
a. ON DELETE CASCADE
b. ON DELETE SET TO NULL
c. ON DELETE RESTRICT
d. ON UPDATE CASCADE
3.
Which rule would you use in your CREATE TABLE statement for your Category table if you needed to
prevent deletion of a category if there were associated products in the Product table?
a. ON DELETE CASCADE
b. ON DELETE SET TO NULL
c. ON DELETE RESTRICT
d. ON UPDATE CASCADE
4.
You are creating a relational database to store information about instructors and the courses that each
instructor teaches. Each course is taught by a single instructor.
You have created an Instructor table and a Course table as shown above. You need to create a
relationship between the Instructor table and the Course table. You need to keep duplicate data to a
minimum. What should you do?
a. Create a new column in the Instructor table.
b. Create new columns in the Instructors table for each course taught.
c. Create a new table that includes two columns.
d. Create a new column in the Course table.
The benefits of buying summaries with Stuvia:
Guaranteed quality through customer reviews
Stuvia customers have reviewed more than 700,000 summaries. This how you know that you are buying the best documents.
Quick and easy check-out
You can quickly pay through credit card or Stuvia-credit for the summaries. There is no membership needed.
Focus on what matters
Your fellow students write the study notes themselves, which is why the documents are always reliable and up-to-date. This ensures you quickly get to the core!
Frequently asked questions
What do I get when I buy this document?
You get a PDF, available immediately after your purchase. The purchased document is accessible anytime, anywhere and indefinitely through your profile.
Satisfaction guarantee: how does it work?
Our satisfaction guarantee ensures that you always find a study document that suits you well. You fill out a form, and our customer service team takes care of the rest.
Who am I buying these notes from?
Stuvia is a marketplace, so you are not buying this document from us, but from seller Timeless2024. Stuvia facilitates payment to the seller.
Will I be stuck with a subscription?
No, you only buy these notes for $18.99. You're not tied to anything after your purchase.