Results 1 to 3 of 3
  1. #1
    Join Date
    Jan 2004
    Location
    Canada
    Posts
    6

    Database design question

    Hello, I am new here and I am going to jump righ into a design question and would like your suggestions/comments.

    First of, the database is MySQL.

    Here is the basic concept.
    I have three tables that I am concerned about.

    ContactType, Contacts, and Organizations

    ContactType -> ID,Type,Description
    Contacts -> ID,OrgID,FName,LName (etc)
    Organizations -> ID,OrgName,OrgDesc

    Now, I am not concerend in regards to that, but there is a situation that has come up where we may need another clients/contact table, so basically a "client" table and a "user" table, but there are times when the user is also a client. Is ther eany benifit to doing it this way...or should I just leave them in the structure I already have. I am not fond of the idea of have two tables that hold the same data just because they are temporary or not a client......

    Please ask questions if I have been unclear, and I will reword my question....thanks again..

    C

  2. #2
    Join Date
    Oct 2003
    Posts
    87
    Consider this: might a person belong to more than one org, be one type of contact in one org and another type in some other org? Might a contact be two different contact types belonging in the same org? Thus, you'll need an association table between contact and org with contact type related to it. And dump most of those IDs, use natural business PKs whenever you can.

    contact (cntctID PK, fNm, lNm . . . )
    organization (orgNm PK, orgDesc . . . )
    contactType (cntctTyp PK, desc . . . )
    contact_organization (cntctID PK FK, orgNm PK FK, cntctTyp PK FK)
    Oracle - DB2 - MS Access -

  3. #3
    Join Date
    Jan 2004
    Location
    Canada
    Posts
    6
    good idea....thanks....

Posting Permissions

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