• edited by
4,385 views
3 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??

3 Answers

Best answer
7 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 1 vote

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 0 votes
Is it BCNF???
Position:
Show:

Related questions

0 0 votes
1 1 answer
1.1k
1.1k views
Naveen Muralidhar asked Jan 20, 2019
1,083 views
A3 also deriving {A1,A2,A3} from FD’s...why it is still neglecting BCNF? Is solution wrong or I am misunderstanding?
1 1 vote
2 2 answers
1.1k
1.1k views
Pankaj Joshi asked Jan 29, 2017
1,089 views
Which of the following statement false is relation R is in 3NF but not BCNF?Relation R must consist atleast two over-lapped candidate keys.Relation R must consist proper ...
1 1 vote
1 1 answer
1.3k
1.3k views
6 6 votes
3 3 answers
4.2k
4.2k views