#3NF Help
1 messages · Page 1 of 1 (latest)
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
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"
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