Consider the universal relation \(R=\\{A, B, C, D, E, F, G, H, I, J\\}\) and the set of func- \\[ \text { tional dependencies } F=\\{\\{A, B\\} \rightarrow\\{C\\},\\{A\\} \rightarrow\\{D, E\\},\\{B\\} \rightarrow\\{F\\},\\{F\\} \rightarrow\\{G, H\\},\\{D\\} \rightarrow \\] \(\\{I, J\\} .\) What is the key for \(R ?\) Decompose \(R\) into \(2 \mathrm{NF}\) and then \(3 \mathrm{NF}\) relations.

Short Answer

Expert verified
Key for R is {A, B}. It is decomposed into 2NF as R1(A, D, E), R2(A, B, C), R3(B, F), R4(F, G, H), R5(D, I, J) and these are also in 3NF.

Step by step solution

01

Find Closure

With the given functional dependencies, find the closure of each attribute sets. For instance, the closure of {A} can be found as {A, D, E, I, J} because A directly determines D and E, and D can further determine I and J.
02

Determine Key

A key is a set of one or more columns that can identify a record uniquely in a relational database. Looking at the closure, {A, B} can determine all other attributes in the relation. So, {A, B} is the key for the relation R.
03

Decompose into 2NF

A relation is in 2NF if and only if, for every non-prime attribute that is not itself part of a candidate key, each of its dependencies are on the entire key. We can decompose R into 2NF as follows: R1(A, D, E), R2(A, B, C), R3(B, F), R4(F, G, H), R5(D, I, J). In all of these subsets, the left side of each functional dependency is a key for the relation.
04

Decompose into 3NF

A relation is in 3NF if and only if it is in 2NF and the non-key attribute is fully functionally dependent on the primary key. Our 2NF relations obtained in previous step are already in 3NF.

Unlock Step-by-Step Solutions & Ace Your Exams!

  • Full Textbook Solutions

    Get detailed explanations and key concepts

  • Unlimited Al creation

    Al flashcards, explanations, exams and more...

  • Ads-free access

    To over 500 millions flashcards

  • Money-back guarantee

    We refund you if you fail your exam.

Over 30 million students worldwide already upgrade their learning with Vaia!

One App. One Place for Learning.

All the tools & learning materials you need for study success - in one app.

Get started for free

Most popular questions from this chapter

Prove that any relation schema with two attributes is in BCNF.

Suppose that we have the following requirements for a university database that is used to keep track of students' transcripts: a. The university keeps track of each student's name (SNAME), student number (SNUM), social security number (SSN), current address (SCADDR) and phone \((\mathrm{SCPHONE}),\) permanent address \((\mathrm{SPADDR})\) and phone \((\mathrm{SPPHONE}),\) birth date \((\mathrm{BDATE})\) \(\operatorname{sex}(\operatorname{sex}), \text { class (cLass) (freshman, sophomore, } \ldots, \text { graduate }),\) major depart ment (MAJORCODE), minor department (MINORCODE) (if any), and degree program \(\left(p_{R O C}\right)(B, A,, B, S, \ldots, P H, D,) .\) Both sss \(N\) and student number have unique val. ues for each student. b. Each department is described by a name (DNAME), department code (DCOOE), office number (DOFFICE), office phone (DPHONE), and college (DCOLLECE). Both name and code have unique values for each department. c. Each course has a course name (cNAME), description (cDESC), course number (CNUM), number of semester hours (cREDIT), level (LEVEL), and offering depart. ment (coept). The course number is unique for each course. d. Each section has an instructor (INAME), semester (SEMESTER), year (YEAR), course (seccourse), and section number (secwum). The section number distinguishes different sections of the same course that are taught during the same semester/ year; its values are \(1,2,3, \ldots,\) up to the total number of sections taught during each semester. e. \(A\) grade record refers to a student \((\operatorname{ss} N),\) a particular section, and a grade \((\mathrm{CRADE})\) Design a relational database schema for this database application. First show all the functional dependencies that should hold among the attributes. Then design relation schemas for the database that are each in \(3 \mathrm{NF}\) or BCNF. Specify the key attributes of each relation. Note any unspecified requirements, and make appropriate assumptions to render the specification complete.

Define first, second, and third normal forms when only primary keys are considered. How do the general definitions of \(2 \mathrm{NF}\) and \(3 \mathrm{NF}\), which consider all keys of a relation, differ from those that consider only primary keys?

What is a minimal set of functional dependencies? Does every set of dependencies have a minimal equivalent set? Is it always unique?

, Date_sold, Salesman#, Commission\%, Discount_amt) Assume that a car may be sold by multiple salesmen, and hence \(\\{\mathr… # Consider the following relation: CAR_SALE(Car#, Date_sold, Salesman#, Commission\%, Discount_amt) Assume that a car may be sold by multiple salesmen, and hence \)\\{\mathrm{CAR} \\#,\( SALESMAN is the primary key. Additional dependencies are Date_sold \)\rightarrow\( Discount amt and Salesman# \)\rightarrow\( Commission\% Based on the given primary key, is this relation in \)1 \mathrm{NF}, 2 \mathrm{NF}\(, or \)3 \mathrm{NF}$ ? Why or why not? How would you successively normalize it completely?

See all solutions

Recommended explanations on Computer Science Textbooks

View all explanations

What do you think about this solution?

We value your feedback to improve our textbook solutions.

Study anywhere. Anytime. Across all devices.

Sign-up for free