Professional Documents
Culture Documents
Practical List
Academic Year : 2021-22 Semester : 4
Course code : CE246 Course name : DATABASE MANAGEMENT
SYSTEM
Note: Practical List is for Students. We need to cover concept require to implement respective
practical.
Sr.
No. Practical 1
1. To study DDL-create and DML-insert commands
Write the following simple SQL Queries on the University
Dataset –
1. Find the names of all the students whose total credits
are greater than 100
2. Find the course id and grades of all courses taken by
any student named 'Tanaka'
3. Find the ID and name of instructors who have taught a
course in the Comp. Sci. department, even if they are
themselves not from the Comp. Sci. department. To
test this query, make sure you add appropriate data,
and include the corresponding insert statements along
with your query.
Find the courses which are offered in both 'Fall' and 'Spring' semester
(not necessarily in the same year).
Page 1 of 6
CE246 DATABASE MANAGEMENT 20CE158
SYSTEM Pratham Patel
MY QUERIES :-
QUERY 1:
Page 2 of 6
CE246 DATABASE MANAGEMENT 20CE158
SYSTEM Pratham Patel
QUERY 2
Page 3 of 6
CE246 DATABASE MANAGEMENT 20CE158
SYSTEM Pratham Patel
QUERY 3
Page 4 of 6
CE246 DATABASE MANAGEMENT 20CE158
SYSTEM Pratham Patel
Page 5 of 6
CE246 DATABASE MANAGEMENT 20CE158
SYSTEM Pratham Patel
Page 6 of 6
CE246 DATABASE MANAGEMENT 20CE158
SYSTEM Pratham Patel
Practical List
Academic Year : 2021-22 Semester : 4
Course code : CE246 Course name : DATABASE MANAGEMENT
SYSTEM
Note: Practical List is for Students. We need to cover concept require to implement respective
practical.
Sr.
No. Practical 2
2. To study DDL-create and DML-insert commands with
constraints
Write the following simple SQL Queries on the University
Schema Railway Schema - Bottom Up Approach
1. Find pairs of stations (station codes) that have a track
(direct connection) with distance less than 20Kms
between them.
2. Find the IDs of all the trains which have a stop at
THANE
3. Find the names of all trains that start at MUMBAI.
4. List all the stations in order of visit by the train 'CSTAMR_LOCAL'.
5. Find the name of the trains which have stop at Thane,
before the 6th station in the route of the train.
Page 1 of 5
CE246 DATABASE MANAGEMENT 20CE158
SYSTEM Pratham Patel
MY QUERIES :-
drop table trainhalts;
drop table train;
drop table track;
drop table station;
Page 2 of 5
CE246 DATABASE MANAGEMENT 20CE158
SYSTEM Pratham Patel
Page 3 of 5
CE246 DATABASE MANAGEMENT 20CE158
SYSTEM Pratham Patel
QUERY 1
QUERY 2
Page 4 of 5
CE246 DATABASE MANAGEMENT 20CE158
SYSTEM Pratham Patel
QUERY 3
QUERY 4
QUERY 5
Page 5 of 5
CE246 DATABASE MANAGEMENT 20CE158
SYSTEM Pratham Patel
Practical List
Academic Year : 2021-22 Semester : 4
Course code : CE246 Course name : DATABASE MANAGEMENT
SYSTEM
Note: Practical List is for Students. We need to cover concept require to implement respective
practical.
Sr.
No. Practical 3
3. To study various options of like predicate and some Built in Functions
Create table job (job_id, job_title, min_sal, max_sal)
Create table employee (emp_no, emp_name, emp_sal,
emp_comm, dept_no)
Create table deposit (a_no,cname,bname,amount,a_date).
Create table borrow (loanno,cname,bname,amount).
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 employee’s commission.
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.
Page 1 of 16
CE246 DATABASE MANAGEMENT 20CE158
SYSTEM Pratham Patel
MY QUERIES :-
Create table tbl_Job (job_id varchar(20), job_title varchar(20), min_sal int, max_sal int);
Create table tbl_Employee (emp_no int, emp_name varchar(30), emp_sal int,
emp_commission varchar(30), dept_no int);
Create table tbl_Deposit (account_no varchar(30),customer_name
varchar(30),branch_name varchar(30),amount int,account_date date);
Create table tbl_Borrow (loanno varchar(30),customer_name varchar(30),branch_name
varchar(30),amount int);
Page 2 of 16
CE246 DATABASE MANAGEMENT 20CE158
SYSTEM Pratham Patel
Page 4 of 16
CE246 DATABASE MANAGEMENT 20CE158
SYSTEM Pratham Patel
Page 5 of 16
CE246 DATABASE MANAGEMENT 20CE158
SYSTEM Pratham Patel
Page 6 of 16
CE246 DATABASE MANAGEMENT 20CE158
SYSTEM Pratham Patel
QUERY 1
Page 7 of 16
CE246 DATABASE MANAGEMENT 20CE158
SYSTEM Pratham Patel
Page 8 of 16
CE246 DATABASE MANAGEMENT 20CE158
SYSTEM Pratham Patel
Page 9 of 16
CE246 DATABASE MANAGEMENT 20CE158
SYSTEM Pratham Patel
QUERY 2
Page 10 of 16
CE246 DATABASE MANAGEMENT 20CE158
SYSTEM Pratham Patel
QUERY 3
QUERY 4
QUERY 5
Page 11 of 16
CE246 DATABASE MANAGEMENT 20CE158
SYSTEM Pratham Patel
QUERY 6
QUERY 7
Page 12 of 16
CE246 DATABASE MANAGEMENT 20CE158
SYSTEM Pratham Patel
QUERY 8
QUERY 9
QUERY 10
Page 13 of 16
CE246 DATABASE MANAGEMENT 20CE158
SYSTEM Pratham Patel
QUERY 11
QUERY 12
QUERY 13
Page 14 of 16
CE246 DATABASE MANAGEMENT 20CE158
SYSTEM Pratham Patel
QUERY 14
QUERY 15
QUERY 16
QUERY 17
Page 15 of 16
CE246 DATABASE MANAGEMENT 20CE158
SYSTEM Pratham Patel
Page 16 of 16