0% found this document useful (0 votes)
26 views2 pages

HW12 Normalization Solution-1

dfv
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
26 views2 pages

HW12 Normalization Solution-1

dfv
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 2

CSC 350 Database Programming

Assignment 12 (40 points)

Relational Database Design -- Normalization.


Book Info normalization. Consider the following relation for published books:

book (book_title, author_name, book_type, list_price, author_affiliation, publisher)

Additional notes:
‐ A book is published by one publisher and belongs to one book type, but may have multiple authors.
‐ All books of the same type have the same list price.
‐ Each author may have a single affiliation.

a) List all reasonable functional dependencies that apply to attributes in this schema (F); use textual
representation or a functional dependency diagram. Hint: there are 3 FDs.
b) Identify the candidate key(s).
c) Determine if book schema is BCNF and explain your conclusion.
d) If book schema is not BCNF, then decompose to BCNF.
At the end, list all the schemas that book has been decomposed into, with their PKs underlined.

ANSWER:

a) Set F = { book_title → publisher, book_type


book_type → list_price
author_name → author_affiliation }

b) One candidate key: { book_title, author_name }

c) Is schema book in BCNF?


No.
Because FDs exist in F that are not trivial and their determinant is not a key.
FDs that are in BCNF violations:
‐ Determinants in FDs book_title → publisher, book_type and author_name → author_affiliation are part of
the PK (a.k.a. key attributes), but not a key.
‐ Determinant in FD book_type → list_price is not a key (and not even a key attribute.)

d) Decomposition of book:
‐ First decompose book to eliminate book_type → list_price, into:
book_type (book_type, list_price) is BCNF
and
book_1 (book_title, author_name, book_type, author_affiliation, publisher)
‐ book_1 is not BCNF. Decompose to eliminate author_name → author_affiliation, into
author (author_name, author_affiliation) is BCNF
and
book_2 (book_title, author_name, book_type, publisher)
‐ book_2 is not BCNF. Decompose to eliminate book_title → publisher, book_type, into
book_info (book_title, publisher, book_type) is BCNF
and
book_authorship (book_title, author_name) is BCNF

‐ Final schemas after decomposition, all BCNF, are (PK is underlined):


book_type (book_type, list_price)
author (author_name, author_affiliation)
book_info (book_title, publisher, book_type)
book_authorship (book_title, author_name)

You might also like