in Databases edited by
27,689 views
61 votes
61 votes

Consider the following relational schema:

$\text{Suppliers}(\underline{\text{sid:integer}},\text{ sname:string, city:string, street:string})$ 

$\text{Parts}(\underline{\text{pid:integer}}, \text{ pname:string, color:string})$ 

$\text{Catalog}(\underline {\text{sid:integer, pid:integer}}, \text{cost:real})$

Assume that, in the suppliers relation above, each supplier and each street within a city has unique name, and (sname, city) forms a candidate key. No other functional dependencies are implied other than those implied by primary and candidate keys. Which one of the following is $\text{TRUE}$ about the above schema?

  1. The schema is in $\text{BCNF}$
  2. The schema is in $\text{3NF}$ but not in $\text{BCNF}$
  3. The schema is in $\text{2NF}$ but not in $\text{3NF}$
  4. The schema is not in $\text{2NF}$
in Databases edited by
27.7k views

4 Comments

Don’t we need to check for those relations separately?
0
0

oh yes you are right. The relations are already in BCNF decomposed form. I assumed it to be FDs while making that comment. Thanks

1
1

how can (sname, city) forms a candidate key? we have a primary key as sid , so we have minimal super key sid as one and only candidate key.
@Arjun sir is i am wrong?

0
0

6 Answers

79 votes
79 votes
Best answer

The non-trivial $\text{FD}$s are 

  1. (sname, city) $\to$ street
  2. sid $\to$ street
  3. (sname, city) $\to$ sid
  4. sid $\to$ sname
  5. sid $\to$ city

For all these, $\text{LHS}$ is a super key and hence $\text{BCNF}$ condition is satisfied. But we have some more dependencies here:

"each supplier and each street within a city has unique name"

This basically means each supplier in a city has unique name making (sname, city) determine sid and hence making it a candidate key. Each street within a city also has a unique name and so (street, city) is also a candidate key. Even then with all $3$ candidate keys (for Suppliers schema), for any $\text{FD}$, the $\text{LHS}$ is a super key here, and hence the relation schema (for other two relations it is straight forward) is in $\text{BCNF}$.

http://db.grussell.org/section009.html

Correct Answer: $A$

edited by
by

4 Comments

@ sir why are we not considering these dependencies

$pid \rightarrow pname, color$

$sid, pname\rightarrow cost$

These clearly seem to be lossless and dependency preserving decomposition of the whole schema. And the question is asking

“which one of the following is true about the above schema

And then because of $pid \rightarrow pname, color$ FD, it is not even in 2NF.

1
1

@Arjun

Sir,

each supplier and each street within a city has unique name

For this you have mentioned below

 

This means when supplier name cannot repeat within a city and same for street.

CITY -> Street,Supplier is wrong as it basically says all street and supplier must be same for a city.

 My question is this : Does that mean that for each CITY Street or Supplier can have multiple values.

For Example –

CITY = “ Delhi”  Street = “MG Road” Supplier = “ABC”

CITY = “ Delhi”  Street = “Nehru Road” Supplier = “EFG”

CITY = “ Mumbai” Street = “MG Road” Supplier = “EFG”

CITY = “ Mumbai” Street = “Nehru Road” Supplier = “ABC”

Is above valid ? If yes , doesn’t it means that they form Multi-valued Dependency?

Please correct if I am wrong.

1
1

@Arjun Sir @srestha ma’am 

Is the table represent the above question statement…..

    sid    sname      city  street
     1     Amit    Pune    A
     2     Ravi    Pune    B
     3     Ravi  Kolkata    C
     4     Amit  Kolkata    B
     5   Soham    Pune    E

here, sid→ sname,sid→ city,sid→ street;

(sname,city)→ sid;  (sname,city)→ street;

Also for the statement in the suppliers relation above, each supplier and each street within a city has unique name  means (Look at above table)

(street,city)→ sname;  (street,city)→ sid;

Thank you for reading…..

  

0
0
12 votes
12 votes
"No other functional dependencies are implied other than those implied by primary and candidate keys"

This line is sufficient to indicate that we have superkeys on LHS always which is the necessary condition to be the relation in BCNF.

So, option A is correct.

2 Comments

Yes true. I don’t get it why people are bothered about other things :(
1
1

@Deepak Poonia sir, can we declare directly ??

1
1
4 votes
4 votes

From the given data the FDs will be ,

(Sid, Street) $\rightarrow$  Sname

As Sid is a primary key, then
(Sid, Street) will be super key.
Hence, it is in BCNF.

3 votes
3 votes
i  think ans is d

because street and sname functionally depend on city (acc to question)

4 Comments

D can not be possible since that combination is given as candidate key .so it satisfy bcnf
0
0

"each supplier and each street within a city has unique name"

@indrajeet
I guess here you think that,  City->name , City->street
It is wrong. 

It means  
name,City -> sid
street,City -> sid
So BCNF.

 

2
2

No other functional dependencies are implied other than those implied by primary and candidate keys.

 

dont this directly says that it is in BCNF.

6
6
@manav ,exactly i also think the same.
0
0
Answer:

Related questions