Question

In: Computer Science

Consider the relational schemas given below and the respective sets of functional dependencies valid in the...

Consider the relational schemas given below and the respective sets of functional dependencies valid in the schemas. For each one of the relational schemas identify its highest normal form. Remember that the identification of a normal form requires analysis of the valid functional dependencies and the minimal keys. Provide justification of each answer. A solution with no comprehensive justification scores no marks.

(iv) When a staff is required to undertake an inspection of properties, the staff is allocated a company car for the day. A staff may inspect several properties on a given date, and a property is only inspected once on a given date. These information of the inspection are stored in the following relational table:
PropertyInspection(PropertyNum, IDate, ITime, Comments, StaffNum, CarRegNum)

(vi) Each student is assigned with a counselor who will act as an advisor to the students. The student is given the counselor email address so that the student can contact the counselor for advice. The information on the student and counselor are stored in the following relational table.
STUDENTCOUNSELOR (StdNum, StdName, CounselorName, CounselorEmail)

Solutions

Expert Solution

iv) IDate and Property has a one-to-many relationship between them. Which means that there will be an unique value of IDate for each PropertyNum, but there can be more than one PropertyNum for each IDate.
Property and Staff has many-to-many relationship. One staff may inspect more than one property, whereas one property may be inspeced more than one staff, but on different dates.
Thus,
PropertyNum->IDate,StaffNum, ITime,Comments, CarRegNum
StaffNum-> PropertyNum

Candidate Keys-> (StaffNum, PropertyNum)

The relation is is in BCNF as both StaffNum and PropertyNum are Superkeys.

(vi) STUDENTCOUNSELOR (StdNum, StdName, CounselorName, CounselorEmail)

The relation between Student and Counsellor is many-to-one i.e. more than student can be asigned to one counselor but one student can have one counselor only and hence one email address.

StdNum->StdName, CounselorName, CounselorEmail
CounselorName->CounselorEmail

Candidate Key-{StdNum}
Considering the table to be INF generically. There is no partial dependency since no non-primary key attribute is dependent upon a proper subset of the candidate key, hence the table is in 2NF.

CounselorEmail is dependent on a non-primary key CounselorName transitively, which indicates a transitive dependency. Hence, it is not in 3NF.
Thus, the table is in 2NF.


Related Solutions

Consider the schemas of the following relational database for a company. The company has different departments...
Consider the schemas of the following relational database for a company. The company has different departments at different cities in different states: employee(employee-id, dept-id, name, street-num, street-name, city, state, zip, salary) department(dept-id, dept-name, city, state) manager(manager-id, employee-id) NOTES: manager-id in the manager relation is a foreign key to the employee relation. employee-id in the manager relation is a foreign key to the employee relation. dept-id in the employee relation is a foreign key to the department relation. An employee belongs...
Consider the following relational schema and set of functional dependencies. S(A,B,C,D,E,F,G) D → E E →...
Consider the following relational schema and set of functional dependencies. S(A,B,C,D,E,F,G) D → E E → B C → FG BE → AC Is the decomposition of S into S1(E,G,F) and S2(A,B,C,D,G) a lossless join decomposition? Choose one of the following queries as your answer: SELECT ’lossy’; SELECT ’lossless’;
Consider a relation R (ABCDEFGH) with the following functional dependencies: ACD --> EF AG --> A...
Consider a relation R (ABCDEFGH) with the following functional dependencies: ACD --> EF AG --> A B --> CFH D --> C DF --> G F --> C F --> D Find minimal cover and identify all possible candidate keys. In order to receive full credit, please list each step taken and the rules that you applied.
Consider the following functional dependencies: Z -> XYD, X -> Y. Find the minimal cover of...
Consider the following functional dependencies: Z -> XYD, X -> Y. Find the minimal cover of the above.
1. Consider the following functional dependencies: Z -> XYD, X -> Y Find the minimal cover...
1. Consider the following functional dependencies: Z -> XYD, X -> Y Find the minimal cover of the above. 2. Consider the following two sets of functional dependencies: F = {A -> C, AC -> D, E -> AD, E -> H} and G = {A -> CD, E -> AH}. Check whether they are equivalent.
Consider the following relation R(A, B, C, D, E, G) and the set of functional dependencies...
Consider the following relation R(A, B, C, D, E, G) and the set of functional dependencies F={ A → BCD, BC → DE, B→D, D → A} Note: Show the steps for each answer. (a) Compute B+ . (b) Prove (using Armstrong’s axioms) that AG is superkey. (c) Compute Fc. (d) Give a 3NF decomposition of the given schema based on a canonical cover. (e) Give a BCNF decomposition of the given schema based on F. Use the first functional...
Normalization: Answer all 4 questions. You are given the following relation R and some functional dependencies....
Normalization: Answer all 4 questions. You are given the following relation R and some functional dependencies. R(SID, Project, Code, ListOfSupplies, Name, Initials, Abbrev) Project → ListOfSupplies SID → Name Name → Initials Project, Initials → Abbrev SID, Project → Code Code → SID Is R in 1NF? If not, normalize R into a collection of 1NF relations. Is R in 2NF? If not, normalize R (or your collection of 1NF relations) into a collection of 2NF relations. Is R in...
Given the below relational algebra expressions, use domain and tuple relational calculus to specify them: a....
Given the below relational algebra expressions, use domain and tuple relational calculus to specify them: a. σx=z ( R(a,b,c) ) b. πx,y ( R(x,y,z) ) c. R(x, y) / S(x) d. R(a,b,c) ∪  S(a,b,c) e. R(a,b,c) – S(a,b,c) f. R(d,e,f) ∩ S(d,e,f) g. R(x,y,z) × S(f,g,t)
Consider the following schema and functional dependencies: SHIPPING (ShipName, ShipType, VoyageID, Cargo, Port, ArrivalDate) Key: ShipName,...
Consider the following schema and functional dependencies: SHIPPING (ShipName, ShipType, VoyageID, Cargo, Port, ArrivalDate) Key: ShipName, ArrivalDate FD1: ShipName > ShipType FD2: VoyageID > ShipName, Cargo FD3: ShipName, ArrivalDate > VoyageId, Port 1.Please list the final set of 3NF schema including all its keys. 2.Do any of the finalized 3NF schema have determinates that are not candidate keys? If yes, explain - which schema(s)? Why?  
Consider a relation R with five attributes ABCDE. You are given the following dependencies: A à...
Consider a relation R with five attributes ABCDE. You are given the following dependencies: A à B, BC à E, and ED à A. (1) List all candidate keys for R. Please show your steps. (4 points) (2) Is R in 3NF? Please explain your answer. (3 Points) (3) Is R in BCNF? Please explain your answer. (3 Points)
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT