In Oracle SQL. Write and execute DDL statements that will create tables and rela
ID: 3891465 • Letter: I
Question
In Oracle SQL. Write and execute DDL statements that will create tables and relationships that match the ER diagram you created in previous modules. of the statements’ successful execution (one screenshot per successful DDL statement).
Peatic PK: Patient ID Allergies FK: Insurance Infomation Medical History Registered PK,FK: Patient ID Insurance Date Insurance Company PK: Insurance No PK: Insurance Information Fomulary Prior Authorization Forms Prior Authorization Criteria PK, F: Insurance No Provider PK: Demographics States Ällowed Specialty PK: Provider IDExplanation / Answer
Answer)
Created Table Patient:
CREATE TABLE Patient (
PatientID int NOT NULL,
Demographics varchar,
Allergies varchar,
InsuranceInformation varchar,
MedicalHistory varchar,
PRIMARY KEY (PatientID),
CONSTRAINT FK_Patient FOREIGN KEY (InsuranceInformation)
REFERENCES InsuranceCompany(InsuranceInformation),
CONSTRAINT FK_Patients FOREIGN KEY (Demographics)
REFERENCES Provider(Demographics)
);
Created table InsuranceCompany:
create table InsuranceCompany (
InsuranceNo int NOT NULL,
InsuranceInformation varchar,
Formulary varchar,
PriorAuthorizationForms varchar,
PriorAuthorizationCriteria varchar,
PRIMARY KEY (InsuranceNo,InsuranceInformation)
);
Created table Registered:
create table Registered (
PatientID int NOT NULL,
InsuranceNo int NOT NULL,
InsuranceDate date,
PRIMARY KEY (PatientID,InsuranceNo),
CONSTRAINT FK_Reg FOREIGN KEY (PatientID)
REFERENCES Patient(PatientID),
CONSTRAINT FK_Regs FOREIGN KEY (InsuranceNo)
REFERENCES InsuranceCompany(InsuranceNo)
);
Created table Provider:
create table Provider(
Demographics varchar not null,
StatesAllowed varchar,
Specialty varchar,
ProviderID varchar not null,
PRIMARY KEY (Demographics,ProviderID)
);
Output:
All SQL statements executed successfully and the above design in the ER diagram was created.
Related Questions
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.