Exercise 1
Stock(#prod, #dep, pname, quantity)
Functional dependencies
#prod, #dep ---> quantity
It means #prod and #dep can functionally determine quantity.
To find the quantity of the product in stock, we need its product id as well as depot id (or) with both product id and depot id we can find the stock available.
#prod ---> pname
It means #prod can functionally determine pname.
To find the pname of the product in stock, we need its product id (or) given product id we can find its name.
Exercise 2
Plane(#plane, type, constructor, capacity, owner)
Functional dependencies
#plane ----> type, constructor, capacity, owner
It means #plane can functionally determine type, constructor, capacity, owner. Plane number will give the plane's type, constructor, capacity and owner (or) to find a particular plane's type or constructor or capacity or owner, we need its plane id.
Exercise 3
F = {XZ --> ZYB, YA --> GC, C --> W, B --> G, XZ --> G}
attribute closure of XZA
(XZA)+ --> XZAYBGCW
Is the dependency XZA --> YB implied by F?
Yes, it is implied. XZ --> ZYB => XZ --> YB (Decomposition)
=> XZA --> YBA (Axiom of augmentation)
=> XZA --> YB (Decomposition)
Exercise 4
Is stock in 3NF?
For a relation to be in 3NF, it should be in 2NF and should not have transitive dependencies.
#prod, #dep ---> pname, quantity
#prod ---> pname
The relation in not in 2NF as there is partial dependency.
=> not in 3NF
Is plane in 3NF?
For a relation to be in 3NF, it should be in 2NF and should not have transitive dependencies.
#plane ----> type, constructor, capacity, owner
It is in 2NF and there is no transitive dependencies
=> in 3NF
Is stock in BCNF?
For a relation to be in BCNF, it should be in 3NF and should not have transitive dependencies.
#prod, #dep ---> pname, quantity
#prod ---> pname
The relation in not in 2NF
=> not in BCNF
Exercise 5
apply BCNF decomposition algorithm on Stock
make two tables T1(#prod, #dep, quantity) andT2 (#prod, pname)
T1 : #prod, #dep ---> pname, quantity candidate keys - (#prod, #dep)
T2 : #prod ---> pname candidate keys - #prod
Both the tables are in 3NF now. To be in BCNF the determinant should be a candidate key which is it in both.
=> in BCNF
Consider the schemas and instances below. #prod should be prodid #dep should be depid. Schemas -...
Write the complete proof.
Consider the relational schemas given below and the respective sets of functional dependencies valid in the schemas For each one of the relational schemas, determine the highest normal form, which is valid for a schema. Justify your answer If a schema is not in BCNF, then decompose it into a minimum number of schemas so that each one of them is in BCNF. Justify your answers. Justification must include the derivations of minimal keys from the...
Language: SQL - Normalization and Functional
Dependencies
Part 4 Normalization and Functional Dependencies Consider the following relation R(A, B, C, D)and functional dependencies F that hold over this relation. F=D → C, A B,A-C Question 4.1 (3 Points) Determine all candidate keys of R Question 4.2 (4 Points) Compute the attribute cover of X-(C, B) according to F Question 43 (5 Points) Compute the canonical cover of F.Show each step of the generation according to the algorithm shown in class....
Normalisation Consider the following relation schema about project meetings: PMG(projID, title, type, manager, jobID, start-date, end-date, contractor, contractNo) Some notes on the semantics of attributes are as follows: • Each project has a unique project ID (projID) and also has a title, type and manager. Each manager has a specialty project type. • A project often contracts jobs to contractors with start-date and end-date. Contracts are identified by contract numbers (contractNo), but contract details are out of the scope of...
1. (30 points: 15 each) INormalization: 4NFI Consider the relation SUPPLY below (right), mapped from the ternary relationship SUPPLY in the ER diagram below (left), and answer the questions below Sname Quantity ProiName SUPPLY SUPPLIER N PROJECT SUPPLY Sname ProjName PartNo Quantity Date Parte PART a) Show all functional dependencies and multivalued dependencies applied to the attributes in the SUPPLY relation. Use box notations like Figure 14.13 (note: single arrow head for functional dependency and double arrowhead for multivalued dependency)....