Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

CHAPTER 1: DATABASES AND DATABASE USERS Given the simple Doctor-Treats_Patient database schema which contains three files describing information about doctors and patients they treat as

CHAPTER 1: DATABASES AND DATABASE USERS

  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. (Total for que 1 is 10 marks)

Doctor (DocID: string, DName: string, DAddress: string, Numpatients: integer)

Treats (DocId: string, SSN: string, illness: string, day: string, cost: real)

Patient (SSN: string, PatientName: string, PAddress: string, Age:integer)

Note : DocID, DName, DAddress and Numpatients stand for the doctors identifier, name, address and the total number of patients the doctor has, respectively. Also, SSN, PatientName, PAddress and Age stand for the the patients 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 buying prescription. Note that a doctor can treat a patient for several illnesses.

  1. Create a valid instance of this database containing values for its records with at least four records in each file. (3 marks)
  2. 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 (e.g., illness, cost). Please, provide your solution in the 3 column table below. (4 marks)
  3. 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 relationships this file (eg. Doctor) has with the other files through its fields (e.g., DocID). (3 marks) Provide your solutions using the table below.

Solution : (10 marks for que 1)

Query

Answer

Files involved

  1. Create a valid instance of this database containing values for its records with at least four records in each file.

(3 marks)

An instance of the Doctor-Treats-Patient database is :

Doctor

Patient

Treats

2. Provide 2 informal English queries from this database with their answers. Each query should use at least 2 of the files in the database and your answer should indicate the file (e.g., Doctor, Treats) needed to answer each query and specify what fields are being retrieved as the result (e.g., DName, cost). (4 marks)

English Queries are :

  1. i.

ii.

Result of queries :

ii.

3. 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 relationships this file (eg. Doctor) has with the other files through its fields (e.g., DocID). (3 marks)

  1. Recall that a database has many types of users, each of whom may require a different view of the database. For example, Doctor-Treats-Patient database schema of question 1 may be accessing and printing the details and balances owing for each patient treated by each doctor frequently and thus a view for this user is created. Another view for this database is checking the age of each patient so the information can be used by the doctor for treatment. (Total for que 2 is 10 marks)

  1. Using this Doctor-Treats-Patient database, give 2 additional views that may be needed by other user groups for the database. (5 marks)

Solution : (5 marks for que 2i)

(a)

(b)

ii) Give 5 examples of integrity constraints that you think can apply to the Doctor-Treats-Patient database database of question 1. (5 marks)

Solution : (5 marks for que 2ii)

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

Data And Information Quality Dimensions, Principles And Techniques

Authors: Carlo Batini, Monica Scannapieco

1st Edition

3319241060, 9783319241067

More Books

Students also viewed these Databases questions

Question

LO1 Understand risk management and identify its components.

Answered: 1 week ago