Savitribai Phule Pune University, Pune Department of
Technology, B.Sc (Data Science)
SEMESTER - II
Subject Name : DATABASE MANAGEMENT
SYSTEM
Full Name : DISHA SUNIL BHOSALE
Roll No : BSC24DS45
Submission Date : 2 .04.2025
Internal Examiner External Examiner
Course coordinator
Signature Signature
Signature
Index
SR. Topic Date of Signat
No. Practica ure
l
1 Execute DDL Commands to
manage database using SQL
2 Execute DML Commands to
manipulate data using SQL
3 Execute DCL Commands to
control the access to data
using SQL
4 Execute TCL Commands to
control transactions on data
using SQL
5 Implement Queries
usingArithmetic operators
6 Apply built-in Logical
operators & Relational
Operators on given data
7 Write Queries to implement
SET operations using SQL
8 Execute queries using String
functions
9 Execute queries using
Arithmetic functions
10 Implement queries using
EXPERIMENT NO – 1
Aim – Execute DDL Commands to manage database using SQL
1 Create Database college
2. Create table students(sid,sname,sdiv,DOB,smarks,)
3. Insert 5 Records in Table Students
4. Add Column ‘College’ With Default Value ‘SPPU’
5. Rename Table name from ‘students’ to ‘Fy_Students’
6. Truncate Table Students
7. Drop Table Students
COMMANDS:-
1.Create Database college:-
2. Create table students(sid,sname,sdiv,DOB,smarks,)
3. Insert 5 Records in Table Students
4. Add Column ‘College’ With Default Value ‘SPPU’
5. Rename Table name from ‘students’ to ‘Fy_Students’
6. Truncate Table Students
7. Drop Table Students
Learning:-
EXPERIMENT NO – 2
Aim – Execute DML Commands to manipulate data using SQL
1. Use Table ‘Myemp’
2. Remove employee of id 103,107
3. Remove employee of ‘FI_ACCOUNT’ department
4. Update salary of employee by 20% by whose dept is ‘PU_CLERK’
5. Update salary of employee by 10% by whose dept is ‘IT_PROG’ and salary >
15000
6. Add column country
7. Update value in country column ‘INDIA’ for each record
Commands:-
1.Use Table ‘Myemp’
2. Remove employee of id 103,107-
3. Remove employee of ‘FI_ACCOUNT’ department-
4. Update salary of employee by 20% by whose dept is
‘PU_CLERK’
5. Update salary of employee by 10% by whose dept is
‘IT_PROG’ and salary > 15000
6. Add column country
7. Update value in country column ‘INDIA’ for each record
OUTPUT:-
LEARNING:-
EXPERIMENT NO – 3
Aim – Execute DCL Commands to control the access to data using SQL
1. create table emp(eid,ename,company)
2. insert 2 records in table emp
3. grant select and insert privilege to user 'user1'
4. login in 'Command Prompt' with new user_id and password
'user1'
5. insert record being user 'user1'
6. display the records
7. insert one record being user 'user_1'
8. use delete
9. Revoke privileges from user1
Commands:
1. create table emp(eid,ename,company)-
2. insert 2 records in table emp
2. grant select and insert privilege to user 'user1'
4. login in 'Command Prompt' with new user_id and password
'user1'
5. insert record being user 'user1'
6. display the records
7. insert one record being user 'user_1'
8. use delete
9. Revoke privileges from user1
EXPERIMENT NO – 6
Aim – Apply built-in Logical operators & RelationalOperators on
given data
1. Use ‘myemp’ table
2. Use Relational Operator (>,<,<=,>=,!=,<>)
3. Use Logical Operators(and, or, between, in, like)
4. Display the Data of employees who’s job id is ‘SA’ and Salary is greater than
10000
5. Find names of employees who are hired between year ‘2000’ and ‘2005’
Commands:
1. Use ‘myemp’ table:-
2. Use Relational Operator (>,<,<=,>=,!=,<>)
3. Use Logical Operators(and, or, between, in, like)
4. Display the Data of employees who’s job id is ‘SA’ and Salary
is greater than 10000
5. Find names of employees who are hired between year ‘2000’
and ‘2005’
LEARNING
EXPERIMENT NO – 8
Aim – Execute queries using String functions
1. Use table ‘myemp’
2. String Functions (Lower, Upper, Replace, left-trim, right-trim, substring,
Length,
rename,Concat, )
3. Combine to columns in myemp table ‘First_name’ and ‘Last_name’
column
4. Give Hire_date in format – ‘dd-mm-yyyy’
COMMANDS:-
1. Use table ‘myemp’
2. String Functions (Lower, Upper, Replace, left-trim, right-trim,
substring, Length,
2. Combine to columns in myemp table ‘First_name’ and
‘Last_name’ column
4. Give Hire_date in format – ‘dd-mm-yyyy’
LEARNING-
EXPERIMENT NO – 9
Aim – Execute queries using Numeric functions
1. Use table ‘myemp’
2. Numeric functions (Absolute, ceiling, floor, modulo, round off,
square, Square
Root, power)
COMMANDS:-
1.Use table ‘myemp’:-
2. Numeric functions (Absolute, ceiling, floor, modulo, round off,
square, Square
Root, power):-
LEARNING:-
EXPERIMENT NO – 10
Aim – Implement queries using Aggregate functions
1. Use table ‘myemp’
2. Use Aggregate Functions(AVG(),MIN(),MAX(),SUM(),COUNT())
3. Find max salary in job id ‘SA_man’
4. Find count of Employee who are hire in year ‘1987’,’1985’,2000
Commands:-
1. Use table ‘myemp’
2. Use Aggregate
Functions(AVG(),MIN(),MAX(),SUM(),COUNT())
3. Find max salary in job id ‘SA_man’
4. Find count of Employee who are hire in year
‘1987’,’1985’,2000
LEARNING:-
EXPERIMENT NO – 11
Aim – Execute Queries for ordering and grouping data.
1. Use table ‘MYEMP’
2. Sort all the Data in Alphabetical order on the basis of First_name
3. Find employees with top 10 highest salary
4. Find 3 rd lowest salary in myemp table
5. Find average of each department using group by in myemp table
6. Find department whose max salary greater than 10000
Commands:
1. Use table ‘MYEMP’
2. Sort all the Data in Alphabetical order on the basis of
First_name
3. Find employees with top 10 highest salary
4. Find 3 rd lowest salary in myemp table
5. Find average of each department using group by in myemp
table
6. Find department whose Max salary greater than 10000
LEARNING:-
EXPERIMENT NO – 12
Aim – Execute the queries based on joins
1. Use table books
2. Use table authors
3. Perform inner join on books and authors table
4. Perform left join on books and authors
5. Perform right join books on authors
6. Perform cross join on table DS_subject and BLC_subjects
Commands:
1. Use table books
2. Use table authors
3. Perform inner join on books and authors table
4. Perform left join on books and authors
5. Perform right join books on authors
6. Perform cross join on table DS_subject and BLC_subjects
LEARNING:-
EXPERIMENT NO – 7
Aim – Write Queries to implement SET operations using SQL
1. Create table DS_subjects(Scode,Sname)
2. Create table BLC_Subjects(Scode,Sname)
3. Perform Union
4. Perform Union all
5. Perform intersect
Commands:
-1. Create table DS_subjects(Scode,Sname)
2. Create table BLC_Subjects(Scode,Sname)
3. Perform Union
4. Perform Union all
5. Perform intersect
LEARNING:-
EXPERIMENT NO – 4
Aim – Execute TCL Commands to control transactions on data using SQL
1. Create table accounts(aid,AHolder_name,Balance)
2. Insert 2 records
3. Use commit command
4. Use rollback command
5. Use savepoint command
COMMANDS:-
1. Create table accounts(aid,AHolder_name,Balance)
2. Insert 2 records
3. Use commit command
4.Use rollback command
5. Use savepoint command
LEARNING:-
EXPERIMENT NO – 5
Aim – Execute queries using Arithmetic function
1. Use table ‘myemp’
2. Use arithmetic operator(+,/,*,-,%)
3. Update salary of employee by 20% by whose dept is ‘PU_CLERK’
COMMAND :-
1. Use table ‘myemp’
2. Use arithmetic operator(+,/,*,-,%)
3. Update salary of employee by 20% by whose dept is ‘PU_CLERK’
LEARNING:-