how to model category->product->variant tables in my multivendor marketplace database

22 Views Asked by At

i have the following tables in my mind for my product database, but i'm not sure how to design them according to this structure: category->product->variant by the way, the prices change per each item, component, service, fabric and the vendor.

  1. item group : upper body, lower body, full body
  2. item : jacket, skirt, dress
  3. item VS item group : jacket -> upper body, skirt -> lower body, dress -> full body
  4. component : bust, hem
  5. component VS item : bust -> jacket, dress, hem -> skirt, dress
  6. service group : fixing, down-sizing, up-sizing
  7. service : zipper works, narrowing, lengthening
  8. service VS s.group : zipper works -> fixing, narrowing -> down-sizing, lengthening -> up-sizing
  9. component VS service: bust -> zipper works, narrowing, lengthening, hem -> narrowing, lengthening
  10. fabric : cotton, leather
  11. fabric VS item : cotton -> jacket, skirt, dress, leather -> jacket, skirt, dress

i tried the following, but then one of my friends told me that i have to define all sellable products/services as 'variants', which made me so confused..

  • category : item group
  • subcategory-1 : item
  • subcategory-2 : component
  • subcategory-3 : service group
  • product : service
  • variant : fabric
  • join/subcategory-1 & 2 : component VS item
  • join/subcategory-2 & product: component VS service
  • join/subcategory-1 & variant: fabric VS item
  • other joins are solved by foreign keys
0

There are 0 best solutions below