Stock Ordering (1 Viewer)

ernas

New member
Local time
Yesterday, 18:03
Joined
Dec 1, 2018
Messages
2
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
 

Gasman

Enthusiastic Amateur
Local time
Today, 02:03
Joined
Sep 21, 2011
Messages
14,221
I would have thought that each would have a different product reference?
 

Dreamweaver

Well-known member
Local time
Today, 02:03
Joined
Nov 28, 2005
Messages
2,466
I would think they have the different barcodes so should be seperate products.
 

Cronk

Registered User.
Local time
Today, 11:03
Joined
Jul 4, 2013
Messages
2,771
@ernas
The previous 2 responses have been to treat different size packages of whatever as separate products.

Another way is to have an extra table of say tblProductType with (using your examples), Europa Notebook, Sellotap, Post it Block.

Then your tblProduct would be contain a ProductTypeID with different packaging sizes.

Whether to have the separate table requires looking ahead as to what information might be required in the future. For example, by not having the tblProductType, it makes it much harder to determine how many Notebooks overall were sold, or to extract a list of all customers who ordered Notebooks.
 

Users who are viewing this thread

Top Bottom