Results 1 to 3 of 3

Thread: relational algebra question

  1. #1
    Join Date
    Dec 2008
    Posts
    3

    relational algebra question

    hi please please help with this question ive been on for hours...

    Q. Find the details of all patients that have shared any doctors with the patient that has the code “P555".

    Patient (PatientCode, PatientSurname, PatientFirstname, PatientSex, Age, PatientOccupation, PatientHeight, PatientWeight, PatientAddress)

    Doctor (DoctorCode, DoctorSurName, DoctorFirstName, DoctorPrivateAddress, MobileNo, Function)

    Operation (Operation Code, PatientCode, DoctorCode, Date, Time, Result, OperationType)

    Is_Seen_By (PatientCode, DoctorCode, Date, Time).

  2. #2
    Join Date
    Jun 2004
    Location
    Atlanta and Manhattan
    Posts
    607

    Could You Clarify?

    Could you give a little more detail as to what you see as the outcome of this question? Are you asking how to write a query using these table (I think) layouts, or what?

    Get back with a more detailed description of your need, and I'm sure we can help you further.

    Thanks!

    Bill

  3. #3
    Join Date
    Dec 2008
    Posts
    3
    at the min this is the answer which i have came to! i am not sure if this is in fact correct...

    4. Find the details of all patients that have shared any doctors with the patient that has the code “P555".

    Rel 1 = SELECT FROM Is_Seen_By WHERE PatientCode = P555
    Rel 2 = Operation NATJOIN Rel 1 with DoctorCode Common
    Rel 3 = PatientNATJOIN Rel2 with PatientCode Common

    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
  •