I have been trying to implement a database for an assignment. the problem comes in that we have been given a spec and told to design ELH etc...the tutor has looked at a particular ELh and given it the green light to implement. my question is to me it doesnt look right..any clues as to whether my design is correct or the supposed correct design or if their both wrong...etc..as u can see i'm a newbie here!!.so treat me gently.
secenario is a shoe shop ordering database, where suppliers supply many shoes but each shoe style is only made by 1 supplier.
supposed correct design:
Purchase_No, (PK)
Date,
Item Code,
Value,
Supplier ID.
Purchase_No. (PK/FK),
Stock_ID (PK/FK)
Size,
Quantity,
Line Value,
Supplier_ID, (PK)
Shoe Type,
Item Code,
Price,
Supplier Name,
Location
Stock_ID, (PK)
Price,
Supplier ID,
Size,
Stock Level,
Description
links are 1:N supplier -purchases table
1:N stock to purchase line
M:1 purchase line to purchaes
MY design is as follows:
SupplierID (PK)
Name
Address
ShoeID (PK)
Description
Size
UnitCost
StockLevel
PurchaseNo (PK)
Date
TotalCost
PurchaseID (PK)
ShoeID(PK)
Quantity
IndividualShoe(PK)
SupplierID
ShoeID
tables linked as follows
purchases 1:N PurchaseLine
PurchaseLine M:1 individual shoe
Individulalshoe M:1 Supplier
IndividualShoe M:1 Shoe
Hope i'm not confusing you all...too much!
thanks in advance for any help
secenario is a shoe shop ordering database, where suppliers supply many shoes but each shoe style is only made by 1 supplier.
supposed correct design:
Purchase_No, (PK)
Date,
Item Code,
Value,
Supplier ID.
Purchase_No. (PK/FK),
Stock_ID (PK/FK)
Size,
Quantity,
Line Value,
Supplier_ID, (PK)
Shoe Type,
Item Code,
Price,
Supplier Name,
Location
Stock_ID, (PK)
Price,
Supplier ID,
Size,
Stock Level,
Description
links are 1:N supplier -purchases table
1:N stock to purchase line
M:1 purchase line to purchaes
MY design is as follows:
SupplierID (PK)
Name
Address
ShoeID (PK)
Description
Size
UnitCost
StockLevel
PurchaseNo (PK)
Date
TotalCost
PurchaseID (PK)
ShoeID(PK)
Quantity
IndividualShoe(PK)
SupplierID
ShoeID
tables linked as follows
purchases 1:N PurchaseLine
PurchaseLine M:1 individual shoe
Individulalshoe M:1 Supplier
IndividualShoe M:1 Shoe
Hope i'm not confusing you all...too much!
thanks in advance for any help