Database Management System Lab (20IC208P)
Pandit Deendayal Energy University
School of Technology
Department of ICT
Even Semester 2024
PRACTICAL LIST
Sr AIM of the Practical Date Remark
No
Create the below given table and insert the data accordingly. Create Table
i. Job (job_id, job_title, min_sal, max_sal)
a. Job_id: VARCHAR(15);
b. Job_title: VARCHAR(30);
c. Min_sal: DECIMAL(7,2);
d. Max_sal: DECIMAL(7,2);
ii. Create table Employee (emp_no, emp_name, emp_sal,
emp_comm, dept_no)
a. Emp_no: INT (3);
b. Emp_name: VARCHAR(12);
c. Emp_sal: DECIMAL(8,2);
d. Emp_comm: DECIMAL(10,0);
e. Dept_no: INT (5);
iii. Create table Deposit (acc_no, city_name, branch_name, amount,
a_date).
a. acc_no: INT(3);
b. city_name: VARCHAR(12);
3 c. branch_name: VARCHAR(8);
d. amount: DECIMAL(10,0);
e. a_date: DATE;
iv. Create table Borrow (loanno, cname, bname, amount).
a. loan_no: INT (3); ** keep combination of both
b. city_name: VARCHAR(12);
c. branch_name: VARCHAR(8);
d. amount: DECIMAL(10,0);
v. Insert following values in the table Employee.
vi. Insert following values in the table Job.
Database Management System Lab (20IC208P)
vii. Insert following values in the table Deposit.
Acc_no CNAME Branch_name Amount Date
201 Anil VRCE 6500.00 01/01/2006
202 Mehul Ajni 9800.00 15/07/2006
203 Sunil Dharampeth 5440.00 12/03/2006
204 Madhuri Andheri 8980.00 17/09/2006
205 Pramod Vihar 9950.00 19/11/2006
206 Kranti Nehru place 8950.00 21/12/2006
Perform following queries
(1) Retrieve all data from employee, jobs and deposit.
(2) Give details of account no. and deposited rupees of customers
having account opened between dates 01-01-06 and 25-07-06.
(3) Display all jobs with minimum salary is greater than 4000.
(4) Display name and salary of employee whose department no is 20.
Give alias name to name of employee.
(5) Display employee no, name and department details of those
employee whose department lies in (10, 20).
(6) Display the non-null values of employees.
(7) Display name of customer along with its account no (both column
should be displayed as one) whose amount is not equal to 8000 Rs.
(8) Display the content of job details with minimum salary either 2000
or 4000.
To study various options of LIKE predicate
(1) Display all employee whose name start with ‘A’ and third character
is ‘a’.
(2) Display name, number and salary of those employees whose name is
5 characters long and first three characters are ‘Ani’.
(3) Display all information of employee whose second character of name
is either ‘M’ or ‘N’.
(4) Find the list of all customer name whose branch is in ‘andheri’ or
‘dadar’ or ‘virar’.
(5) Display the job name whose first three character in job id
(6) field is ‘FI_’.
(7) Display the title/name of job whose last three character are ‘_MGR’
and their maximum salary is greater than Rs 12000.
Database Management System Lab (20IC208P)
(8) Display the non-null values of employees and also employee name
second character should be ‘n’ and string should be 5- character long.
(9) Display the null values of employee and also employee name’s third
character should be ‘a’.
(10) What will be output if you are giving LIKE predicate as ‘%\_%’
ESCAPE ‘\’