• edited by
47,817 views
100 100 votes

Consider the following relational schemes for a library database:

Book (Title, Author, Catalog_no, Publisher, Year, Price)
Collection(Title, Author, Catalog_no)

with the following functional dependencies:

  1. $\text{Title Author }\rightarrow\text{ Catalog_no}$

  2. $\text{Catalog_no }\rightarrow\text{ Title Author Publisher Year}$

  3. $\text{Publisher Title Year}\rightarrow\text{ Price}$

Assume $\left\{\text{ Author, Title }\right\}$ is the key for both schemes. Which of the following statements is $\text{true}$?

  1. Both Book and Collection are in $\text{BCNF}$

  2. Both Book and Collection are in $\text{3NF}$ only

  3. Book is in $\text{2NF}$ and Collection in $\text{3NF}$

  4. Both Book and Collection are in $\text{2NF}$ only

8 Answers

Best answer
73 73 votes

Answer: C

It is given that $\{\text{Author},\text{Title}\}$ is the key for both schemas.

The given dependencies are : 

  • $\{\text{Title}, \text{Author}\}\to  \text{Catalog_no}$
  • $\text{Catalog_no} \to \{\text{Title},\text{Author}, \text{Publisher}, \text{Year}\}$
  • $\{\text{Publisher}, \text{Title}, \text{Year}\} \to \{\text{Price}\}$

First, let's take schema Collection (Title, Author, Catalog_no) :

  • $\{\text{Title}, \text{Author}\} \to \text{Catalog_no}$

$\{\text{Title}, \text{Author}\}$ is a candidate key and hence super key also and by definition of $\text{BCNF}$ this is in $\text{BCNF}$.

Now, let's see Book (Title, Author, Catalog_no, Publisher, Year , Price):

  • $\{\text{Title}, \text{Author}\}^+ \to \{\text{Title}, \text{Author}, \text{Catalog_no}, \text{Publisher}, \text{Year}, \text{Price}\}$
  • $\{\text{Catalog_no}\}^+ \to \{\text{Title}, \text{Author}, \text{Publisher}, \text{Year}, \text{Price}, \text{Catalog_no}\}$

So candidate keys are : $\text{Catalog_no}, \{\text{Title}, \text{Author}\}$ 

But in the given set of dependencies we have $\{\text{Publisher}, \text{Title}, \text{Year}\} \to \text{Price},$ which has a Transitive Dependency. So, Book is not in 3NF but is in 2NF.

• edited by
2 flags:
✌ Low quality (sapphiresky “catalog_no can determine”)
✌ Edit necessary (nobodysomebody “The collection will also have a FD with catalog_no -> {Title,Author}, although it does not matter and we still get the correct answer.”)
18 18 votes
(c)

in collection all the non prime attributes depend directly on candidate key - so BCNF and hence 3NF (actually collection has only prime attributes so it should, by default be at least in 3NF)

in book the non prime attr (price), depends indirectly on the candidate key (catalog_no) thus forming transitive dependency and hence not in 3NF. There is no partial dependency so - 2nf
6 6 votes
Ans. C

In Relation Book there is a transitive dependency and hence not in 3NF. There is no partial dependency so in 2NF

In Relation Collection all the non prime attributes depend directly on candidate key. In fact, collection has only prime attributes. So BCNF and hence 3NF.
6 6 votes
one point worth noting is that even though the key is mentioned but that simply refers to the primay key which is one of the key among candidate key ,so you have to find all  the candidate key first to determine the normal forms of the schema.

for collection schema:
fd's are:

catalog_no->title author

title author->catalog_no

also catalog_no and (title author) are candidate key for this schema.

so this is in bcnf.

for book schema:

fd's are:

Title Author → Catalog_no

Catalog_no → Title Author Publisher Year

Publisher Title Year→ Price 

the candidate key's are catalog_no and (titlle,author) 

clearly 3rd is a transitive dependency hence 2nf and not 3nf or above.
1 1 vote
(C)
Table Collection is in BCNF as there is only one functional dependency “Title Author –> Catalog_no” and {Author, Title} is key for collection. Book is not in BCNF because Catalog_no is not a key and there is a functional dependency “Catalog_no –> Title Author Publisher Year”.

Book is not in 3NF because non-prime attributes (Publisher Year) are transitively dependent on key [Title, Author].

Book is in 2NF because every non-prime attribute of the table is either dependent on the key [Title, Author], or on another non prime attribute.
Answer:
Position:
Show:

Related questions

74 74 votes
4 answers 4 answers
35.8k
35.8k views
Kathleen asked Sep 12, 2014
35,759 views
Which of the following are NOT true in a pipelined processor?Bypassing can handle all RAW hazardsRegister renaming can eliminate all register carried WAR hazardsControl h...
44 44 votes
3 answers 3 answers
21.2k
21.2k views
Arjun asked Nov 27, 2016
21,244 views
Consider the following $\text{ER}$ diagramThe minimum number of tables needed to represent $M$, $N$, $P$, $R1$, $R2$ is Which of the following is a correct attribute set ...
103 103 votes
4 answers 4 answers
30.6k
30.6k views
Kathleen asked Sep 12, 2014
30,631 views
Let R and S be two relations with the following schema$R(\underline{P,Q}, R1, R2, R3)$$S(\underline{P,Q}, S1, S2)$where $\left\{P, Q\right\}$ is the key for both schemas....
72 72 votes
6 answers 6 answers
37.6k
37.6k views
Kathleen asked Sep 12, 2014
37,630 views
A B-tree of order $4$ is built from scratch by $10$ successive insertions. What is the maximum number of node splitting operations that may take place?$3$$4$$5$$6$