Results 1 to 3 of 3
  1. #1
    Join Date
    Feb 2008

    db design issueL relation overruling, inheritence, ...


    In my application I have the following scenario:

    I need to assign multiple properties to a house. But as more houses are added I want my users to be able to assign properties to lets say a group and all houses in that group now share the same properties. But the problem is that there can be a house in a group that does not share one or more properties defined in that group, or just needs to add some extra properties.

    So I came op with:

    - 1 group has many properties and a property can be assigned to many groups
    - 1 group has many houses and a house only belongs to one group
    - a house can have many properties and a property can be assigned to many houses

    I'm still not feeling comfortable with this since (1) a need to programmicly retrieve all properties and override it with specific house-property relations and (2) a need some 'inactive' column on the house-property relation to exclude properties defined in the group.

    So any ideas how I do should resolve this problem? I have been looking at the concept of storing inheritence in database but I'm not realy sure about it.

    Thanks in advance! :-)

  2. #2
    Join Date
    Apr 2002
    Toronto, Canada
    how to resolve what problem?

    that design sounds okay to me | @rudydotca
    Buy my SitePoint book: Simply SQL

  3. #3
    Join Date
    Feb 2008
    Well I thought there meight be a better solution for this issue :-)

    I mean, creating a database design that actualy forces that kind of 'property overloading' instead of relying on the software implementation to follow that kind of behaviour.

    I'v been using this design for a lot more projects in the past but I'd like to know if there are better alternatives :-)

    Always learning ;-)

Posting Permissions

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