Question: 1. (total marks 20) Given the same simple Doctor-Treats-Patient database schema which contains three files describing information about doctors and patients they treat as follows,

 1. (total marks 20) Given the same simple Doctor-Treats-Patient database schema

which contains three files describing information about doctors and patients they treat

1. (total marks 20) Given the same 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 (DocID: string. DName: string. DAddress: string. Numpatients integer) Treats (DocId: string, SSN: string, illness: string, day: string, cost: real) Patient (SSN:string, PatientNams string. Paddress: string. Agsinteser) Note: Dosth. DNams. Daddress and Sumpatients, stand for the doctor's identifier, name, address and the total number of patients the doctor has, respectively. Also, SSN, PatientNams, 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 (ca. $85) not including cost of buying prescription. Note that a doctor can treat a patient for several illnesses. Assume that an update operation (a general term in this chapter, for an insert, a modify or a delete operation) is to be made to this database to enter information about a new patient, who was treated for several illnesses by more than one doctor. Answer the following questions on what specific relations, attributes and operations (eg, insert, modify, delete) that need to be done for this update to be implemented in the entire database. Provide your answers both in descriptive sentence and using the formal database operations of INSERT, MODIFY. DELETE as used in Chapter 5 of book with specific attributes and relations when possible. An example formal insert of a doctor record into the Doctor table is: INSERT Referred Relation.Attribute 5 marks Solution: Question Answers a. Give the operations for this update 5 marks D. What types of integrity constraints would you expect to check? (explain using attributes, eg DocID of relevant files) 5 marks c. Which of these integrity constraints are key, entity Integrity, and referential integrity constraints and which are not? 5 marks d. Specify all the referential integrity constraints on this database. 5 marks 1. (total marks 20) Given the same 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 (DocID: string. DName: string. DAddress: string. Numpatients integer) Treats (DocId: string, SSN: string, illness: string, day: string, cost: real) Patient (SSN:string, PatientNams string. Paddress: string. Agsinteser) Note: Dosth. DNams. Daddress and Sumpatients, stand for the doctor's identifier, name, address and the total number of patients the doctor has, respectively. Also, SSN, PatientNams, 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 (ca. $85) not including cost of buying prescription. Note that a doctor can treat a patient for several illnesses. Assume that an update operation (a general term in this chapter, for an insert, a modify or a delete operation) is to be made to this database to enter information about a new patient, who was treated for several illnesses by more than one doctor. Answer the following questions on what specific relations, attributes and operations (eg, insert, modify, delete) that need to be done for this update to be implemented in the entire database. Provide your answers both in descriptive sentence and using the formal database operations of INSERT, MODIFY. DELETE as used in Chapter 5 of book with specific attributes and relations when possible. An example formal insert of a doctor record into the Doctor table is: INSERT Referred Relation.Attribute 5 marks Solution: Question Answers a. Give the operations for this update 5 marks D. What types of integrity constraints would you expect to check? (explain using attributes, eg DocID of relevant files) 5 marks c. Which of these integrity constraints are key, entity Integrity, and referential integrity constraints and which are not? 5 marks d. Specify all the referential integrity constraints on this database. 5 marks

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!