Consider the following relational schemas for a library database : Book…

2014

Consider the following relational schemas for a library database :

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

Collection(Title, Author, Catalog_no)

with the following functional dependencies :

I. Title, Author → Catalog_no

II. Catalog_no → Title, Author, Publisher, Year

III. Publisher, Title, Year → Price

Assume (Author, Title) is the key for both schemas.Which one of the following is true ?

  1. A.

    Both Book and Collection are in BCNF.

  2. B.

    Both Book and Collection are in 3NF.

  3. C.

    Book is in 2NF and Collection in 3NF.

  4. D.

    Both Book and Collection are in 2NF.

Attempted by 92 students.

Show answer & explanation

Correct answer: C

Functional dependencies:

  • Title, Author → Catalog_no

  • Catalog_no → Title, Author, Publisher, Year

  • Publisher, Title, Year → Price

Candidate keys:

From the given FDs, (Author, Title) determines Catalog_no and, via Catalog_no, determines Publisher, Year and Price, so (Author, Title) is a key. Also Catalog_no determines Title, Author, Publisher, Year and therefore Price by transitivity, so Catalog_no is also a key. Prime attributes: Title, Author, Catalog_no.

Book schema (Title, Author, Catalog_no, Publisher, Year, Price):

  • 2NF: The composite key (Author, Title) exists but no proper subset (neither Author nor Title alone) functionally determines a non-prime attribute, so Book satisfies 2NF.

  • 3NF: The dependency Publisher, Title, Year → Price has a left side that is not a superkey and the right side Price is a non-prime attribute. Therefore this FD violates 3NF, so Book is not in 3NF.

  • BCNF: Because the same dependency (Publisher, Title, Year → Price) has a non-superkey left side, Book also fails BCNF.

Collection schema (Title, Author, Catalog_no):

  • Relevant FDs restricted to these attributes are Title, Author → Catalog_no and Catalog_no → Title, Author.

  • Both dependencies have left sides that are keys in this schema, so Collection satisfies BCNF. Since BCNF implies 3NF, Collection is also in 3NF.

Conclusion:

The correct statement is that the Book schema is in 2NF but not in 3NF or BCNF, while the Collection schema is in 3NF (in fact in BCNF). Therefore the statement that Book is in 2NF and Collection in 3NF is correct.

A video solution is available for this question — log in and enroll to watch it.

Explore the full course: Mppsc Assistant Professor