Professional Documents
Culture Documents
NORMALIZATION
DATABASE DESIGN USING BOTTOM-UP APPROACH
(NORMALIZATION TECHNIQUE)
Prepared By: Nor Mas Aina Md Bohari @ Oct 2017
1
Exercise 1
2
Exercise 1 Full Dependencies / Full Functional Dependencies
has
has EMPLOYEE
PK EmpNo
ASSIGNMENT EmpName
PK,FK ProjNo FK JobCode
PK,FK EmpNo
AssignHours
AssignTotalChg involved in
4
Exercise 2
A book is identified by its ISBN number, and it has a title, a price, and a date
of publication. It is published by a publisher, which has its own ID number
and a name. Each book has exactly one publisher, but one publisher
typically publishes multiple books over time.
5
Exercise 2
INF ISBN Title Price DatePub PubID PubName AutID AutName AutDOB
Transitive Dependency
ERD
2NF ISBN Title Price DatePub PubID PubName BOOK AUTHOR PUBLISHER
PK AutID PK PubID
Transitive Dependency AutName PubName
AutDOB
AutID AutName AutDOB AUTHOR has
/published by
ISBN AutID BOOK_AUTHOR write
BOOK
PK ISBN
3NF PubID PubName PUBLISHER BOOK_AUTHOR Title
ISBN Title Price DatePub PubID PK,FK ISBN Price
BOOK DatePub
PK,FK AutID
AutID AutName AutDOB FK PubID
AUTHOR
ISBN AutID BOOK_AUTHOR written by 6
Exercise 2 (Improving Design – Optional)
3NF PubID PubName PUBLISHER
ISBN BookTitle BookPrice BookPublishDate PubID BOOK
AutID AutName AutDOB AUTHOR
ISBN AutID BOOK_AUTHOR ERD
AUTHOR PUBLISHER
PK AutID PK PubID
AutName PubName
AutDOB
has
/published by
write
BOOK
PK ISBN
BOOK_AUTHOR BookTitle
PK,FK ISBN BookPrice
PK,FK AutID BookPublishDate
FK PubID
written by 7
Exercise 3
Room Utilization Report (Year 2015)
8
Exercise 3 Full Dependencies
ERD
booked by
CUSTOMER
3NF RoomNo RoomType ROOM PK CusICNo
BOOKING CusName
CusICNo CustName CUSTOMER
PK,FK RoomNo
RoomNo CusICNo StartDate EndDate PK,FK CusICNo
BOOKING StartDate book
EndDate
9
Exercise 4
Attribute Name Sample Value Sample Value Sample Value Sample Value Sample Value
PROD_LABEL Rotary sander 0.25-in. drill bit Band saw Rotary sander Power drill
VEND_NAME NeverFail, Inc. NeverFail, Inc. BeGood, Inc. NeverFail, Inc. ToughGo, lnc
QUANT_SOLD 1 8 1 2 1
Partial Dependency
Partial Dependencies
Transitive Dependency
2NF INV_NUM SALE_DATE INVOICE ERD
PRODUCT VENDOR
PROD_NUM PROD_LABEL VEND_CODE VEND_NAME PROD_PRICE INVOICE PK VEND_CODE
VEND_NAME
PK INV_NUM
Transitive Dependency SALE_DATE
supply
INV_NUM PROD_NUM QUANT_SOLD INVOICE_LIST /supplied by
contain PRODUCT
3NF INV_NUM SALE_DATE INVOICE PK PROD_NUM
PROD_LABEL
VEND_CODE VEND_NAME VENDOR PROD_PRICE
INVOICE_LIST FK VEND_CODE
PROD_NUM PROD_LABEL PROD_PRICE VEND_CODE VENDOR PK,FK INV_NUM
PK,FK PROD_NUM
INV_NUM PROD_NUM QUANT_SOLD QUANT_SOLD
INVOICE_LIST listed in 11
Exercise 5
12
Exercise 5
INF ProdID ProdCat SalesPersID SalesPersName JobPosition Salary SupplierID SupplierName
Transitive Dependency
Transitive Dependency
has
has
SALESPERSON
PK SalesPersID
SUPPLIER TASK SalesPersName
PK SupplierID supply
PK,FK ProdID FK JobPosition
SupplierName PK,FK SalesPersID
PK,FK SupplierID
involved in
14
Exercise 6
15
Exercise 6 Full Dependencies
ERD
booked by
BOOK
3NF CustNo CustName CUSTOMER PK BookNo
RENTAL BookTitle
BookNo BookTitle BOOK
PK,FK CustNo
CustNo CusICNo DateOut DateReturn RENTAL PK,FK BookNo
DateOut book
DateReturn
16