Database Foundations 3-3: Normalization and Business Rules Practices
Database Foundations 3-3: Normalization and Business Rules Practices
Database Foundations 3-3: Normalization and Business Rules Practices
com/academy
Database Foundations
3-3 : Normalization and Business Rules
Practices
Exercise 1: Relational Databases
Overview
In this practice you will analyze the given table structure and bring the table to the specified normal form.
Tasks
1. Analyze the given table which is not normalized. The table holds information specific to items such as the Item ID, Color of the
item, and the Unit price of each of the item. Some of the rows in the table have repeating group of information. Evaluate the data
in the table and bring the table to first normal form:
Item ID Color Unit Price
IT001 Red, Blue $16.56
IT002 Yellow $17.48
IT003 Green $19.76
IT004 Blue, Yellow $20.00
2. Analyze the given table. The table is in the first normal form and has composite primary key made up of the Suppler ID and Store
Id. The non-key attribute location is only dependent on the Store ID.
Evaluate the data stored in the table and bring the table to second normal form:
Supplier ID Store ID Location
SP001 S1 New York
SP001 S3 Vermont
SP002 S1 New Hampshire
SP003 S2 Rhode Island
SP004 S3 Illinois
3. Analyze the given table and the data stored. In the table the Book ID is the primary key and the Category Description is
dependent on the Category ID. Evaluate the data stored in the table and eliminate the transitive dependency to bring the table to
the third normal form:
Book ID Category ID Category Desc Price
1 1 Cooking $27.99
2 2 Travel $17.99
3 1 Cooking $20.99
4 3 Computers $40.99
5 2 Travel $19.99
Copyright © 2017, Oracle and/or its affiliates. All rights reserved. Oracle and Java are registered trademarks of Oracle and/or its affiliates. Other names may be trademarks of their respective owners.
2
Overview
In this practice, you use un-normalized database models to create normalized database models.
Tasks
1. For the Academic Database ERD, evaluate each entity against the rules of normalization, identify the misplaced attributes, and
explain which rule of normalization each misplaced attribute violates.
have
COURSE
# ID have
* Name
DEPARTMENT give
offer offered by
# ID be for
* Name
* Head held
have held
be for have
contain
PART TIME
* hourly rate
Copyright © 2017, Oracle and/or its affiliates. All rights reserved. Oracle and Java are registered trademarks of Oracle and/or its affiliates. Other names may be trademarks of their respective owners.
3
Tasks
1. Evaluate the following unnormalized data in the USER entity and develop an entity relationship diagram that is normalized to third
normal form.
2301 Smith 54101 05/07 Meeting Today There is… 3786 IMAP05
5607 Jones 54101 05/07 Meeting Today There is… 6001 IMAP08
5607 Jones 54660 12/01 Jogging Today? Can you… 6001 IMAP08
7773 Walsh 54101 05/07 Meeting Today There is… 9988 EMEA01
0022 Patel 54101 05/07 Meeting Today There is… 9988 EMEA01
Copyright © 2017, Oracle and/or its affiliates. All rights reserved. Oracle and Java are registered trademarks of Oracle and/or its affiliates. Other names may be trademarks of their respective owners.
4
2. A color scheme for a car includes specifications for paint color for the body and the interior colors and materials. For example:
The “Desert” color scheme includes silver paint and gray leather interior; the “Sunburst” color scheme includes gold paint and
cream leather interior. Does the model below follow the rules of Third Normal Form? If you spot a violation, correct it.
CAR
# number
* make
* model
* color scheme
* paint color
* interior color
Overview
In this practice you will analyze the case scenario provided and identify business rules.
Tasks
1. Book.com is an online store on the Internet where customers can browse the catalog and select products of interest.
a. Every book has a title, isbn, year and price. The store also keeps the author and publisher for any book.
b. For authors, the database keeps the name, address and the url of their homepage.
c. For publishers, the database keeps the name, address, phone number and the url of their website.
d. The store has several warehouses, each of which has a code, address and phone number.
e. The warehouse stocks several books. A book may be stocked at multiple warehouses.
f. The database records the number of copies of a book stocked at various warehouses.
g. The bookstore keeps the name, address, email-id, and phone number of its customers.
h. A customer owns several shopping carts. A shopping cart is identified by a Shopping_Cart_ID and contains several
books.
i. Some shopping carts may contain more than one copy of same book. The database records the number of copies of each
book in any shopping cart.
j. At that time, more information will be needed to complete the transaction. Usually, the customer will be asked to fill or
select a billing address, a shipping address, a shipping option, and payment information such as credit card number. An
email notification is sent to the customer as soon as the order is placed.
Copyright © 2017, Oracle and/or its affiliates. All rights reserved. Oracle and Java are registered trademarks of Oracle and/or its affiliates. Other names may be trademarks of their respective owners.
5
2. Identify if the given description can be categorized as a Structural Business rule, Procedural Business rule or Programmatic
Business rule.
Approval of travel
requests to an event
must be signed by
the project manager
of the event
A customer may
make numerous
payments on
account
A machine operator
may not work more
than 10 hours in a
day
The Rental amount
in RENTAL is
calculated from
the Rental rate
multiplied by the
number of days
A Customer can
have zero, one or
many ORDERS
A customer’s debt
must not exceed the
customer’s credit
limit.
Copyright © 2017, Oracle and/or its affiliates. All rights reserved. Oracle and Java are registered trademarks of Oracle and/or its affiliates. Other names may be trademarks of their respective owners.