Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

Please answer all of the questions listed below for full points. Thank you! In a

ID: 3553130 • Letter: P

Question

Please answer all of the questions listed below for full points. Thank you!

In a text file, in the first line, indicate the DBMS system that you use for this assignment. Then save the SQL statements for questions (1) - (5) in the text file. Create the Employee table using the integrity enhancement features of SQL. empNo has a fixed length of 5 characters. fName and IName each have a variable number of characters up to a maximum of 20. address has a variable number of characters up to a maximum of 40. DOB is a variable with DATE type, sex must be one of the single characters 'M' or 'F' position is a variable number of characters up to a maximum of 20 and it's value must be one of 'Manager', 'Team Leader', 'Analyst', or 'Software Developer'. All of the columns except address should not be NULL.

Explanation / Answer

1)

CREATE TABLE Employee

(

empNo char(5),

fName varchar(20),

lName varchar(20),

address varchar(40) NOT NULL,

DOB date,

sex varchar(1),

position char(20)

);


2)

CREATE TABLE Department

(

projNo char(5) NOT NULL,

deptName varchar(20) NOT NULL,

);


3)

CREATE TABLE Project

(

deptNo char(5) NOT NULL,

deptName varchar(20) NOT NULL,

);


4)

CREATE TABLE WorksOn

(

dateWorked date NOT NULL,

hoursWorked int(5) NOT NULL,

);

5)INSERT INTO Employee(empNo,

fName,

lName ,

address,

DOB ,

sex ,

position

)VALUES (5,Tom, Jon,USA,20-03-1990,M,Manager);

like this you can insert into another table

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote