• azmiman (5/8/2014)


    Eirikur Eiriksson (5/8/2014)


    First, few questions:

    1. Will you ever have to list more than one type in the same result set?

    2. Will you be adding new types?

    3. Is there a finite set of attributes or will new attributes be added when and if a new type is added?

    4. Are the common attributes justification enough for a separate table?

    😎

    1. Yes (most of the time the result set will only display common attributes, but in certain cases the result set also display non-common attributes)

    This could potentially lead to a fairly long winded left outer join code with the super/sub-type design.

    2. Potentially, yes

    3. New attribute will be added if the new type has diff attribute than the existing ones

    4. Currently 60-70% are common attributes...

    Based on this, I would suggest a single table design, possibly storing some/all of the non-common attributes in a structured form, i.e. XML.

    If adding a new type means either adding a new table or adding a column to an existing table, the latter is far simpler. Even simpler would be the addition of an attribute within an XML.

    😎