Need help with the SQL In Microsoft Access, create and populate the following th
ID: 3577672 • Letter: N
Question
Need help with the SQL
In Microsoft Access, create and populate the following three database tables including foreign keys, using SQL. Save all queries in the database. Assume the ID for each table is the primary key. Assume all fields are required. Assume all fields that contain only numbers are numeric type. Save the database as Personnel. accdb. Once the tables have been created, encrypt the database with a password. Be sure the password is strong. It should be at least 16 characters in length, and contain at least one of each of the following: upper-case letters, lower-case letters, numbers, and special characters. Submit the Personnel.accdb file. Submit the password in the comments section of the assignment submission area.Explanation / Answer
Here goes the required queries as mentioned in the question
Queries:
CREATE TABLE employees{
employeeid INT,
employeeLastName VARCHAR(30) NOT NULL,
employeeFirstName VARCHAR(30) NOT NULL,
employeeDeptID INT NOT NULL,
employeeMgrID INT NOT NULL,
PRIMARY KEY(employeeid)
}
INSERT INTO employees VALUES (101,'Ward', 'Debbie', 202, 1);
INSERT INTO employees VALUES (102, 'Ables','Joe',203,3);
INSERT INTO employees VALUES (103,'Simmons','Brenda',201,4);
INSERT INTO employees VALUES (104,'Turner','Lau',202,5);
INSERT INTO employees VALUES (105,'Conwell','phil',205,2);
CREATE TABLE managers{
managerid INT,
managerLastName VARCHAR(30) NOT NULL,
managerDeptID INT NOT NULL,
PRIMARY KEY(managerid)
}
INSERT INTO managers VALUES (1,'Bunn',202);
INSERT INTO managers VALUES (2,'Norman',205);
INSERT INTO managers VALUES (3,'Kritz',203);
INSERT INTO managers VALUES (4,'Washington',201);
INSERT INTO managers VALUES (5,'Muller',202);
CREATE TABLE departments{
departmentid INT,
departmentName VARCHAR(30) NOT NULL,
departmentLocation VARCHAR(30) NOT NULL,
PRIMARY KEY(departmentid)
}
INSERT INTO departments VALUES (201,'Accounting','Suite 315');
INSERT INTO departments VALUES (202,'Customer Service','Suite 303');
INSERT INTO departments VALUES (203,'IT','Floor 2');
INSERT INTO departments VALUES (204,'Marketing','Suite 322');
INSERT INTO departments VALUES (205,'Human Resources','Suite 301');
Explanation:
Related Questions
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.