Question: SQL Database: Fill in the blanks. 1. (Yes/No) Can a view be used in the definition of another view? ___________ 2. Do check constraints concern
SQL Database: Fill in the blanks.
1. (Yes/No) Can a view be used in the definition of another view? ___________
2. Do check constraints concern a) the validity of each individual row in a table, or b) the relationship between rows of a table? ________________
3. (Yes/No) Suppose the primary key of a table consists of two attributes. When you insert a row into the table, can one of the primary keys have a null value?______________
4. (Yes/No) Can a foreign key constraint on a relation refer to the same relation? __________
The following questions refer to the courses schema, given in file courses-ddl.sql
You can download the schemas here: https://drive.google.com/drive/folders/0B0kVn308bqFud21IMVBfQUZqUEU?usp=sharing
5. For foreign key constraint on dept_name in table course includes on delete set null. Does this clause refer to a delete of the a) department table, b) course table, or c) some other table? ________________
6. Consider again the foreign key constraint in the course table. Can this constraint become violated by a) a delete operation, b) an insert operation, c) an update operation, or d) all of these operations? __________________
7. Suppose a row of the instructor table is deleted. List that tables that could be affected by this because of foreign key constraints: ________________________________________
8. Suppose a new student is added to the student table. List the tables that could be affected by this because of foreign key constraints: ___________________________________
9. In a courses database, how many tables could be modified as the result of a department being deleted from the department table? ___________
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
