Question 6 of 31


Consider the Dept1_Parts and Dept2_Parts relations shown in the exhibit. Which of the following SQL statements would create a set difference of the two relations with the widest variety of Structured Query Language dialects?

    Correct Answer: D

    The SQL statement that would create a set difference of the two relations with the widest variety of Structured Query Language dialects is: SELECT * FROM Dept1_Parts WHERE Part_ID NOT IN (SELECT Part_ID FROM Dept2_Parts). This statement uses the NOT IN clause, which is widely supported across different SQL dialects, to filter out rows from Dept1_Parts where the Part_ID exists in Dept2_Parts.

Question 7 of 31


Consider the Information Engineering diagram shown in the exhibit. Building_ID, R_ID, Room_Count and Room_Num are integer numbers, whereas Bldg_Name,

Location and Res_Name are all represented by variable-length strings with a maximum of 20 characters.

Which SQL statement best implements the RESIDENT relation shown in this diagram?

    Correct Answer: D

    The correct SQL statement should ensure that 'R_ID' is not null and is set as the primary key, 'Room_Num' is an integer, 'Res_Name' is a variable-length string with a maximum of 20 characters, and 'Building_ID' is not null with a foreign key constraint referencing 'Building_ID' in the BUILDING table. Option D meets all these requirements.

Question 8 of 31


Which term describes one or more database operations that are executed as a single unit?

    Correct Answer: B

    A transaction describes one or more database operations that are executed as a single unit. Transactions ensure that either all operations within the unit are completed successfully or none are, maintaining the integrity of the database.

Question 9 of 31


Consider the following relations shown in the exhibit. Which of the following SQL statements would return the Customers2 relation from the Customers relation?

    Correct Answer: C

    The correct SQL statement to return the Customers2 relation from the Customers relation is: SELECT * FROM Customers WHERE Satisfaction_Rate >= 80 AND Satisfaction_Rate <= 89. The Customers2 relation includes records where the Satisfaction_Rate is between 80 and 89 inclusive (85 and 81 in this case). The options that involve satisfaction rates of exactly 80 or 90, or using the BETWEEN syntax without proper boundaries, are incorrect.

Question 10 of 31


Which of the following best describes the ON DELETE NO ACTION referential integrity constraint?

    Correct Answer:

    The ON DELETE NO ACTION referential integrity constraint ensures that if a parent key is being referenced by any child keys in a database, the record containing the parent key cannot be deleted. This constraint helps maintain data integrity by preventing the deletion of a parent record if there are still dependent child records linked to it.