Answered step by step
Verified Expert Solution
Question
1 Approved Answer
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
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 aboveStep by Step Solution
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