Question: 2020.11.19 1. (20 points) Suppose that one database includes four relations, teaches relation T(Tno, Tname. Title. ID Card), with attributes teacher number Ino), teacher namelirane)

 2020.11.19 1. (20 points) Suppose that one database includes four relations,

2020.11.19 1. (20 points) Suppose that one database includes four relations, teaches relation T(Tno, Tname. Title. ID Card), with attributes teacher number Ino), teacher namelirane) professional Tile(Title) and IdCard Number(ID Card); relation C(cro. Crame, Tno), with attributes the course number(Cro), course name(Crame) and teacher number of this course(Tno);student relation S(Sno, Firstname, Lastname, Birthday, Sex,ID Card) with Student number(Sno). name . birthday and gender and IdCard Number(ID Card); course selection relation SC(Sno, Cno, Score) with attributes the student number(Sno), course number(Cho) and Score. Accoring to the common situations in the real world: (each 4 points) (1) Please give two reasonable candidate keys, one primary key for teacher relation. Tno, ID Card (2) Write the primary key and a foreign key of SC relation, then exlain the meaning of them respectively. primary key Sno, Cno foreign key:Sno, its value references the value for attribute sno in student relation. (3) Give suitable datatype for attribute Birthday in S relation and Score in relation SC? Datetime float (4) Add constraint with values beween 0 and 100 for attribute Score in SC realtion. Check(score between 0 and 100) (5) Add constraint "Not Null" for Title in relation T. Alter table T add constraint title not null

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!