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

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...
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.
Listed below is the relational database schema for an online store(SQL/Java): MEMBER(last_name, first_name, email, password, user,street,...
Listed below is the relational database schema for an online store(SQL/Java): MEMBER(last_name, first_name, email, password, user,street, city, state, zip, card_type, card_no, expiration, name_on_card) book_SALE(listing_no, seller, isbn, condition, price) ORDERS(order_no, buyer, order_date, tot) ITEM(order_no, listing_no) BOOK(isbn, title, author, edition, publisher, keywords) The bold attribute(s) in a relation is the primary key of that relation. The italized attributes in some relations denote foreign keys. The seller attribute in the book_SALE relation is a foreign key to the user attribute in the MEMBER...
Listed below is the relational database schema for an online store(SQL/Java): MEMBER(last_name, first_name, email, password, user,street,...
Listed below is the relational database schema for an online store(SQL/Java): MEMBER(last_name, first_name, email, password, user,street, city, state, zip, card_type, card_no, expiration, name_on_card) book_SALE(listing_no, seller, isbn, condition, price) ORDERS(order_no, buyer, order_date, tot) ITEMS(order_no, listing_no) BOOK(isbn, title, author, edition, publisher, keywords) The bold attribute(s) in a relation is the primary key of that relation. The italized attributes in some relations denote foreign keys. Create/Define the table.
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...
Consider the following relational database schema:             employee(employee-name, employee-id, street, e-city)             works(employee-
Consider the following relational database schema:             employee(employee-name, employee-id, street, e-city)             works(employee-id, company-id, salary)             company(company-name, company-id, c-city)             manages(employee-id, manager-id) Specify the following queries on this database schema using the relational operators we discussed in class. Write your answers on a separate sheet of paper in the order that they are specified below. Retrieve the name and address of employees who work for First Bank Corporation. Retrieve the name, street address, and city of residence of all employees...
C++ programming question class Address { public: Address(const std::string& street, const std::string& city, const std::string& state,...
C++ programming question class Address { public: Address(const std::string& street, const std::string& city, const std::string& state, const std::string& zip) : StreetNumber(street), CityName(city), StateName(state), ZipCode(zip) {} std::string GetStreetNumber() const { return StreetNumber; } void SetStreetNumber(const std::string& street) { StreetNumber = street; } std::string GetCity() const { return CityName; } void SetCity(const std::string& city) { CityName = city; } std::string GetState() const { return StateName; } void SetState(const std::string& state) { StateName = state; } std::string GetZipCode() const { return ZipCode; }...
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT