Normalization Example: Guide Interview Domains Assumptions Entities Some Variations
Normalization Example: Guide Interview Domains Assumptions Entities Some Variations
Guide
Interview
Domains
Assumptions
FD Diagrams
Entities
Some Variations
Change in Assumptions = > FD change
Multiple use of Domains == > Entity change
Different Attributes == > Entity change
FD and ER relations
1
Guide
Interview fittings used in furniture. The business is booming and they want to
have a solid database to help fill their orders. Knowing you are a IT
guy that knows it all, they have contacted you, you made an
appointment with the manager… and as they say, the rest is history.
Manager . [here is short
Listen to me, we want you to set up the most modern system in place, so go ahead and
tell me what machine to buy and the advantages transcript of your
like a interview]
You
we get. Something
database, you know. -- Easy does it Sir. First I need to know your
Information Reality, this is to say, what
reports you use, what are your input formats
Listen I am not an expert; this is why I called you. Yet I can tell you that this company in your order and so on …
is dedicated to manufacture elegant fittings that are used in good furniture, rather
than the awful nails and screws you see in cheap furniture. With them you can
make modular designs. By the way, have you gone to IKEA or Beautiful
Kitchens in Dallas or Houston, you should. (knowing that this is what you need)
– Very interesting, tell me more
Anyway, a piece of furniture has different types of fittings, an each piece requires a
certain amount. The same fittings are also used in other type of furniture, such as
a TV stand, a bookshelf, a table or a chair, but the amount is different for each
piece.
Also we have an order system, and for each order we keep the information on the
delivery address, the name of the customer, the quantity ordered, the type of (just keep him talking, it is important to
fitting, the name of the customer. You know, mostly we deal with manufacturers. record everything)
For each order we keep a number and a detailed line for each fitting or item – I will have some coffee. Do you mind?
ordered. In any case, we know the price of each item and how many are needed
for a given type of furniture, so we can plan our production.
(knowing that there is nothing more coming
Be my guest. Since we get the fittings from various manufacturing plants For each from him for the time being)
fitting we also need to know the plant where it is manufactured and quantity in – Very well let me work a bit on this and I
stock. Certainly each plant provides us with various fittings of the same kind as will propose you a database design before we
other plants. Finally for each fitting we know its type, its quality and a go any further.
description. For each of our customers we keep his/her addresses. We provide
discounts based on quantity only.
3
Domains
1. Furniture ID: Integer Example : 32
2. Piece Description: String ( 40 ) Example : “TV Stand”
3. Address: String (40) Example : “3457 Bellaire , Houston"
4. Customer ID: Integer Example : 45
5. Fitting ID: Integer Example : 12
6. Fitting Description: String ( 40 ) Example :”Medium hinge”
7. Quality: String ( 10 ) Example :”Brass"
8. Order Number: Integer Example : 1234
9. Date: Date long Example : 12/12/2004
10. Detail Line: Integer Example : 13
11. Quantity Ordered: Integer Example : 80
12. MPlant ID: Integer Example : 12
13. Stock: Integer Example : 439
14. MPlant Name: String (30) Example : ”Denton"
15. Volume: Integer Example : 500
16. Discount: Integer Example : 25
17. Price: Float Example :$56.78
18. Quantity Required Integer Example : 34
1
4
Assumptions
5
Details : ( Order, Detail Line, Quantity Ordered, Fitting ID)
FD Diagram
Ensembles: ( Fitting ID, Furniture ID, Quantity Required )
Stocks : (MPlant, Fitting ID, Stock )
Piece Quantity
Description Required Price
Detail Line
Date
MPlant ID Stock
OK
2. Addresses : ( Address, Customer ID )
3. Ensembles: ( Fitting ID, Furniture ID, Quantity Required )
4. Fittings : ( Fitting ID, Fitting Description, Quality, Price )
5. Orders : ( Order Number, Address, Date )
6. Details : ( Order, Detail Line, Quantity Ordered, Fitting ID)
7. Stocks : ( MPlant, Fitting ID, Stock )
8. Plants : ( MPlant, MPlant Description )
9. Discount : ( Quantity Ordered, Discount )
18 domains with 9 entities
8
The bigger picture:
This system is just a subsystem that relates
to other systems in the enterprise
Inventories
Plants : ( MPlant, MPlant Description )
Manufacture
Stocks : (MPlant, Fitting ID, Stock )
Customers Database
Addresses : ( Address, Customer ID )
Orders : ( Order Number, Address, Date )
12
And the E-R model?
Quantity
weight color
Manager Description
P# F#
Fitting Chen’s
Quantity
Plant
Quantity
Codd’s
weight color
Manager Description
Plant m t fitting
P# F#
Chen’s
13
Modeling Reality
Enterprise Database
s
n flow
infor ons and
Num Pieza
Num Fitting Cost
Costo
matio
23 viga
brass $45
45 clavo $67.35
i
hinge
Relat
76 aro $17.35
tap
Day
dia Num
NumStatus
Est
Mon
lunes 23 ok
Tue
viernes 45 mal
Wrong
Wed
sabado 76 ok