Professional Documents
Culture Documents
DB Lab-4 - (356324)
DB Lab-4 - (356324)
CMS: 356324
Submitted to: Waqas Ahmed
12-11-2020
DATABASE SYSTEMS
LAB-4
TASKS
Task-1: Insert 10 record into DEPARTMENT table, which is created in previous Lab.
STEPS
First we take the same table “DEPARTMENT” from the last lab database
then we insert 10 records as mentioned above
Task-3: Update the EMPLOYEE table to set the commission of all employees to Rs
1800/- who are working as MANAGER
STEPS
First, we take the same table “EMPLOYEE” from the last lab database
After inserting the data, we update it.
Update the commission of all the managers to Rs1800/- by using the Update and Set
command
Task-4: Create a pseudo table EMPLOYEE_2 with the same structure as the table
EMPLOYEE and insert rows into the table using select clauses.
STEPS
First, we take the same table “EMPLOYEE” from the last lab database
To create a duplicate table we use the “create table as select” command
Another table will be created “Employee_2” with the same records.
STEPS
First, we take the same table “EMPLOYEE” from the last lab database
Now we delete all the records who are “QASIM” by using the delete command.
The results are shown
STEPS
First, we take the same table “EMPLOYEE” from the last lab database
Now we sort the entries of Job decription in Ascending order first and the descending
order as shown using the Select order by command.
Task-8 : Display JOBS from the EMPLOYEE table avoiding the duplicated
values.
STEPS
First, we take the same table “EMPLOYEE” from the last lab database
Now we remove all the duplicate records in the job entity using the Select Distinct
command
The results are shown
Task-9 : Create the schema, where we can store multiple files against
one user.
STEPS
First, we create a Database
Then we create a table “userdata” for a user with all its details as entities
Then we create another table “DOCUMENTS” and enter the details of the users
documents.
The results are shown
=====================================================================================
THANK YOU