Question

In: Computer Science

Database Normalize the relations to BCNF: Member- (MemID, dateJoined, firstName, lastName, street, city, state, zip, areaCode,...

Database

Normalize the relations to BCNF:

Member- (MemID, dateJoined, firstName, lastName, street, city, state, zip, areaCode, phoneNumber, currentOfficeHeld)

Play- (title, author, numberOfActs, setChanges)

Sponsor- (sponID, name, street, city, state, zip, areaCode, phoneNumber)

Subscriber- (subID, firstName, lastName, street, city, state, zip, areaCode, phoneNumber)

Production- (prodyear, seasonStartDate, seasonEndDate, title)

Performance – (perfyear,perfdate, time, seasonStartDate)

TicketSale- (saleID, saleDate, totalAmount, perfyear, perfdate,subID)

DuesPayment- (MemID, duesYear, amount, datePaid)

Donation – (sponID, donationDate, donationType, donationValue, prodYear, seasonStartDate)

Ticket- (saleID, seatLocation, price, type)

Member - Production-(MemID, prodYear, seasonStartDate, role, task)

Solutions

Expert Solution

Normalization: In DBMS, normalization is the process of arranging and adjusting data so that data does not contain insert,update and delete anomalies.

Given relational tables are:

Member- (MemID, dateJoined, firstName, lastName, street, city, state, zip, areaCode, phoneNumber, currentOfficeHeld)
Play- (title, author, numberOfActs, setChanges)
Sponsor- (sponID, name, street, city, state, zip, areaCode, phoneNumber)
Subscriber- (subID, firstName, lastName, street, city, state, zip, areaCode, phoneNumber)
Production- (prodyear, seasonStartDate, seasonEndDate, title)
Performance – (perfyear,perfdate, time, seasonStartDate)
TicketSale- (saleID, saleDate, totalAmount, perfyear, perfdate,subID)
DuesPayment- (MemID, duesYear, amount, datePaid)
Donation – (sponID, donationDate, donationType, donationValue, prodYear, seasonStartDate)
Ticket- (saleID, seatLocation, price, type)
Member_Production-(MemID, prodYear, seasonStartDate, role, task)


First normal form:

  • For the table to be in 1NF, table should contain single atomic attributes. Which means each field does not contain multiple values.
  • As per given data, tables contains single attributes only. So that given table satisfying 1NF.

Second normal form:

  • For the table to be in 2NF, that table must be in 1NF and it it has no partial dependency. Which means no non prime attribues are dependent on subset of candidate key or composite key.
  • Composite key or Candidate key: Composite key is nothing but the combination of two or more keys in any table which can be used to identify the records uniquely.

Let us convert tables into 2NF:


Member- (MemID, dateJoined, firstName, lastName, street, city, state, zip, areaCode, phoneNumber, currentOfficeHeld)

  • Candidate key: {MemID, ZIP}
  • Non_prime attributes:{dateJoined, firstName, lastName, street, city, state, areaCode, phoneNumber, currentOfficeHeld}

Here, {dateJoined, firstName, lastName,phoneNumber, currentOfficeHeld} is only dependent of MemID not on ZIP. {MemID} is a subset of candidate key {MemID, ZIP}. As per 2NF each non_prime attribute should not dependent on subset of candidate key,they should depend on complete composite key.

Now let us devide the table as per 2NF:

Member(MemID,dateJoined, firstName, lastName,phoneNumber, currentOfficeHeld,Zip)
Address(Zip,street, city, state, areaCode)

Here Zip in Member table acts as foreign key.


Play- (title, author, numberOfActs, setChanges):

  • Candidate key: {Title}
  • Non_prime attributes: {author, numberOfActs, setChanges}

In Play table, non_prime attribute {author, numberOfActs, setChanges} dependent on {title} which is a complete candidate key.So that this table satosfies 2NF.

Sponsor- (sponID, name, street, city, state, zip, areaCode, phoneNumber):

  • Candidate key: {SponID, ZIP}
  • Non_prime attributes:{Name, treet, city, state,areaCode,phoneNumber}

Here, {Name, phoneNumber} is only dependent of SponID not on ZIP. {SponID} is a subset of candidate key {SponID, ZIP}. As per 2NF each non_prime attribute should not dependent on subset of candidate key,they should depend on complete composite key.

Sponsor(sponID,Name, phoneNumber,Zip)
Address(Zip,street, city, state, areaCode) Which is already exists. So we simply relate these tables.

Subscriber- (subID, firstName, lastName, street, city, state, zip, areaCode, phoneNumber):

  • Candidate key: {subID, ZIP}
  • Non_prime attributes:{firstName, lastName, street, city, state, areaCode, phoneNumber}

Here, {firstName, lastName, phoneNumber} is only dependent of SunID not on ZIP. {SubID} is a subset of candidate key {SubID, ZIP}. As per 2NF each non_prime attribute should not dependent on subset of candidate key,they should depend on complete composite key.

Now let us devide the table as per 2NF:

Subscriber(SubID,firstName, lastName,phoneNumber,Zip)
Address(Zip,street, city, state, areaCode)

Here Zip in Member table acts as foreign key.


Production- (prodyear, seasonStartDate, seasonEndDate, title):

  • Candidate key: {ProdYear}
  • Non_prime attributes: {seasonStartDate, seasonEndDate,title}

In production table, non_prime attribute{seasonStartDate, seasonEndDate,title} dependent on {ProdYear} which is a complete candidate key.So that this table satisfies 2NF.

Performance – (perfyear,perfdate, time, seasonStartDate):

  • Candidate key: {PerfYear}
  • Non_prime attributes: {perfdate, time, seasonStartDate}

In performance table, non_prime attribute{perfdate, time, seasonStartDate} dependent on {PerfYear} which is a complete candidate key.So that this table satisfies 2NF.

TicketSale- (saleID, saleDate, totalAmount, perfyear, perfdate,subID):

  • Candidate key: {SaleID}
  • Non_prime attributes: {totalAmount, perfyear, perfdate,subID}

In TicketSale table, non_prime attribute{totalAmount, perfyear, perfdate,subID} dependent on {SaleID} which is a complete candidate key.So that this table satisfies 2NF.


DuesPayment- (MemID, duesYear, amount, datePaid):

  • Candidate key: {duesYear}
  • Non_prime attributes: {MemID amount, datePaid}

In DuesPayment table, non_prime attribute {MemID amount, datePaid} dependent on {DuesYear} which is a complete candidate key.So that this table satisfies 2NF.


Donation – (sponID, donationDate, donationType, donationValue, prodYear, seasonStartDate):

  • Candidate key: {SponID}
  • Non_prime attributes: {donationDate, donationType, donationValue, prodYear, seasonStartDate}

In Donation table, non_prime attribute {donationDate, donationType, donationValue, prodYear, seasonStartDate} dependent on {SponID} which is a complete candidate key.So that this table satisfies 2NF.

Ticket- (saleID, seatLocation, price, type):

  • In Ticket table, non_prime attribute {seatLocation, price, type} dependent on {SaleID} which is a complete candidate key.So that this table satisfies 2NF.


Member_Production(MemID, prodYear, seasonStartDate, role, task):

  • In Member_Production table, non_prime attribute {seasonStartDate, role, task} dependent on {MemID,prodYear, } which is a complete candidate key.So that this table satisfies 2NF.
  • Here {MemID,prodYear, } works as both primary keys and foreign keys.

So after applying 2NF, relational models are as folows:

Member(MemID,dateJoined, firstName, lastName,phoneNumber, currentOfficeHeld,Zip)
Address(Zip,street, city, state, areaCode)

Play- (title, author, numberOfActs, setChanges):

Sponsor(sponID,Name, phoneNumber,Zip)

Subscriber(SubID,firstName, lastName,phoneNumber,Zip)

Production- (prodyear, seasonStartDate, seasonEndDate, title)

Performance – (perfyear,perfdate, time, seasonStartDate)

TicketSale- (saleID, saleDate, totalAmount, perfyear, perfdate,subID)

DuesPayment- (MemID, duesYear, amount, datePaid)

Donation – (sponID, donationDate, donationType, donationValue, prodYear, seasonStartDate)

Ticket- (saleID, seatLocation, price, type)

Member_Production(MemID, prodYear, seasonStartDate, role, task):

Third Normal form:

  • For the table to be in 3NF, that table must be in 2NF and there it doesn't have any transitive dependency.
  • Transitive dependency : If A-->B and B-->C then A-->C. So in 3NF tables doesn't contain such relations.
  • After applying 2NF, resulted tables does not contain transitive dependency.So that these tables are satisfying 3 NF.

BCNF:

  • Boyce and Codd Normal Form is a advanced than 3NF. BCNF nothing but 3NF which does not have multiple overlapping candidate keys.
  • So resulted tables, does not have multiple overlapping candidate keys.

Hence tables are in BCNF


Related Solutions

Using C++ Design a class named PersonData with the following member variables: lastName firstName address city...
Using C++ Design a class named PersonData with the following member variables: lastName firstName address city state zip phone and at a minimum the following member functions: A class constructor - which initializes all the member variables above a display() function - which ONLY displays all the person's data to the console Also write the appropriate accessor/mutator functions for the member variables Write a NewPersonData function. This is a stand-alone function that you can use in your main to generates...
2. Consider the following relations: Doctor(SSN, FirstName, LastName, Specialty,YearsOfExperience, PhoneNum) Patient(SSN, FirstName, LastName, Address, DOB, PrimaryDoctor_SSN)...
2. Consider the following relations: Doctor(SSN, FirstName, LastName, Specialty,YearsOfExperience, PhoneNum) Patient(SSN, FirstName, LastName, Address, DOB, PrimaryDoctor_SSN) Medicine(TradeName, UnitPrice, GenericFlag) Prescription(Prescription Id, Date, Doctor_SSN, Patient_SSN) Prescription_Medicine(Prescription Id, TradeName, NumOfUnits) Note: The Medicine relation has attributes, trade name, unit price, and whether or not the medicine is generic (True or False). a. Determine the functional dependencies that exist in each table given above.
Database Schema: Book(bookID, ISBN, title, author, publish-year, category) Member(memberID, lastname, firstname, address, phone-number, limit) CurrentLoan(memberID, bookID,...
Database Schema: Book(bookID, ISBN, title, author, publish-year, category) Member(memberID, lastname, firstname, address, phone-number, limit) CurrentLoan(memberID, bookID, loan-date, due-date) History(memberID, bookID, loan-date, return-date) Members can borrow books from the library. The number of books they can borrow is limited by the “limit” field of the Member relation (it may differ for different members). The category of a book includes fiction, non-fiction, children’s and reference. The CurrentLoan table represents the information about books that are currently checked out. When the book is...
Design a database/mysql that has 3 tables: TABLE 1 student: StudID (int), LastName (varchar), FirstName (varchar),...
Design a database/mysql that has 3 tables: TABLE 1 student: StudID (int), LastName (varchar), FirstName (varchar), MiddleName(varchar) TABLE 2 Course: StudID, CourseID TABLE 3 study course: CourseID(int), CourseTitle(varchar), Units(int), PreqCourse(varchar) ** Insert at least 5 records. ** Use the "select" command to view the content of the tables. ** POST THE SCREENSHOT
SQL ONLY- Given Tables- Employee (EmployeeID, FirstName, LastName, Address) Department (DeptNo, DepartmentName, City) DepartmentEmployee(DeptNo, EmployeeID, Position)...
SQL ONLY- Given Tables- Employee (EmployeeID, FirstName, LastName, Address) Department (DeptNo, DepartmentName, City) DepartmentEmployee(DeptNo, EmployeeID, Position) Project (ProjectNo, ProjectName, DeptNo) Project Team ( ProjectNo, EmployeeID, Role) MAKE THE QUERY FOR- 1. List the name and position of all the employee who works in the (DeptNo = ‘22C’). 2. List the total number of employees in each department for those departments with more than 5 employees. 3. List the project number, project name and the number of employees who worked on...
1. The functional dependencies for the ProAudio relation: c_id -> f_name, l_name, address, city, state, zip...
1. The functional dependencies for the ProAudio relation: c_id -> f_name, l_name, address, city, state, zip item_id -> title, price ord_no -> c_id, order_date ord_no  + item_id  -> shipped zip -> city, state Original ProAudio relation: c_id f_name I_name address city state zip ord_no item_id title price order_date shipped 01 Jane Doe 123 Elm St Ely NV 11111 1-1 12-31 More Blues 8.99 12-2-00 no 02 Fred Fish 321 Oak St Ely NV 11111 2-1 21-12 Jazz Songs 9.99 11-9-00 yes 01...
1. The functional dependencies for the ProAudio relation: c_id -> f_name, l_name, address, city, state, zip...
1. The functional dependencies for the ProAudio relation: c_id -> f_name, l_name, address, city, state, zip item_id -> title, price ord_no -> c_id, order_date ord_no  + item_id  -> shipped zip -> city, state Original ProAudio relation: c_id f_name I_name address city state zip ord_no item_id title price order_date shipped 01 Jane Doe 123 Elm St Ely NV 11111 1-1 12-31 More Blues 8.99 12-2-00 no 02 Fred Fish 321 Oak St Ely NV 11111 2-1 21-12 Jazz Songs 9.99 11-9-00 yes 01...
Given the following relations: PARTS(Pno, Pname, Qoh, Price, Olevel) CUSTOMERS(Cno, Cname, Street, Zip, Phone) EMPLOYEES(Eno, Ename,...
Given the following relations: PARTS(Pno, Pname, Qoh, Price, Olevel) CUSTOMERS(Cno, Cname, Street, Zip, Phone) EMPLOYEES(Eno, Ename, Zip, Hdate) ZIP_CODES(Zip, City, State) ORDERS(Ono, Cno, Eno, Received, Shipped) ODETAILS(Ono, Pno, Qty) Where Qoh stands for quantity on hand and Olevel stands for (re)order Level. The P, C, E and O single letter prefixes for attributes refer to the parts, customers, employees and orders relations, respectively. a. Retrieve the names of customers who have ordered parts costing less than $150.00. b. Retrieve the...
Use a JSON data structure that contains student information (StudentId, FName, LName, Address, City, State, Zip,...
Use a JSON data structure that contains student information (StudentId, FName, LName, Address, City, State, Zip, E-mail, Phone, Major, AdvisorName, AdvisorEmail). Using the Foreach statement, display all the contents of the JSON data structure into a webpage. What to turn in: 1. Screenshots: Code, JSON data, Web page showing JSON data in a table - pulled using the Foreach instruction.
Big State Computers has premises on the main street of a large regional city. The business...
Big State Computers has premises on the main street of a large regional city. The business is owned by Max and Betty Waldup, who purchased it three years ago. Betty has an extensive background in IT and has a talent for diagnosing and solving problems with computers that are brought in for repair. Max also has an IT background and oversees the sales and administration staff. They employ three people: a computer technician who assists Betty, a part-time salesperson, and...
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT