[Solution]the table PATIENT (PatientID, PatientEmail, PatientAddress

1. For the table PATIENT (PatientID, PatientEmail, PatientAddress, PatientCity, PalientState, Physician),it is desired to know if PatientEmails are unique, i.e., there are no two patients…

1. For the table PATIENT (PatientID, PatientEmail, PatientAddress, PatientCity, PalientState, Physician),it is desired to know if PatientEmails are unique, i.e., there are no two patients who share the same email address, since, if this is so, PatientEmail could possibly be a candidate (alternate) key. In the following correlated subquery which was designed to see if PatientEmail are unique, fill in the SELECT and FROM in the lower query.SELECT P1.PatientEmailFROM PATIENT P1WHERE P1.patientEmail IN(SELECT ________________________ FROM ________________________ WHERE P1.PatientEmail = P2.PatientEmail AND P1.PatientID P2.PatientlD);2. Insurance Company A has just acquired Insurance Company B, and in Company B’s database there are two tables of interest: PEOPLE and INSURANCEPOLICY. Company A wishes to determine if Company B enforced referential integrity between its PEOPLE and INSURANCE policy tables, and wrote the SQL code below to determine if any policies In PEOPLE had policyIDs which violated referential Integrity, and, if so, the names of the people and the violating policylDs. Fill in the WHERE clause in the inner subquery.PEOPLE (PersonID, PersonName, PersonPhone, PolicylD)INSURANCEPOLICY (PolicylD, YearIssued, Amount)SELECT PersonName, PEOPLE.PolicyIDFROM PEOPLEWHERE PEOPLE.PolicylD NOT IN(SELECT INSURANCEPOLICY.PolicyIDFROM INSURANCEPOLICY, PEOPLEWHERE ________________________________);

The post the table PATIENT (PatientID, PatientEmail, PatientAddress

Assignment status: Solved by our experts

>>>Click here to get this paper written at the best price. 100% Custom, 0% plagiarism.<<<

Leave a Reply

Your email address will not be published. Required fields are marked *