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

file only SQL script Q1. Create database Project Monitoring. Q2. Create the sche

ID: 3715860 • Letter: F

Question

file only SQL script

Q1. Create database Project Monitoring.

Q2. Create the schema / relation given above using Project Monitoring.

Q3. Insert 4 rows of records in each table.

Q4. Show the structure of the Visitor_Information table

Q5. Retrieve/ Display all the information from each of tables created.

Q6. Write an update for Visitor 116 to update his City to ‘Subang Jaya’

Q7. Write an update for the Project Id 123 change the start date to current date.  

Lab 4: Deployment (Data Definition Language) Visitor Information PK Visitor ID Employee Type EmployeeTable Company Name Visitor_ LName Visitor FName Address1 Address2 City Country Zip Code Phone1 Phone2 Fax Email Memo --HPK Empolyee_Type Employee_Name Employee_Password Empolyee_Username FK1 Empolyee Type ID Event Status Event Project Information PK Event ID -HPK Status ID PK Project ID Status Type Request Date Memo Project Name Project Start Date Project_End_Date Project Memo FK1 Visitor ID FK2 Project ID FK3 Event Type ID FK4 Status ID FK1 Employee_ID Event Type Event Type askd

Explanation / Answer


file only SQL script
Q1. Create database Project Monitoring.
CREATE DATABASE`projectmonitoring` ;

Q2. Create the schema / relation given above using Project Monitoring.
CREATE TABLE `projectmonitoring`.`visitor_information` (
`Id` INT NOT NULL,
`visitorName` VARCHAR(45) NULL,
`visitorCity` VARCHAR(45) NULL,
`visitorAdress` VARCHAR(45) NULL,
PRIMARY KEY (`Id`));
  
  
Q3. Insert 4 rows of records in each table.
INSERT INTO `projectmonitoring`.`visitor_information` (`Id`, `visitorName`, `visitorCity`, `visitorAdress`) VALUES ('1', 'Chandramouil', 'Hyerbad', 'India');
INSERT INTO `projectmonitoring`.`visitor_information` (`Id`, `visitorName`, `visitorCity`, `visitorAdress`) VALUES ('2', 'Kranthi', 'Delhi', 'New Delhi');
INSERT INTO `projectmonitoring`.`visitor_information` (`Id`, `visitorName`, `visitorCity`, `visitorAdress`) VALUES ('3', 'Indu', 'Mumbai', 'New Mumbai');
INSERT INTO `projectmonitoring`.`visitor_information` (`Id`, `visitorName`, `visitorCity`, `visitorAdress`) VALUES ('4', 'Bindu', 'Pune', 'New Pune');
Q4. Show the structure of the Visitor_Information table
DESCRIBE projectmonitoring.visitor_information;
Q5. Retrieve/ Display all the information from each of tables created.
SELECT * FROM projectmonitoring.visitor_information;
Q6. Write an update for Visitor 116 to update his City to ‘Subang Jaya’
UPDATE `projectmonitoring`.`visitor_information` SET `visitorCity`='Subang Jaya' WHERE `Id`='116';
Q7. Write an update for the Project Id 123 change the start date to current
UPDATE `projectmonitoring`.`visitor_information` SET `createdate`='2018-04-25 13:10:11.00000' WHERE `Id`='22';