Generic modeling versus specific.

  • Hi,

    I need advice and opinions about modeling.

    Background:

    We need to store data about Warrants and Revocations. A Warrant is a

    document allowing someone to see some others data. A Revocation is a

    document that revokes previous warrants.

    I would model it like this:

    see MyWay.jpg

    The person in charge is a fan of generic modeling (Fowler-inspired?). He

    modeled it like TheOtherWay.jpg.

    Explanations:

    Both warrants and revocations is to be stored in "Avtal" (a generic table

    for Agreements).

    Since "Avtal" is generic they must be typed: hence "Produkt" (Product).

    Since there kan be a lot of different "Produkts" some grouping and

    categorization is needed: hence "ProduktGrupp" (ProductGroup) and

    "ProduktGrupp" (ProductCategory).

    Beside the ugly naming convention I think this modeling is bad in an OLTP

    database.

    I do would appreciate your opinions.

    /m

  • Because of the naming conventions (you're right, they're horrible), it's hard to tell exactly what's happening in the "generic" design. However, looking at your design, it sure seems to me that the two structures are nearly identical. A more generic approach is probably correct (although not necessarily whatever that other structure is doing). It is possible to be too generic. I saw a demo once of an object modeled database. It didn't store anything except object definitions from code. Way far gone. No performance. Looked cool though.

    "The credit belongs to the man who is actually in the arena, whose face is marred by dust and sweat and blood"
    - Theodore Roosevelt

    Author of:
    SQL Server Execution Plans
    SQL Server Query Performance Tuning

  • Impossible to say for sure without a full explanation of the business rules (best presented within a conceptual model of some kind) and the design criteria you hold most important.

    As a general rule, though, I find that any "overloading" of meaning for a particular table (i.e., "generic") buys nothing but trouble down the line.

    TroyK

Viewing 3 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic. Login to reply