#3NF Help

1 messages · Page 1 of 1 (latest)

rugged thistle
#

trying to get this database into 3NF from 1NF.

#

this is the database

#

this is what i got so far. am i close, i am still having a little bit of trouble understanding partial vs transitive dependencies

abstract hill
#

purchases needs a primary key

#

this screams 1 table denormalized with an enum type

Product_Collection / Product_Kind

#

same here

#

Product_Item [Item_ID, PluCode, name, type, kind?]

#

I wouldn't go over normalized, but you could shard it by kind if you want, but it will make your reporting query slower if you have to aggregate with
select union all select union all select

#

Is this a homework or actual project/code?

#

Most warehousing databases is about 4-5 main tables + other management stuff

#

The other question is what are you trying to achieve?
What's the REAL problem here?

#

for instance, if your problem is integrity, you could force foreign key into "constant table"

rugged thistle
#

This is homework. Ya I agree that purchases does need a pk. The assignment is a bit unclear as they didn’t give any data to work with. So I just kinda assumed that itemid would have to be unique across the database in order for it to work in the purchases table. Like PR001 for produce ITEMID and GR001,GR002, etc for the grains table. Instead of 0001,0002, etc in each table as there would be duplicates

#

Just trying to get the first database into 3NF

abstract hill
#

They didn't specify what was common ?

#

or repeated columns ?

#

I normally draw my ERD in Microsoft Visio