Question: Simple SQL Queries - Refer to the question below CS2102 Exercise Il. (24 marks) Consider the following self-describing schema. It is the schema of the

Simple SQL Queries - Refer to the question below

Simple SQL Queries - Refer to the question below CS2102 Exercise Il.

CS2102 Exercise Il. (24 marks) Consider the following self-describing schema. It is the schema of the database of an event organizer company. Prime attributes are underlined event (eid, ename, ecity) registration (cid, eid) customer (cid, cname, ccity) The table event stores the identifier, eid, the name, ename, of events organized by the company and the city ecity, where the event takes place. The primary key is feid he table customer stores the identifier, cid, the name, cname, of customers and the city where the customer lives, ccity. The primary key is (cid) The table registration stores the registrations of customers to event. The composite primary key is (cid, eid). Two referential integrity constraints on the table registration guarantee that the customer exists and that the event exists, respectively There can be events without registration and customers who have not registered to any event. In addition to the primary and foreign key constraints, no attribute is null. No constraint other than the above is enforced. For instance, there can be several events with the same name Consider that every foreign key constraint is annotated with ON UPDATE CASCADE and ON DELETE CASCADE Question 7. (2 marks) Which of the following operations never violates a constraint on the registration table? a) Insert a record into the registration table b) Delete a record from the registration table c) Update a record of the registration table d) All of the above e) None of the above Question 8. (2 marks) Which of the following operations may violate a FOREIGN KEY constraint on the registration table? a) Delete a record from the event table b) Delete a record from the customer table c) Update a record of the customer table d) All of the above e) None of the above

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!