Results 1 to 5 of 5

Thread: Relating Tables

  1. #1
    Join Date
    Feb 2004
    Posts
    67

    Unanswered: Relating Tables

    I am trying to design a database that will link/relate db1(Patients) with db2(visits) and then the Visits(db) to link to 3-databases, (Diagnosis), (Objective), and (Medications).
    I want to be able to see A Patient, his/her history with Diagnosis, Objectives, and medication for each visit.
    ?? Should I Put PatientID in each db, or should I put each db's *ID in the pateints db.
    Thanks.....
    P.S. if anybody has a simular database that I can use as a template, I would greatly appreciate it.

  2. #2
    Join Date
    Dec 2003
    Location
    Toronto, Ont. Canada
    Posts
    238

    Re: Relating Tables

    Originally posted by Enviva
    I am trying to design a database that will link/relate db1(Patients) with db2(visits) and then the Visits(db) to link to 3-databases, (Diagnosis), (Objective), and (Medications).
    I want to be able to see A Patient, his/her history with Diagnosis, Objectives, and medication for each visit.
    ?? Should I Put PatientID in each db, or should I put each db's *ID in the pateints db.
    Thanks.....
    P.S. if anybody has a simular database that I can use as a template, I would greatly appreciate it.
    You actually have 4 different database files?... or are you talking about tables here?

  3. #3
    Join Date
    Feb 2004
    Posts
    67
    Sorry......1 dabase......5 tables
    I have 5 separate tables, 1-tblPatients, 2-tblVisit, 3-tblDiagnosis, 4-tblObjectives, and 5-tblMedications

  4. #4
    Join Date
    Dec 2003
    Location
    Toronto, Ont. Canada
    Posts
    238
    Originally posted by Enviva
    Sorry......1 dabase......5 tables
    I have 5 separate tables, 1-tblPatients, 2-tblVisit, 3-tblDiagnosis, 4-tblObjectives, and 5-tblMedications
    I'd have...

    PatientID (unique primary key) in tblPatients (as patient's personal information only)
    VisitID (unique primary key) and PatientID in tblVisits
    So a one to many relationship between patient and visits...

    Then in tblDiagnosis, tblObjectives, and tblMedications I'd have their own ID's as primary key, but include VisitID...

    I don't know how your database is going to work as far as whether you can have more than one record in each of the other three tables per visit... but to me the visit will be unique to the patient so you may as well just join on visitID...

    Just my two cents...

  5. #5
    Join Date
    Feb 2004
    Posts
    67
    Thanks Trudi.......I will try that

Posting Permissions

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