Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

NEED HELP IN INSERT STATEMENTS FOR THE TABLES CAN YOU PLEASE ADD SOME INSERT STATEMENTS FOR A COMPANY SCHEMA SCRIPT. PLEASE ADN THANK YOU DROP

NEED HELP IN INSERT STATEMENTS FOR THE TABLES

CAN YOU PLEASE ADD SOME INSERT STATEMENTS FOR A COMPANY SCHEMA SCRIPT. PLEASE ADN THANK YOU

DROP TABLE dependent; DROP TABLE works_on; DROP TABLE project; DROP TABLE dept_locations; DROP TABLE department; DROP TABLE employee;

CREATE TABLE employee ( fname varchar(15) not null, minit varchar(1), lname varchar(15) not null, ssn char(9), bdate date, address varchar(50), sex char, salary numeric(10,2), superssn char(9), dno numeric, primary key (ssn), foreign key (superssn) references employee(ssn) );

CREATE TABLE department ( dname varchar(25) not null, dnumber numeric, mgrssn char(9) not null, mgrstartdate date, primary key (dnumber), unique (dname), foreign key (mgrssn) references employee(ssn) );

ALTER TABLE employee ADD foreign key (dno) references department(dnumber);

CREATE TABLE dept_locations ( dnumber numeric, dlocation varchar(15), primary key (dnumber,dlocation), foreign key (dnumber) references department(dnumber) );

CREATE TABLE project ( pname varchar(25) not null, pnumber numeric, plocation varchar(15), dnum numeric not null, primary key (pnumber), unique (pname), foreign key (dnum) references department(dnumber) );

CREATE TABLE works_on ( essn char(9), pno numeric, hours numeric(4,1), primary key (essn,pno), foreign key (essn) references employee(ssn), foreign key (pno) references project(pnumber) );

CREATE TABLE dependent ( essn char(9), dependent_name varchar(15), sex char, bdate date, relationship varchar(8), primary key (essn,dependent_name), foreign key (essn) references employee(ssn) );

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

Oracle 10g Database Administrator Implementation And Administration

Authors: Gavin Powell, Carol McCullough Dieter

2nd Edition

1418836656, 9781418836658

More Books

Students also viewed these Databases questions

Question

Does the research have to be based in an organisation?

Answered: 1 week ago

Question

Explain exothermic and endothermic reactions with examples

Answered: 1 week ago

Question

Write a short note on rancidity and corrosiveness.

Answered: 1 week ago

Question

2. Show the trainees how to do it without saying anything.

Answered: 1 week ago