View Poll Results: What should I use? or what would you use?

Voters
7. You may not vote on this poll
  • You should definitely the EAV Model

    0 0%
  • You should definitely use Sub Type/Super Type Model

    3 42.86%
  • You could use either, because....

    2 28.57%
  • Other, please explain...

    1 14.29%
  • Gaj, Im as baffled as you

    1 14.29%
Results 1 to 4 of 4
  1. #1
    Join Date
    Jul 2004
    Posts
    32

    EAV or not to BE, that is the question? Please help me by voting?

    Hi All,

    I started a thread over here:

    http://www.dbforums.com/showthread.php?t=1628094

    I've got a few options and I would like all you experts to tell me what you think I should do...

    The problem:
    I want to be able to store different types of information for products in different categories.

    So Category A maybe TV's and category B maybe DVD players, I want to be able to store different types of information on each product in that category. So for TV I may want to store screen size etc.. and for DVD players I may want to store if it supports upscaling etc.

    Obviously each piece of info will be of a different data type but the reason I ask how best to store this is because I will have lots of categories of products and the products will be used for filtering too. So I need to create a solution which is not too costly on performance.
    Please vote on which method I should choose.

    Thanks...

  2. #2
    Join Date
    Jun 2003
    Location
    Ohio
    Posts
    12,592
    Other.
    Use the XML datatype, but only for the undefined elements.
    If it's not practically useful, then it's practically useless.

    blindman
    www.chess.com: "sqlblindman"
    www.LobsterShot.blogspot.com

  3. #3
    Join Date
    Jul 2004
    Posts
    32
    sorry forgot to add that...

  4. #4
    Join Date
    Jan 2003
    Location
    Nottinghamshire, UK
    Posts
    364
    As it stands today

    If the the product types are going to be greater than 50, constantly changing AND this will always be an in-house system, I would actually consider EAV.
    BUT
    I would have to encapsulate ALL comunications with the EAV Product Object via Views, SP's, UDF's, Scheduled Data Integrity Checks etc.
    All other tables would be 3NF.

    Otherwise Sub Type / Super Type & Just accept the on-going DDL and DML maintainence cost (maybe using an SP to introduce a new Type and update views, generate DDL etc).

    Now I'm gonna start investigating the XML Datatype as Blindman suggests
    "Everything should be made as simple as possible, but not simpler." - Albert Einstein
    "Everything should be made as complex as possible, so I look Cleverer." - Application Developer

Posting Permissions

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