Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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

image text in transcribed

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 TestiD

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

Beginning ASP.NET 4.5 Databases

Authors: Sandeep Chanda, Damien Foggon

3rd Edition

1430243805, 978-1430243809

More Books

Students also viewed these Databases questions

Question

Why might a cheap location not be the best location?

Answered: 1 week ago