3005fall2010midterm_answers

3005fall2010midterm_answers - Carleton University School of...

Info iconThis preview shows pages 1–3. Sign up to view the full content.

View Full Document Right Arrow Icon
1 Carleton University School of Computer Science COMP 3005 Fall 2010 Mid-Term Test (Write on the test paper — use the back if necessary;) Name: __ ANSWERS Total 35 Marks Definitions The following definitions are to be used for answering the related questions on the test. These definitions are consistent with those in your notes. Notice that the definition for prime attribute refers to any key, not just the primary key of a table schema. Prime Attribute : If R=(A1,A2,…An) is a table, attribute Ai is prime if there exists a key K of R such that Ai is an element of K. If an attribute is not prime it is called non-prime . Trivial Dependency : A dependency X->Y is trivial if Y is a subset of X. Closure of F: if F is a set of functional dependencies, the closure of F, denoted F+, is {X->Y| F logically implies X->Y}. Partial Dependency : Suppose X is a key of table R and Y is a proper subset of X, and A is an attribute not in Y. Then Y->A is a partial dependency . 2 nd Normal Form : A table R with associated functional dependencies F is in 2 nd normal form if F+ contains no partial dependencies Y->A where A is non-prime. Transitive Dependency: Let Y be a set of attributes from table R and A be an attribute not contained in Y. The functional dependency Y->A is a transitive dependency if Y is neither a superkey of R nor a proper subset of a key of R. 3 rd Normal Form : A table, with dependencies F, is in 3 rd normal form if it is in 2 nd normal form and if F+ contains no transitive dependencies Y->A where A is non-prime. (Equivalently, a table is in 3 rd normal form if, for each non-trivial dependency Y->A, Y is a superkey or A is prime) Boyce-Codd Normal Form: A table, with dependencies F, is in BCNF if F+ contains no partial or transitive dependencies. (Equivalently, a table is in BCNF if the left side of each non-trivial dependency in F+ is a superkey.)
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
2 Question 1) [15 marks] Consider the following attributes (facts) that are to be stored in a relational database about bicycle club members that participate in bicycle races. memNo //id number of an club member (unique) bdate //birthdate of an club member name //name of member address //address of member email //email address of member race //name of race (not unique) raceDate //date of race official //race official or referee route //name of the route the race will follow laps //number of laps of the route racers must complete courseSection //name of a road that is part of the route sectionNumber //position of courseSection in the route direction //direction to travel on route section (N,S,E,W) time //time a racer took to complete a race place //placement (1 st , 2 nd , 3 rd , etc.) a racer got in a race start //name of the start location of a race finish //name of an end location of a race Constraints memNo is unique among members and members only have one name, birthdate, address, and email each. A member can race in many races, and each race has many participants. A race name is
Background image of page 2
Image of page 3
This is the end of the preview. Sign up to access the rest of the document.

This note was uploaded on 11/08/2010 for the course COMPUTER S COMP3005 taught by Professor Lounel during the Fall '10 term at Carleton.

Page1 / 9

3005fall2010midterm_answers - Carleton University School of...

This preview shows document pages 1 - 3. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online