Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

PART I SQL Data Control Language and Views: The users of the Medical database include three nurses (nurse_1, nurse_2, and nurse_3), three physicians (doc_1, doc_2,

PART I SQL Data Control Language and Views:

The users of the Medical database include three nurses (nurse_1, nurse_2, and nurse_3), three physicians (doc_1, doc_2, and doc_3), and one manager (manager_1), all of whom have been created by the DBA. You are asked to use SQL to create necessary roles and grant the indicated privileges to roles/users.

All nurses can read and modify (insert, delete, and update) the InsuranceComp, HasPolicyWith, Patient, and OfficeVisit tables.

All nurses can read from and insert into the Took table.

All nurses can read from the Physician and LabTest tables.

All physicians can read from and insert into the LabTest and Physician tables.

All physicians can read and modify (insert, delete, and update) the Took and OfficeVisit tables.

The manager of the clinic has all privileges on all the tables.

Create a view that allows the billing department to access patient billing information for office visits including patient's ID, first and last names, phone number, and physician's first and last names, and the charge of each office visit.

image text in transcribed

InsuranceComp ID Name PhoneNum Patient ID Fname Lname BirthYear Sex Zipcode PhoneNum OfficeVisit PatID DocID Month Day Year Outcome Charge HasPolicyWith Pat ID InsCompId StartDate Took PatID DocID Physician ID Fname Lname OfficeNum Specialty Result LabTest ID Name Charge Description InsuranceComp ID Name PhoneNum Patient ID Fname Lname BirthYear Sex Zipcode PhoneNum OfficeVisit PatID DocID Month Day Year Outcome Charge HasPolicyWith Pat ID InsCompId StartDate Took PatID DocID Physician ID Fname Lname OfficeNum Specialty Result LabTest ID Name Charge Description

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_2

Step: 3

blur-text-image_3

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

Databases Illuminated

Authors: Catherine M. Ricardo

1st Edition

0763733148, 978-0763733148

More Books

Students also viewed these Databases questions

Question

Why do HCMSs exist? Do they change over time?

Answered: 1 week ago