Hello all,
Currently a bit lost and any help would be greatly appreciated.
Background: I have a homework scenario like this:
A company places an order with a supplier. The order contains multiple products and there is a table called OrderProducts which is shown like: ProductCode,ProductName, Unit,Quantity,PricePerProduct
7001,Europa Notebook, Pack of 5,10,£3.50
7011,Sellotape, Pack of 6,10,£3.50
7031,Post it Block,Large-Pack of 8,10,£3.50
I have created 3 tables: Product,OrderProducts,Order
Table Product
ProductCode-Number(primarykey)
ProductName-ShortText
Unit-ShortText
ItemsPerPack-Number
Price
Table Order
OrderNo-Number(primary key)
OrderDate-DateTime
DeliveryDueDate-DateTime
Table OrderProducts
ProductCode-(Primary & Foreign Key)
OrderNo-(Primary & Foreign Key)
QuantityOrdered-(Number)
I am confused about Product table, if I have a product which comes in different packs for example: Europa Notebook could come as: a pack of 6, a pack of 10 etc and the price for different packs would change as well.
Europa Notebook Pack of 6 £2.50
Europa Notebook Pack of 10 £4.00
Would that table definition above work or am i missing something?
Thanks
Ernasi
Currently a bit lost and any help would be greatly appreciated.
Background: I have a homework scenario like this:
A company places an order with a supplier. The order contains multiple products and there is a table called OrderProducts which is shown like: ProductCode,ProductName, Unit,Quantity,PricePerProduct
7001,Europa Notebook, Pack of 5,10,£3.50
7011,Sellotape, Pack of 6,10,£3.50
7031,Post it Block,Large-Pack of 8,10,£3.50
I have created 3 tables: Product,OrderProducts,Order
Table Product
ProductCode-Number(primarykey)
ProductName-ShortText
Unit-ShortText
ItemsPerPack-Number
Price
Table Order
OrderNo-Number(primary key)
OrderDate-DateTime
DeliveryDueDate-DateTime
Table OrderProducts
ProductCode-(Primary & Foreign Key)
OrderNo-(Primary & Foreign Key)
QuantityOrdered-(Number)
I am confused about Product table, if I have a product which comes in different packs for example: Europa Notebook could come as: a pack of 6, a pack of 10 etc and the price for different packs would change as well.
Europa Notebook Pack of 6 £2.50
Europa Notebook Pack of 10 £4.00
Would that table definition above work or am i missing something?
Thanks
Ernasi