Click here to Skip to main content
13,050,242 members (98,438 online)
Rate this:
Please Sign up or sign in to vote.
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

Category Table

Order Details Table

Price Table
Selling Price
Posted 23-Nov-12 21:03pm
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

Rate this: bad
Please Sign up or sign in to vote.

Solution 1

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.
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)

  Print Answers RSS
Top Experts
Last 24hrsThis month

Advertise | Privacy | Mobile
Web02 | 2.8.170713.1 | Last Updated 24 Nov 2012
Copyright © CodeProject, 1999-2017
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100