Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- barcodes
- barcode_id primary key auto increment
- account_id integer not null; reference to accounts.account_id
- barcode varchar(255) not null
- unique barcode + accound_id
- don't repeat barcode for that account
- parts
- part_id primary key auto increment
- part_name varchar 1024 not null
- account_id integer not null; reference
- notes varchar 1024 null
- unique part_name + account_id
- don't repeat part name for that account
- part_barcodes
- part_id reference to parts.part_id
- account_id reference to accounts.account_id
- barcode_id reference to barcodes.barcode_id
- part_id + account_id unique
- don't repeat part for that account; only one barcode per part
- product_barcodes
- catalogid
- barcode_id
- account_id
- quantity
- notes
- catalogid + account_id unique
- don't repeat product for that account; only one barcode per product
- option_barcodes
- account_id
- barcode_id
- catalog_id
- barcode_quantity
- option_set_id_1 NOT NULL
- option_id_1 NOT NULL
- option_set_id_2 NULL
- option_id_2 NULL
- ...
- unique account_id + catalog_id + option_set ...
- don't repeat the same option for that account; only one barcode per option
- product_components
- account_id
- type
- catalogid
- child_component_id
- quantity
- account_id type catalogid child_component_id unique
- don't repeat components for that product
- option_components
- account_id
- option_set_id_1
- option_id_1
- ...
- type
- child_component_id
- accout_id option.. type child_component_id
- don't repeat components for that option
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement