Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

I. Based on the relational schema (3NF) from Project 1, analyze the tables, their relationships, and the sample data you were given in Project 1.

image text in transcribed

I. Based on the relational schema (3NF) from Project 1, analyze the tables, their relationships, and the sample data you were given in Project 1.

a. CREATE THE TABLES, using the best data types based on your analysis. Follow each table name with an underscore and your first, middle, and last initials (if you do not have a middle initial, use X). For example, if your name is Alice B Chandler, you would name the Patient table PATIENT_abc. Also, keep in mind that foreign key relationships require the same data types on both sides (e.g., if you declare PatientID as INTEGER in the Patient table, it must be declared as INTEGER in the Rental table, too).

b. Execute a DESCRIBE statement for each table to show its general structure.

II. Load data into the tables.

a. Insert the sample data from Project 1 into each table, making sure to commit the rows.

b. After all rows have been inserted, run a SELECT statement on each table to list all contents (all columns and all rows).

III. Execute the transactions below to modify/add to the data entered in the previous step, making sure commit the transactions.

PATIENT table

Change the phone number of Patient 15 to 2145551234

Add Patient 120, Amanda Green, no phone number

BLOCK_LEVEL table

Add BlockLevelCode 5, 45 minutes

REASON_CODE table

ReasonCode CSW, Complete Spinal Workup

INS_CO table

Add InsCoID 324, Cigna

APPOINTMENT table

Change the date for appointments 109, 110, and 111 to 9/2/2018

Add an appointment:

ApptID ApptDate ApptTime PatientID BillType InsCo DrID ApptStatus

112 9/3/2018 10:30 120 WC 324 2 NC

APPT_DETAIL table

Add appointment details:

ApptID ReasonCode BlockLevelID

112 NP 1

112 CSW 5

IV. Execute a SELECT statement on each of the tables, sorting by PK, to list the final data.

PATIENT REASON ApptReasonCode ApptReaonDesc Patient!D PatientFName PatientLName PatientPhone APPTDETAIL APPOINTMENT ApptiD ApptReasonCode BlockCode ApptID ApptDate ApptTime PatientiD DoctorlD BillingType InsColD ApptStatusCode DOCTOR 0O DoctorlD DoctorFName DoctorLName BLOCK 0O0 BlockCode BlockDesc BlockTime BILLINGTYPE BillingType BillingTypeDesc INSCO InsColD InsCoName STATUS ApptStatusCode ApptStatusDesc PATIENT REASON ApptReasonCode ApptReaonDesc Patient!D PatientFName PatientLName PatientPhone APPTDETAIL APPOINTMENT ApptiD ApptReasonCode BlockCode ApptID ApptDate ApptTime PatientiD DoctorlD BillingType InsColD ApptStatusCode DOCTOR 0O DoctorlD DoctorFName DoctorLName BLOCK 0O0 BlockCode BlockDesc BlockTime BILLINGTYPE BillingType BillingTypeDesc INSCO InsColD InsCoName STATUS ApptStatusCode ApptStatusDesc

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

Beyond Big Data Using Social MDM To Drive Deep Customer Insight

Authors: Martin Oberhofer, Eberhard Hechler

1st Edition

0133509796, 9780133509793

More Books

Students also viewed these Databases questions

Question

Explain the function and purpose of the Job Level Table.

Answered: 1 week ago