Try to determine which sets of attributes form keys of R. How would you normalize this relation?

Consider the relation R, which has attributes that hold schedules of courses and sections at a university; R = {CourseNo, SecNo, OfferingDept, CreditHours,
CourseLevel, InstructorSSN, Semester, Year, Days_Hours, RoomNo,
NoOfStudents}. Suppose that the following functional dependencies hold on R:
{CourseNo} -> {OfferingDept, CreditHours, CourseLevel}
{CourseNo, SecNo, Semester, Year} ->
{Days_Hours, RoomNo, NoOfStudents, InstructorSSN}
{RoomNo, Days_Hours, Semester, Year} -> {InstructorSSN, CourseNo, SecNo}

Let us use the following shorthand notation:
```
C = CourseNo, SN = SecNo, OD = OfferingDept, CH = CreditHours, CL = CourseLevel,
I = InstructorSSN, S = Semester, Y = Year, D = Days_Hours, RM = RoomNo,
NS = NoOfStudents
Hence, R = {C, SN, OD, CH, CL, I, S, Y, D, RM, NS}, and the following functional
dependencies hold:
{C} -> {OD, CH, CL}
{C, SN, S, Y} -> {D, RM, NS, I}
{RM, D, S, Y} -> {I, C, SN}
First, we can calculate the closures for each left hand side of a functional dependency,
since these sets of attributes are the candidates to be keys:
(1) {C}+ = {C, OD, CH, CL}
(2) Since {C, SN, S, Y} -> {D, RM, NS, I}, and {C}+ = {C, OD, CH, CL}, we get:
{C, SN, S, Y}+ = {C, SN, S, Y, D, RM, NS, I, OD, CH, CL} = R
(3) Since {RM, D, S, Y} -> {I, C, SN}, we know that {RM, D, S, Y}+ contains {RM, D, S,
Y, I, C, SN}. But {C}+ contains {OD, CH, CL} so these are also contained in {RM, D, S,
Y}+ since C is already there. Finally, since {C, SN, S, Y} are now all in {RM, D, S, Y}+
and {C, SN, S, Y}+ contains {NS} (from (2) above), we get:
{RM, D, S, Y}+ = {RM, D, S, Y, I, C, SN, OD, CH, CL, NS} = R
Hence, both K1 = {C, SN, S, Y} and K2 = {RM, D, S, Y} are (candidate) keys of R. By
applying the general definition of 2NF, we find that the functional dependency {C} ->
{OD, CH, CL} is a partial dependency for K1 (since C is included in K1). Hence, R is
normalized into R1 and R2 as follows:
R1 = {C, OD, CH, CL}
R2 = {RM, D, S, Y, I, C, SN, NS} with candidate keys K1 and K2
Since neither R1 nor R2 have transitive dependencies on either of the candidate keys, R1
and R2 are in 3NF also. They also both satisfy the definition of BCNF.
```

Computer Science & Information Technology

You might also like to view...

A technician is setting up a public server for their company. The IP address of the server is 19.19.0.1. Which of the following is the default subnet mask for the server?

A. 255.255.255.255 B. 255.255.0.0 C. 255.255.255.0 D. 255.0.0.0

Computer Science & Information Technology

Case-Based Critical Thinking Questions ? Case 12-4 ? Jonathan has created a web document and has included multiple stylesheets in it. He wants to access details of the stylesheets included in the web document using stylesheet properties. Which of the following properties will provide Jonathan with the exact number of stylesheets loaded into the web document?

A. document.styleSheets.length B. document.styleSheets.size C. document.styleSheets.title D. document.styleSheets.number

Computer Science & Information Technology