Create the sql code to insert the data

Assignment Help Computer Engineering
Reference no: EM133694881

Question: Create the SQL Code to insert the data for each of the tables in the database provided in the pictures. I will provide the SQL code used to create the tables as well in case its needed. You can ignore the Dependent tables data, as that one has not been created yet.

SQL CODE USED TO CREATE THE TABLES:

CREATE TABLE EMPLOYEE_maw
(SSN_Number CHAR(9) NOT NULL,
First_Name VARCHAR(15) NOT NULL,
Mid_Name CHAR,
Last_Name VARCHAR(15) NOT NULL,
Birthday DATE,
Address VARCHAR(50),
Gender CHAR CHECK (Gender IN ('M', 'F', 'm', 'f')),
Salary DECIMAL DEFAULT 80000,
Supervisor_SSN CHAR(9),
Department_Number INT,
CONSTRAINT EMPLOYEE_PK PRIMARY KEY(SSN_Number),
CONSTRAINT EMPLOYEE_FK FOREIGN KEY(Supervisor_SSN) REFERENCES EMPLOYEE_maw(SSN_Number));

CREATE TABLE DEPARTMENT_maw
(Department_Name VARCHAR(15) NOT NULL,
Department_Number INT NOT NULL,
Manager_SSN CHAR(9) NOT NULL,
ManageStartDate DATE,
PRIMARY KEY (Department_Number),
CONSTRAINT DEPARTMENT_FK FOREIGN KEY (Manager_SSN) REFERENCES EMPLOYEE_maw (SSN_Number));

CREATE TABLE DEPT_LOCATION_maw
(Department_Number INT,
Department_Location VARCHAR(15),
CONSTRAINT PK_DEPT_LOCATION PRIMARY KEY (Department_Number),
CONSTRAINT FK_DEPT_LOCATION_DEPARTMENT FOREIGN KEY (Department_Number) REFERENCES DEPARTMENT_maw (Department_Number) ON DELETE CASCADE);

CREATE TABLE PROJECT_maw
(Project_Name VARCHAR(15) UNIQUE NOT NULL,
Project_Number INT PRIMARY KEY,
Project_Location VARCHAR(15),
Department_Number INT,
CONSTRAINT PROJECT_maw_FK FOREIGN KEY (Department_Number) REFERENCES DEPARTMENT_maw(Department_Number));

CREATE TABLE PROJECT_ASSIGNMENT_maw
(Employee_SSN CHAR(9),
Project_Number INT,
Hours DECIMAL(3, 1) NOT NULL,
CONSTRAINT PROJECT_ASSIGNMENT_maw_PK PRIMARY KEY (Employee_SSN, Project_Number),
CONSTRAINT PROJECT_ASSIGNMENT_maw_EMP_FK FOREIGN KEY (Employee_SSN) REFERENCES EMPLOYEE_maw(SSN_Number) ON DELETE CASCADE,
CONSTRAINT PROJECT_ASSIGNMENT_maw_PROJ_FK FOREIGN KEY (Project_Number) REFERENCES PROJECT_maw(Project_Number) ON DELETE CASCADE);

Reference no: EM133694881

Questions Cloud

Should social media sites have the right to locate : Should social media sites have the right to locate where you are at all times or as a user should you have the right to turn off those services?
Reduced oral food consumption capacity : Reduced Oral Food Consumption Capacity and Distaste for Nasogastric Tube Feeding are linked to Reduced Nutritional Intake.
Which phase of the kill chain are you mitigating : As part of your response to a network intrusion, you revoke a set of compromised user credentials. Which phase of the kill chain are you mitigating
How does applying statistical techniques for measuring : How does applying statistical techniques for measuring and controlling reliability, maintainability, and availability contribute to quality assurance
Create the sql code to insert the data : Create the SQL Code to insert the data for each of the tables in the database provided in the pictures. I will provide the SQL code used
What is pulmonary ventilation : What is pulmonary ventilation? What functions does the nose perform? What structures perform/contribute to these functions?
Coding denial or abstracting the correct codes : As a coder, there are times we feel frustrated with resolving a claim, coding denial or abstracting the correct codes.
Create three 1gb thin provisioned disks : Create three 1GB THIN PROVISIONED disks for your VM and rescan the SCSI adapter to enumerate the disks on vmware
Analysis of health policies or legislation : Analysis of health policies or legislation to address the issue: What policies have been proposed to address this issue?

Reviews

Write a Review

Computer Engineering Questions & Answers

  Mathematics in computing

Binary search tree, and postorder and preorder traversal Determine the shortest path in Graph

  Ict governance

ICT is defined as the term of Information and communication technologies, it is diverse set of technical tools and resources used by the government agencies to communicate and produce, circulate, store, and manage all information.

  Implementation of memory management

Assignment covers the following eight topics and explore the implementation of memory management, processes and threads.

  Realize business and organizational data storage

Realize business and organizational data storage and fast access times are much more important than they have ever been. Compare and contrast magnetic tapes, magnetic disks, optical discs

  What is the protocol overhead

What are the advantages of using a compiled language over an interpreted one? Under what circumstances would you select to use an interpreted language?

  Implementation of memory management

Paper describes about memory management. How memory is used in executing programs and its critical support for applications.

  Define open and closed loop control systems

Define open and closed loop cotrol systems.Explain difference between time varying and time invariant control system wth suitable example.

  Prepare a proposal to deploy windows server

Prepare a proposal to deploy Windows Server onto an existing network based on the provided scenario.

  Security policy document project

Analyze security requirements and develop a security policy

  Write a procedure that produces independent stack objects

Write a procedure (make-stack) that produces independent stack objects, using a message-passing style, e.g.

  Define a suitable functional unit

Define a suitable functional unit for a comparative study between two different types of paint.

  Calculate yield to maturity and bond prices

Calculate yield to maturity (YTM) and bond prices

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd