write Command to insert data into  this tables create table patients ( patient_id VARCHAR(255), `name` VARCHAR(255), `insurance` DECIMAL(15,2), `date_admitted` DATE, `date_checked_out` DATE, PRIMARY KEY(`patient_id`) ); create table doctor ( doctor_id VARCHAR(255), name VARCHAR(255), specialization VARCHAR(255), PRIMARY KEY (doctor_id) ); create table `test` ( `test_id` VARCHAR(255), `test_name` VARCHAR(255), `test_date` DATE, `test_time` TIME, `result` VARCHAR(255), PRIMARY KEY(`test_id`) ); create table doctor_patient ( patient_id VARCHAR(255), doctor_id VARCHAR(255), PRIMARY KEY(`patient_id`), FOREIGN KEY(`doctor_id`) REFERENCES doctor(`doctor_id`) ); create table test_log ( `test_log_id` varchar(255), `patient_id` VARCHAR(255), `test_id` VARCHAR(255), `doctor_id` VARCHAR(255), `comments` VARCHAR(255), PRIMARY KEY(`test_log_id`), FOREIGN KEY(`test_id`) REFERENCES `test`(`test_id`), FOREIGN KEY(`patient_id`) REFERENCES doctor_patient(`patient_id`), FOREIGN KEY(`doctor_id`) REFERENCES doctor(`doctor_id`) );

Oracle 12c: SQL
3rd Edition
ISBN:9781305251038
Author:Joan Casteel
Publisher:Joan Casteel
Chapter3: Table Creation And Management
Section: Chapter Questions
Problem 4HOA: Modify the Job_class column of the EMPLOYEES table so that it allows storing a maximum width of two...
icon
Related questions
icon
Concept explainers
Question

write Command to insert data into  this tables

create table patients (
patient_id VARCHAR(255),
`name` VARCHAR(255),
`insurance` DECIMAL(15,2),
`date_admitted` DATE,
`date_checked_out` DATE,
PRIMARY KEY(`patient_id`)
);


create table doctor (
doctor_id VARCHAR(255),
name VARCHAR(255),
specialization VARCHAR(255),
PRIMARY KEY (doctor_id)
);

create table `test` (
`test_id` VARCHAR(255),
`test_name` VARCHAR(255),
`test_date` DATE,
`test_time` TIME,
`result` VARCHAR(255),
PRIMARY KEY(`test_id`)
);

create table doctor_patient
(
patient_id VARCHAR(255),
doctor_id VARCHAR(255),
PRIMARY KEY(`patient_id`),
FOREIGN KEY(`doctor_id`) REFERENCES doctor(`doctor_id`)

);

create table test_log
(
`test_log_id` varchar(255),
`patient_id` VARCHAR(255),
`test_id` VARCHAR(255),
`doctor_id` VARCHAR(255),
`comments` VARCHAR(255),
PRIMARY KEY(`test_log_id`),
FOREIGN KEY(`test_id`) REFERENCES `test`(`test_id`),
FOREIGN KEY(`patient_id`) REFERENCES doctor_patient(`patient_id`),
FOREIGN KEY(`doctor_id`) REFERENCES doctor(`doctor_id`)
);

 

Expert Solution
steps

Step by step

Solved in 6 steps with 10 images

Blurred answer
Knowledge Booster
Query Syntax
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
Oracle 12c: SQL
Oracle 12c: SQL
Computer Science
ISBN:
9781305251038
Author:
Joan Casteel
Publisher:
Cengage Learning
A Guide to SQL
A Guide to SQL
Computer Science
ISBN:
9781111527273
Author:
Philip J. Pratt
Publisher:
Course Technology Ptr