Results 1 to 4 of 4
  1. #1
    Join Date
    Jun 2007
    Posts
    22

    Unanswered: Simple Entity Relationship Question

    Hi,

    I am modelling an order management database for a clothing organisation.

    I just have a question about how to model the item colours and sizes.

    Either:

    I model both seperately using conjunctions linking to the products entity, e.g.
    [Products]---<[Prod_Size]>---[Sizes]
    [Products]---<[Prod_Colour]>---[Colours]

    Or i model through a catergory entity and link both to that, e.g.
    [Products]>---[Catergory]----<[Sizes]
    With [Catergory] also linking to ----<[Colours]

    Hope you can understand the conitations!

    Basically, different catergories of clothing have different sets of size scales and different sets of colours available.

    Whats the best way to model this?

    thanks

  2. #2
    Join Date
    Apr 2002
    Location
    Toronto, Canada
    Posts
    20,002
    give each differently sized or coloured product its own primary key

    usually this is the GTIN
    rudy.ca | @rudydotca
    Buy my SitePoint book: Simply SQL

  3. #3
    Join Date
    Jun 2007
    Posts
    22
    when you say or.

    Each colour size combination needs to have their own stockquantity, how do i go about doing this without having to enter in every single combination of clothes

    or is there no other way?

  4. #4
    Join Date
    Apr 2002
    Location
    Toronto, Canada
    Posts
    20,002
    Quote Originally Posted by j0nnyd
    Each colour size combination needs to have their own stockquantity
    that sounds like what i was saying -- each combination is actually a different product
    rudy.ca | @rudydotca
    Buy my SitePoint book: Simply SQL

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •