Forum Discussion

Satch's avatar
Satch
Icon for Helper III rankHelper III
9 years ago
Solved

Doubt about datamodel. How to approach

Hi,  have doubt about how to make datamodel. It's because some tables have nested tables in it. I'll try to explain   Producttable 1:1 catalogtable   Now this catalogtable has f.e. 100 rows But...
  • TomMartens's avatar
    9 years ago

    Hey,

     

    I would try to build a model loke this

     

    Product (one-side) - SKU (many-side), basically this could also be a single table with SKU as Unique-Identifier for a single row
    A SKU represents different variants of the same product, the SKUs differ by size, color, material, trend, these are just attributes from of SKU

     

    I would create a table catalog_sku that reflects the catalogID | SKU

     

    I would also create a catalog table and the following relationships

    SKU (one-side) - catalog_sku (many-side)

    catalog (one-side) - catalog_sku(many-side)

     

    Hope this gives you an idea