• edited by
44,407 views
87 87 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}$

10 Answers

0 0 votes
supp,city ->sname
street,city ->sname

since (sname,city) forms ck therefore above both lhs are sk
all fds satisfies condition of BCNF
0 0 votes

We have three relations:

  1. Suppliers(sid:integer, sname:string, city:string, street:string)

  2. Parts(pid:integer, pname:string, color:string)

  3. Catalog(sid:integer, pid:integer, cost:real)

this GATE question doesn’t define FDs directly, which can be confusing.

Assumptions Given (Read this VERY carefully):

  1. In the Suppliers relation:

    • Each supplier and each street within a city has a unique name.

    • (sname, city) forms a candidate key.

  2. No other functional dependencies are implied except those from primary and candidate keys.

FD1: (sname, city) → sid, street

This means: If you know the supplier name and city, you can determine the supplier ID and street.

Candidate Keys:

  • (sname, city)

  • maybe sid, if it's declared as a primary key

Is this in BCNF?

  • A relation is in BCNF if every non-trivial functional dependency X → Y, X is a superkey.

Check:

  • (sname, city) → sid, street: X = candidate key 

  • sid → sname, city, street: If sid is also a candidate key, Suppliers is in BCNF.

Parts(pid, pname, color)

Assume pid is the primary key, and no other dependencies exist.

Then:

  • pid → pname, color

This means the only functional dependency is from the key.

Parts is in BCNF.

Catalog(sid, pid, cost)

Assume:

  • Composite key: (sid, pid) is the primary key.

Functional dependency:

  • (sid, pid) → cost 

  • No other dependencies are given.

Catalog is in BCNF.

You should not assume any of the following unless the question says so:

  • city, street → sname 

  • sname → sid 

  • street → sid 

Unless there’s an explicit hint or rule, these are not valid FDs.

0 0 votes

Suppliers Relation

  • Primary key: sid

  • Candidate key: (sname, city)

The implied functional dependencies are:

  • sid → sname, city, street

  • (sname, city) → sid, street

In all cases, the determinant is a superkey. Hence, the Suppliers relation is in BCNF.


Parts Relation

  • Primary key: pid

The functional dependency is:

  • pid → pname, color

Since the determinant is a superkey, the Parts relation is in BCNF.


Catalog Relation

  • Primary key: (sid, pid)

The functional dependency is:

  • (sid, pid) → cost

Since the determinant is a superkey, the Catalog relation is in BCNF.

Answer:
Position:
Show:

Related questions

110 110 votes
13 answers 13 answers
58.1k
58.1k views
Kathleen asked Sep 22, 2014
58,142 views
Consider the following relational schema:$\text{Suppliers}(\underline{\text{sid:integer}},\text{ sname:string, city:string, street:string})$ $\text{Parts}(\underline{\tex...
101 101 votes
14 answers 14 answers
55.3k
55.3k views
Kathleen asked Sep 22, 2014
55,347 views
The following key values are inserted into a $B^+$ - tree in which order of the internal nodes is $3$, and that of the leaf nodes is $2$, in the sequence given below. The...
45 45 votes
3 answers 3 answers
11.5k
11.5k views
Kathleen asked Sep 22, 2014
11,498 views
Consider two transactions $T_1$ and $T_2$, and four schedules $S_1, S_2, S_3, S_4$, of $T_1$ and $T_2$ as given below:$T_1: R_1[x]W_1[x]W_1[y]$$T_2: R_2[x]R_2[y]W_2[y...
50 50 votes
7 answers 7 answers
18.9k
18.9k views
go_editor asked Apr 23, 2016
18,853 views
A hard disk has $63$ sectors per track, $10$ platters each with $2$ recording surfaces and $1000$ cylinders. The address of a sector is given as a triple $\langle c, h, s...