Question
Using the above entity relationship diagram use sql server to write a single script and create this database (call it DocOffic) and answer the following
Using the above entity relationship diagram use sql server to write a single script and create this database (call it DocOffic) and answer the following questions
1.Write a SQL statement for Doc Rob Belkin is retiring. We need to inform all his patients, and ask them to select a new doctor. For this purpose, Create a VIEW that finds the names and Phone numbers of all of Rob's patients.
2. Write a SQL statement to Create a view which has First Names, Last Names of all doctors who gave out a prescription for Panadol
3. Write a SQL statement to Create a view which Shows the First Name and Last name of all doctors and their specialtys
Person Speciality 8 SpecialitylD 8 PersoniD FirstName SpecialityName LastName StreetAddress Doctor City * DoctoriD State MedicalDegrees Zip DoctorSpeciality 8 DoctoriD PersoniD PhoneNumber SSN * SpecialitylD PVisitPrescription * VisitiD PatientVisit * PrescriptioniD Patient 8 VisitiD PatientID PatientiD SecPhoneNumber DoctoriD DOB VisitDate Prescription PersoniD DocNote PrescriptionID Prescription Name Test PVisitTest 8 TestiD * VisitiD TestName 8 TestiDStep by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started