edited by
2,454 views
3 votes
3 votes

Consider a database with the following relation:
Shipping (ShipName, ShipType, TripId, Cargo, Port. Date)

With the following functional dependencies:

sorry for not typing ,i will type it later 

my doubt is-isn’t partial dependency $ShipName\rightarrow ShipType$ present in new database??

edited by

3 Answers

Best answer
7 votes
7 votes

$R_1,(\text{ShipName}\rightarrow\text{ShipType})$

$R_2, (\text{TripId}\rightarrow\text{ShipName, Cargo})$

$R_3,  (\text{ShipName, Date}\rightarrow\text{TripId, Port})$ and $(\text{TripId}\rightarrow \text{ShipName})$

$R_3$ is not BCNF because in $(\text{TripId}\rightarrow \text{ShipName})$, $\text{TripId}$ is not Superkey because candidate keys are $\{\text{ShipName Date,  TripId Date}\}$

but in $R_3$ there is no partial or transitive dependency hence it satisfies $\text{3NF}$

edited by
1 votes
1 votes

See simle approach would be :

consider all names given Shipping (ShipName, ShipType, TripId, Cargo, Port. Date) as

R(A,B,C,D,E, F) with dependencies given as :-

A->B

C->AD

AF->CE

with candidate keys{AF AND CF)

Now coming to examine new databases below are steps:-

NOTE: again assume all names as variables like A,B,C,D,E and F

1) R1(A,B)

find candidate keys for this relation using only that dependencies that R1 uses(dependency having A and B ie.A->B  ) it would be A.

using the dependencies given we will use only those dependencies that come under our R1 ie

A->B because our relation R1 Contains R1(A,B)

check all forms one by one for this dependency – it will satisfy BCNF as A is super key also . R1 is in BCNF

2) R2(C,A,D)

find candidate keys for this relation using only that dependencies that R2 uses(dependency having C,A and D ie. C->AD ). it would be C.

using the dependencies given we will use only those dependencies that come under our R2 ie

C->AD  as we are only 3 variables in our R2 that uses this dependency

check all forms one by one for this dependency – it will satisfy BCNF as C is super key also . R2 is in BCNF

3)R3(A,F,C,E)

find candidate keys for this relation using only that dependencies that R3 uses(dependency having F,A,C and E ie. AF->CE).. it would be AF

check all forms one by one for this dependency – it will satisfy BCNF as AF is super key also . R3 is in BCNF

 

 

 

 

0 votes
0 votes
Is it BCNF???

Related questions

0 votes
0 votes
1 answer
1
1 votes
1 votes
1 answer
2