Question: 2. (11 marks) Consider the relations Students, Faculty, Courses, Rooms, Enrolled, Teaches, and MeetsIn defined below. .Students(srid: string, name: string, login: string. age: integer. gpa:
2. (11 marks) Consider the relations Students, Faculty, Courses, Rooms, Enrolled, Teaches, and MeetsIn defined below. .Students(srid: string, name: string, login: string. age: integer. gpa: real) . Faculty(fid: string. fname: string, sal: real) . Courses(cid: string, cname: string, credits: integer) Rooms(rno: integer, address: string, capacity: integer) . Enrolled(sid: string, cid: string, grade: string) Teaches(fid: string, cid: string) . Meetsln(cid: string, rno: integer, time: string) a) (5 marks: 4 x 0.5+ 1 x 3) Identify a primary key for each relation. For each key, briefly b) (4 marks) Given your choice of primary keys in (a), define four referential integrity con- state the assumptions or conditions under which each key would be valid. straints. State the appropriate primary to foreign key references, and describe in one sen- tence why your referential integrity constraint is necessary. ) (2 marks) Give an example of a domain constraint and a tuple constraint over any of the above relations. Again, provide a one sentence justification for the constraint. gradebook db A Chiaki-Nanami-d... jpg
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
