数据库ke

Database Quizz II
Write down your answers in word document with file
name
highlighting your name, student number, and class.
E.g “95002”+”_”+ “03 class”+”_”+”name”,
like, “95002_03_Mike.doc”
1.Set up a relational DB to store information about department, student, class, and clubs.
Student: student number, student name, birth date, department name, class number, dormitory area
Class: class number, major name, department name, student number, year of entry
Department: department name, department number, department office, staff number
Club: club name, start year, office, number of members
Relationships:
(1) One department contains multiple majors
(2) Each major multiple classes
(3) Each class has multiple students
(4) Each department has one specified dormitory location
(5) Each student can take part in multiple clubs
(6) Each club contains multiple students
(7) We need maintain the entry year of every student into each club
Please
(1) Set up a series of relations within this background
(2) Write down the functional dependencies within each relation
(3) Judge if there are any transitive functional dependencies thereby
(4) Specify the candidate key, foreign key of these relations
2. For a given student relation
S(Sno,Sname,SD,Sdname,Course,Grade), where Sno stands for student number,
Sname stands for student name, SD means department name, Sdname stands for the dean
name.
Please
(1) Specify the functional dependencies within the relation
(2) Specify the primary key of the relation
(3) Judge what normal form the relation belongs? Why?
(4) Think if there is necessity to conduct further normalization. Explain why?
(5) Decompose the relation into a series of 3NF relations
Please judge if the following statements are true or not. Explain why.
(1) Any binary relation belongs to 3NF
(2) Any binary relation bleongs to BCNF
下面的结论哪些是正确的? 哪些是错误的? 对于错误的请给一个反例说明之。
(1)任何一个二目关系是属于3NF。
答:正确。因为关系模式中只有两个属性,所以无传递。
(2)任何一个二目关系是属于BCNF.
答:正确。按BCNF的定义,若XY,且Y不是X的子集时,每个决定因素都包含码,
对于二目关系决定因素必然包含码。