Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

1. Given the simple Doctor-Treats Patient database schema which contains three files describing information about doctors and patients they treat as follows, answer the following

image text in transcribed

1. Given the simple Doctor-Treats Patient database schema which contains three files describing information about doctors and patients they treat as follows, answer the following questions with regards to this database. Doctor (DoclID: integer. DName: string, DAddress: string, Numpatients: integer) Treats (Docld: string, SSN: integer, illness: string, day: string, cost: real) Patient (SSN: string, PatientName: string, PAddress: string, Age:integer) Note : DocID, DName. DAddress and Numpatients stand for the doctor's identifier, name. address and the total number of patients the doctor has, respectively. Also, SSN, PatientName, PAddress and Age stand for the the patient's social security number, name. address and age respectively. The rest of the attributes are for the illness (eg. Cold, flu, diabetes, headache) and cost of each treatment visit (eg. $85) not including cost of buving prescription. Note that a doctor can treat a patient for several illnesses. i) Create a yalid instance of this database containing values for its records with at least four records in each file. (3 marks) ii) Provide 2 informal English queries for this database with their answers. Each query should use at least 2 of the files in the database and your answer should indicate the files (e.g., Doctor, Treats) needed to answer each query and specify what fields are being retrieved as the result (c.g., illness. cost). (4 marks) ii) Specify, at least 3 relationships (one for each of the 3 database files) among the records of the database. For each file (e.g.. Doctor), list any. celationshies this file (eg. Doctor) has with, the other files through its fields. (e.g., DocID). (3 marks) 1. Given the simple Doctor-Treats Patient database schema which contains three files describing information about doctors and patients they treat as follows, answer the following questions with regards to this database. Doctor (DoclID: integer. DName: string, DAddress: string, Numpatients: integer) Treats (Docld: string, SSN: integer, illness: string, day: string, cost: real) Patient (SSN: string, PatientName: string, PAddress: string, Age:integer) Note : DocID, DName. DAddress and Numpatients stand for the doctor's identifier, name. address and the total number of patients the doctor has, respectively. Also, SSN, PatientName, PAddress and Age stand for the the patient's social security number, name. address and age respectively. The rest of the attributes are for the illness (eg. Cold, flu, diabetes, headache) and cost of each treatment visit (eg. $85) not including cost of buving prescription. Note that a doctor can treat a patient for several illnesses. i) Create a yalid instance of this database containing values for its records with at least four records in each file. (3 marks) ii) Provide 2 informal English queries for this database with their answers. Each query should use at least 2 of the files in the database and your answer should indicate the files (e.g., Doctor, Treats) needed to answer each query and specify what fields are being retrieved as the result (c.g., illness. cost). (4 marks) ii) Specify, at least 3 relationships (one for each of the 3 database files) among the records of the database. For each file (e.g.. Doctor), list any. celationshies this file (eg. Doctor) has with, the other files through its fields. (e.g., DocID)

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Making Databases Work The Pragmatic Wisdom Of Michael Stonebraker

Authors: Michael L. Brodie

1st Edition

1947487167, 978-1947487161

More Books

Students also viewed these Databases questions

Question

=+a. Fill in the missing entries in the ANOVA table.

Answered: 1 week ago