Advertisement
Guest User

Untitled

a guest
Oct 30th, 2014
152
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.51 KB | None | 0 0
  1. barcodes
  2. barcode_id primary key auto increment
  3. account_id integer not null; reference to accounts.account_id
  4. barcode varchar(255) not null
  5.  
  6. unique barcode + accound_id
  7. don't repeat barcode for that account
  8.  
  9. parts
  10. part_id primary key auto increment
  11. part_name varchar 1024 not null
  12. account_id integer not null; reference
  13. notes varchar 1024 null
  14.  
  15. unique part_name + account_id
  16. don't repeat part name for that account
  17.  
  18. part_barcodes
  19. part_id reference to parts.part_id
  20. account_id reference to accounts.account_id
  21. barcode_id reference to barcodes.barcode_id
  22.  
  23. part_id + account_id unique
  24. don't repeat part for that account; only one barcode per part
  25.  
  26. product_barcodes
  27. catalogid
  28. barcode_id
  29. account_id
  30. quantity
  31. notes
  32.  
  33. catalogid + account_id unique
  34. don't repeat product for that account; only one barcode per product
  35.  
  36. option_barcodes
  37. account_id
  38. barcode_id
  39. catalog_id
  40. barcode_quantity
  41. option_set_id_1 NOT NULL
  42. option_id_1 NOT NULL
  43. option_set_id_2 NULL
  44. option_id_2 NULL
  45. ...
  46.  
  47. unique account_id + catalog_id + option_set ...
  48. don't repeat the same option for that account; only one barcode per option
  49.  
  50. product_components
  51. account_id
  52. type
  53. catalogid
  54. child_component_id
  55. quantity
  56.  
  57. account_id type catalogid child_component_id unique
  58. don't repeat components for that product
  59.  
  60. option_components
  61. account_id
  62. option_set_id_1
  63. option_id_1
  64. ...
  65. type
  66. child_component_id
  67.  
  68. accout_id option.. type child_component_id
  69. don't repeat components for that option
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement