Professional Documents
Culture Documents
Dbmslab1
Dbmslab1
Experiment Number 01
Experiment Title Sturtured Querry Language
Date of Experiment 24/01/2024
Date of Submission 13/02/2024
1. Problem Statement:
1. Create a table name student with the following attributes (data types are shown in the
parenthesis): Roll No (Integer), Name (varchar(50)), Gender (Char), CGPA (Float)
3. Add a new column to the table, for the Date of Birth (Date). Use the date data type to
store this. Also, update the date of birth of all the records
4. Delete from the table the record of the student whose CGPA is the lowest
5. Display only those students whose CGPA lies in the range of [6, 8]
6. Order the data in the tables based on CGPA from ascending to descending.
7. Display the records for students with the smallest and the largest CGPA
8. Display only those students whose CGPA lies in the range of [6, 8] and whose DOB
is after 1-6-2006.
2. Theory:
DDL (Data Definition Language): Defines and manages the database structure.
DML (Data Manipulation Language): Manipulates and retrieves data in the
database.
DCL (Data Control Language): Manages access and security permissions.
TCL (Transaction Control Language): Ensures transaction consistency and
integrity.
Submitted by:
Name: Nikhil Kumar
Roll No.: 2230030
DATABASE MANAGEMENT LAB (CS 29006)
School of Electronics Engineering
use lab1;
Submitted by:
Name: Nikhil Kumar
Roll No.: 2230030
DATABASE MANAGEMENT LAB (CS 29006)
School of Electronics Engineering
Submitted by:
Name: Nikhil Kumar
Roll No.: 2230030
DATABASE MANAGEMENT LAB (CS 29006)
School of Electronics Engineering
Submitted by:
Name: Nikhil Kumar
Roll No.: 2230030
DATABASE MANAGEMENT LAB (CS 29006)
School of Electronics Engineering
Submitted by:
Name: Nikhil Kumar
Roll No.: 2230030
DATABASE MANAGEMENT LAB (CS 29006)
School of Electronics Engineering
select * from student where cgpa between 6 and 8 and dob > '2003-11-01';
Submitted by:
Name: Nikhil Kumar
Roll No.: 2230030
DATABASE MANAGEMENT LAB (CS 29006)
School of Electronics Engineering
4. Concluding Remarks:
SQL is a fundamental language for managing relational databases in the context of
RDBMS. It provides a comprehensive set of tools through DDL, DML, DCL, and
TCL to define and manipulate data structures, control access and security, ensure
transactional integrity, and query and retrieve information.
Submitted by:
Name: Nikhil Kumar
Roll No.: 2230030