Click here to Skip to main content
15,885,824 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Sir, I need help

I have a problem on how to uniquely identify the product using barcode. Where tables do I put the barcodeId.
I have a product table, category table, price table, order details table.

Product table
prodID
Name
Desc
CategoryID
ReorderLevel

Category Table
CategoryID
Name

Order Details Table
O.DetailsID
prodID
OrderID
UnitPrice
Quantity

Price Table
PriceID
ProdID
Selling Price
Posted
Comments
André Kraak 24-Nov-12 3:05am    
As the bar code uniquely identifies a product I would think the barcodeId should go into the Product table.
ianshack 24-Nov-12 3:13am    
Sir, do I need a barcode table to connect with the product table?

1 solution

A barcode (normally) returns the ArticleNumber - which is a up-to-15-digit number which uniquely identifies a specific make, model, and size of unit: so a 100g tube of sweeties will have a different Article Number (and thus barcode) to a 200g tube of teh same sweeties, or a box containing 20 tubes of 100g of sweeties.

So the only sensible place to put it is in the Product table - it must reflect the product, and cannot be used for any other product, worldwide (even if you have discontinued the original). There are pretty strict laws in most companies about there numbers and how they are to be handled, mostly for consumer protection purposes.
 
Share this answer
 
Comments
ianshack 24-Nov-12 3:25am    
Sir, my prodID is autoincrement if I add additional product that already exist; This product should have the same barcodeID. How can I handle this? thanks
OriginalGriff 24-Nov-12 3:34am    
Two different products *must not* have the same barcode ID: there are severe financial penalties for doing this.
Your product ID does not have to be the same as the Barcode Id (or Article Number).
ianshack 25-Nov-12 19:55pm    
Thank you S
ianshack 25-Nov-12 19:57pm    
Sir, how about the return products? where table I connect the return products table.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900