0% found this document useful (0 votes)
41 views5 pages

Zata Leo Assignment3lec

The document describes two cases of relational database anomalies and proposes solutions. For case 1, the BOOKTRANS table has anomalies related to student, book, and publisher data. The solution normalizes the data into STUDTRANS, BOOKCOPYREC, and BOOKINFO tables with appropriate attributes. For case 2, the PERSONNEL table has anomalies related to employee, attendance, and salary data. The solution normalizes the data into EMP_INFO, ATTEND_INFO, and SALARY_INFO tables with proper attributes. Entity relationship diagrams are provided for each case in the final solution.
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)
41 views5 pages

Zata Leo Assignment3lec

The document describes two cases of relational database anomalies and proposes solutions. For case 1, the BOOKTRANS table has anomalies related to student, book, and publisher data. The solution normalizes the data into STUDTRANS, BOOKCOPYREC, and BOOKINFO tables with appropriate attributes. For case 2, the PERSONNEL table has anomalies related to employee, attendance, and salary data. The solution normalizes the data into EMP_INFO, ATTEND_INFO, and SALARY_INFO tables with proper attributes. Entity relationship diagrams are provided for each case in the final solution.
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/ 5

Leo Zata

2BSIT-5

ASSIGNMENT 3 (LECTURE)

Relational Database Concepts

The given tables have anomalies. Formulate a solution for EACH case to correct the problem showing the
following:
A. Functional dependency notation (s)
B. Relation notation (s)
C. Splitted tables in the final solution
D. Entity Relationship diagram (using Lucidchart) in the final solution

CASE 1

BOOKTRANS
studentNo bookCopy bookTitle dateBorrowed bookCode publisher

19-12345- BOOK1_1 Java 2020-10-05 BOOK1 Wiley and


678 Programming Sons

19-12345- BOOK2_1 Database 2020-11-10 BOOK2 Pearson


678 Fundamentals Education

19-12345- BOOK1_2 Java 2020-10-10 BOOK1 Wiley and


679 Programming Sons

19-12345- BOOK3_1 Python Intro 2020-10-24 BOOK3 Harper


680 Colins

Functional Notations

BOOKTRANS: studentNo, bookCopy → dateBorrowed


bookCopy → bookCode
bookCode → bookTitle, publisher

STUDTRANS: studentNo, bookCopy → dateBorrowed


BOOKCOPYREC: bookCopy → bookCode

BOOKINFO: bookCode → bookTitle, publisher


Leo Zata
2BSIT-5

Relation Notations
BOOKTRANS (studentNo, bookCopy, dateBorrowed,
bookCopy, bookCode
bookCode, bookTitle, publisher)

STUDTRANS (studentNo, bookCopy, dateBorrowed)

BOOKCOPYREC (bookCopy, bookCode)

BOOKINFO (bookCode, bookTitle, publisher)

SplittedTables

STUDTRANS BOOKCOPYREC

19-12345-678 BOOK1_1 2020-10-05 bookCopy bookCode

19-12345-678 BOOK2_1 2020-11-10 BOOK1_1 BOOK1

19-12345-679 BOOK1_2 2020-10-10 BOOK2_1 BOOK2

19-12345-680 BOOK3_1 2020-10-24 BOOK1_2 BOOK1

BOOK3_1 BOOK3

BOOKINFO

bookCode bookTitle publisher

BOOK1 Java Programming Wiley and Sons

BOOK2 Database Fundamentals Pearson Education

BOOK3 Python Intro Harper


Colins
Leo Zata
2BSIT-5
ERD

CASE 2

PERSONNEL
employeeNo lastName firstName gender time- time- dateWorked currentSalary effectiveSalaryDate
in out
1234 Leviste Alex M 8:00 17:01 2020-11-03 21,000 2020-11-01
1235 Carson Maybeline F 7:00 18:05 2020-11-03 22,300 2020-10-15
1234 Leviste Alex M 7:58 17:01 2020-10-24 19,000 2019-04-15
1236 Schimdt Jane F 9:05 16:30 2019-11-03 18,000 2018-12-15
1237 Morrison Viktor M 10:01 18:45 2020-11-05 15,000 2020-11-05
1234 Leviste Alex M 7:00 16:00 2020-11-05 21,000 2020-11-01
1236 Schmidt Jane F 8:00 17:00 2020-11-10 22,000 2020-11-01
1236 Schimdt Jane F 13:00 22:05 2020-11-12 22,000 2020-11-01

Functional Notations
PERSONNEL: employeeNo → lastName, firstName, gender
employeeNo, dateWorked → time-in, time-out
employeeNo, effectiveSalaryDate → currentSalary

EMP_INFO: employeeNo → lastName, firstName, gender


ATTEND_INFO: employeeNo, dateWorked → time-in, time-out
SALARY_INFO: employeeNo, effectiveSalaryDate → currentSalary

Relation Notations
PERSONNEL (employeeNo. lastName, firstName, gender
employeeNo, dateWorked, time-in, time-out
employeeNo, effectiveSalaryDate, currentSalary)

EMP_INFO (employeeNo, lastName, firstName, gender)


ATTEND_INFO (employeeNo, dateWorked, time-in, time-out)
Leo Zata
2BSIT-5
SALARY_INFO (employeeNo, effectiveSalaryDate, currentSalary)

Splitted Tables

EMP_INFO
employeeNo lastName firstName gender
1234 Leviste Alex M
1235 Carson Maybeline F
1236 Schimdt Jane F
1237 Morrison Viktor M

ATTEND_INFO
employeeNo dateWorked time-in time-out

1234 2020-11-03 8:00 17:01


1235 2020-11-03 7:00 18:05
1234 2020-10-24 7:58 17:01
1236 2019-11-03 9:05 16:30
1237 2020-11-05 10:01 18:45
1234 2020-11-05 7:00 16:00
1236 2020-11-10 8:00 17:00
1236 2020-11-12 13:00 22:05

SALARY_INFO
employeeNo effectiveSalaryDate currentSalary
1234 2020-11-01 21,000
1235 2020-10-15 22,300
1234 2019-04-15 19,000
1236 2018-12-15 18,000
1237 2020-11-05 15,000
1236 2020-11-01 22,000
Leo Zata
2BSIT-5
ERD

You might also like