Hi I have two tables:
BARCODES
ITEMS
The barcodes table contains 100 possible barcodes that I can use to attach to items in my business. Not all ITEMS have an attached barcode and some ITEMS use the same BARCODE. Right now not all of the BARCODES are attached to items. When I add a new ITEM that needs a new barcode I need to search my BARCODES and find one that has not been attached to another ITEM. Which is the most efficient way to handle this? Do I create an intermediary many to many table BARCODES_ITEMS? And look at this table to see which BARCODES are not attached?
Another issue us that if I create this many to many table then I need to be able to search my ITEMS by Name~Package Type (Package Type comes from a linked table PACKAGING - I need to be able to see the ITEM NAME~PACKAGING NAME (not ITEM NAME~PACKAGING-ID).
Thanks.
BARCODES
ITEMS
The barcodes table contains 100 possible barcodes that I can use to attach to items in my business. Not all ITEMS have an attached barcode and some ITEMS use the same BARCODE. Right now not all of the BARCODES are attached to items. When I add a new ITEM that needs a new barcode I need to search my BARCODES and find one that has not been attached to another ITEM. Which is the most efficient way to handle this? Do I create an intermediary many to many table BARCODES_ITEMS? And look at this table to see which BARCODES are not attached?
Another issue us that if I create this many to many table then I need to be able to search my ITEMS by Name~Package Type (Package Type comes from a linked table PACKAGING - I need to be able to see the ITEM NAME~PACKAGING NAME (not ITEM NAME~PACKAGING-ID).
Thanks.