• ChrisM@Work (9/26/2012)


    It's not that uncommon to have a business entity which is both a supplier and a customer to your business. With your relationships modelled in this direction, you'd have to duplicate an address.

    If address is an attribute of customer (or supplier), you don't. You also don't have this problem of a key having more than one meaning.

    Addresses are another table with no direct relation to entities... A EntityAddresses (EntityType, EntityId, AddressId) makes that relation.

    But in the kind of modelling it's very hard to have FK since the reference is always multiple fields... so I either have check constraints or triggers...

    Thanks,

    Pedro



    If you need to work better, try working less...