0% found this document useful (0 votes)
4 views

Final DBMS Lab Report

This document is a lab report for the Database Management System course at VIT Bhopal University for the academic session 2024-25. It includes a list of team members, an index of experiments, and detailed descriptions of various labs focusing on command operations, data manipulation, and SQL queries. Each lab contains specific tasks and SQL commands related to database operations and practices.

Uploaded by

jay.23bai11391
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
4 views

Final DBMS Lab Report

This document is a lab report for the Database Management System course at VIT Bhopal University for the academic session 2024-25. It includes a list of team members, an index of experiments, and detailed descriptions of various labs focusing on command operations, data manipulation, and SQL queries. Each lab contains specific tasks and SQL commands related to database operations and practices.

Uploaded by

jay.23bai11391
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 28

VIT BHOPAL UNIVERSITY

Project:Lab Report

Academic Session:2024-25

Semester: Winter Semester

Subject:Database Management System

Instructor: Dr. Nilamadhab Mishra

Slot : B11+B12+B13
Team Members :

Sr. No. Names Registration No


1. Arya Poovaiah 23BAI10077
Machamada
2. Rishit Aggarwal 23BAI10329

3. Sanjivni Katiyar 23BAI10287


4. Samarth Sanjay 23BAI10454
Jadhav
5. Sonakshi Saxena 23BAI10191
6. Shivam Pandey 23BAI10608
7. Siya Zanwar 23BAI10582
8. Deepali Mittal 23BAI10645
9. Jay Kamavisdar 23BAI11391
10. Bhawna Chaurasia 23BAI10924
INDEX

Experiment No. Page Number


Lab 01 4
Lab 02 9
Lab 03 14
Lab 04 16
Lab 05 18
Lab 06 20
Lab 07 23
Lab 08 24
Lab 09 26
Lab 10 30
LAB - 01

Q.Try to practice all command operations of Dummy-table: DUAL through Oracle.

DUAL

2.
3.

4.
5.

6.
7.
8.

9.
LAB - 02

Q. Try to practice all command operations of following DDL.

Data Definition Language (DDL)

Commands

• CREATE

• ALTER

• TRUNCATE

• DROP

• RENAME

1.​ CREATE

2.​ ALTER
3.​ TRUNCATE
4.​ DROP
5.RENAME
LAB -03

Q. Data Manipulation Languages(DML) Commands

• INSERT

• UPDATE

• DELETE

1.​ INSERT
2.​ SELECT

3.​ UPDATE

4.​ DELETE
LAB - 04
Q. Data Query Language / Retrieval Language

• SELECT

1.​ SELECT
Lab - 05
Q. Q- How can I insert into table with different input using / ,with date
datatype?
LAB -06

Q.1. Find Out The Address Of The Employees Who Are Working In DBMS
Project.

2. List the DOB of the employees who are getting salary above 30,000.

3. Find out the dname of the employees whose initial name start with ‘Dr’.

4. Find out the highest salary of the employees who are working in DBMS project.

5. List the employee details whose project location is at Delhi.

6. Find out the average salary of the employees who are working in DBMS project.

7. Find out the department name of ‘Mr. Sam Das’.

8. Find out the project name of ‘Mr. Sam Das’.

9. Find out the project location of the employee having employee id=100133.

10. Find out the maximum salary among the male employees working in DBMS project.

11. Find out the second highest salary of the employees who are working in DBMS
project.

CREATE DATABASE ProjectWork;​



-- Employee Table​
CREATE TABLE EMPLOYEE (​
​ FName VARCHAR(20),​
​ Initial VARCHAR(5),​
​ LName VARCHAR(20),​
​ ENo INT PRIMARY KEY,​
​ DOB DATE,​
​ Address VARCHAR(100),​
​ Sex VARCHAR(10),​
​ Salary INT,​
​ Supereno INT,​
​ Dname VARCHAR(50) );​

-- Project Table​
CREATE TABLE PROJECT (​
​ PName VARCHAR(50),​
​ PNo INT PRIMARY KEY,​
​ PLocation VARCHAR(50),​
​ PCost INT,​
​ ENo INT REFERENCES EMPLOYEE(ENo)​
);​

-- Insert data into EMPLOYEE​
INSERT INTO EMPLOYEE VALUES ('Sam', 'Mr', 'Das', 100133,
'1990-05-12', 'Delhi', 'Male', 40000, NULL, 'IT');​
INSERT INTO EMPLOYEE VALUES ('John', 'Dr', 'Smith', 100134,
'1988-03-22', 'Mumbai', 'Male', 32000, NULL, 'Research');​
INSERT INTO EMPLOYEE VALUES ('Alice', 'Ms', 'Johnson', 100135,
'1992-11-10', 'Bangalore', 'Female', 28000, NULL, 'HR');​
INSERT INTO EMPLOYEE VALUES ('David', 'Mr', 'Brown', 100136,
'1985-01-25', 'Delhi', 'Male', 50000, NULL, 'IT');​
INSERT INTO EMPLOYEE VALUES ('Emily', 'Dr', 'Clark', 100137,
'1991-09-18', 'Chennai', 'Female', 35000, NULL, 'Research');​

-- Insert data into PROJECT​
INSERT INTO PROJECT VALUES ('DBMS', 1, 'Delhi', 200000, 100133);​
INSERT INTO PROJECT VALUES ('AI', 2, 'Mumbai', 300000, 100134);​
INSERT INTO PROJECT VALUES ('HRMS', 3, 'Bangalore', 150000,
100135);​
INSERT INTO PROJECT VALUES ('DBMS', 4, 'Delhi', 250000, 100136);​
INSERT INTO PROJECT VALUES ('Data Mining', 5, 'Chennai', 180000,
100137);​

SELECT EMPLOYEE.Address​
FROM EMPLOYEE, PROJECT​
WHERE EMPLOYEE.ENo = PROJECT.ENo​
AND PROJECT.PName = 'DBMS';​

SELECT DOB​
FROM EMPLOYEE​
WHERE Salary > 30000;​

SELECT Dname​
FROM EMPLOYEE​
WHERE Initial LIKE 'Dr%';​

SELECT MAX(Salary) AS Highest_Salary​
FROM EMPLOYEE, PROJECT​
WHERE EMPLOYEE.ENo = PROJECT.ENo​
AND PROJECT.PName = 'DBMS';​

SELECT *​
FROM EMPLOYEE, PROJECT​
WHERE EMPLOYEE.ENo = PROJECT.ENo​
AND PROJECT.PLocation = 'Delhi';​

SELECT AVG(Salary) AS Average_Salary​
FROM EMPLOYEE, PROJECT​
WHERE EMPLOYEE.ENo = PROJECT.ENo​
AND PROJECT.PName = 'DBMS';​

SELECT Dname​
FROM EMPLOYEE​
WHERE FName = 'Sam'​
AND Lname = 'Das'​
AND Initial = 'Mr';​

SELECT PName​
FROM EMPLOYEE, PROJECT​
WHERE EMPLOYEE.ENo = PROJECT.ENo​
AND FName = 'Sam'​
AND Lname = 'Das'​
AND Initial = 'Mr';​

SELECT PLocation​
FROM PROJECT​
WHERE ENo = 100133;
LAB -07
Q.

1)

2)

3)
LAB - 08

Q. Q- How can I insert into table with different input using / ,with date
datatype?

1) Create Procedure:
2) Call the Procedure:

3) Verify Insertion:

4) Drop the Procedure:


LAB - 09
Q. Prepare lab implementation practice sheet.

1)​Create Function:
2)​Call the Function:

3)​PL/SQL function that computes and returns the maximum of


two values:
4)​Oracle Recursive Function (Factorial):

5)​If-Then-Else Statement:

6)​For Loop:
LAB - 10
Q.SUB-DOMAIN -SQL

You might also like