Results 1 to 4 of 4
  1. #1
    Join Date
    Sep 2005
    Posts
    3

    Calling All Database Design Guru

    Ok, not sure what is the right/best way to go about designing this. I need a database that allow a User (admin) to own many Company and a Company can have many Property. A User can also create multiple users (non admin) to help manage certain Company and/or Property. For example, "Company A" have "Property A", "Property B", and "Property C". The admin assigned the new user to manage "Company A", along with "Property A" and "Property B", but not "Property C". Another example might be, a new user can only manage Property A, B, or C, but not "Company A". I hope all you guru understand what I am trying to say. Thanks in advance.

  2. #2
    Join Date
    Feb 2004
    Location
    In front of the computer
    Posts
    15,579
    I'm not sure that I understand very well. Can you post a reference to the assignment, or at least scan it in for us?

    -PatP

  3. #3
    Join Date
    Sep 2005
    Posts
    3

    More Info

    Thanks for the quick reply Pat. This is just a little self learning project, so I don't really have any assignment references to go by. Lets give this one more try on my part.

    1. The web application is built to keep track of commercial properties. A property is owned by a company. A company can have many property.

    company--->property

    2. One or more user can be created to manage one or more company.

    user--->userCompany<---company

    3. One or more user can be created to manage one or more property.

    user--->userProperty<---property

    Am I going in the right direction? Any advice would be great.

    Thanks

  4. #4
    Join Date
    Feb 2004
    Location
    In front of the computer
    Posts
    15,579
    I'd create a total of six tables. Three tables for objects, one table for each of the kinds of objects you're tracking (users, companies, and properties). Three tables for relationships, one for company-owns-property, one for user-manages-property, and one for user-manages-company. I would probably want to include attributes in the relationship tables to show when each relationship starts and ends, since there are often problems when
    I don't keep track of that!

    -PatP

Posting Permissions

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