DBMS Lab File Rohit
DBMS Lab File Rohit
DBMS Lab File Rohit
INDORE
Submitted To : Submitted By
Prof.Snehlata Mishra Rohit Malviya
21ADV3CSE0139
INDEX
S.N Name of the Experiment Date of Page no. Remark
Experiment
SQL is a database computer language designed for the retrieval and management of data in a
relational database. SQL stands for Structured Query Language. This tutorial will give you a
quick start to SQL. It covers most of the topics required for a basic understanding of SQL and to
get afeel of how it works.
Data Definition language statements work with the structure of the database table.
DDL Commands
* Truncate − It is used to delete the records or data from the table, but its structure
remains as it is.
DML Commands
* REVOKE -It is employed to remove a privilege from a user. REVOKE helps the
owner to cancel previously granted permissions.
DQL Commands
* SELECT: This is the same as the projection operation of relational algebra. It is used
to select the attribute based on the condition described by WHERE clause.
SELECT expressions
FROM TABLES
WHERE conditions;
Experiment No. 2
Apply create, insert and select command on table student with output.
Output:-
Experiment No. 3
Input:-
create table student1(
rollno number(10),
sname char(30),
sec char(20),
city char(10)
);
⮚Addition
select rollno, sname, sec, fees, fees+1000 from student1;
⮚Subtraction
select rollno, sname, sec, fees, fees-1000 as "2023 fees" from
student1;
⮚Multiplication
select rollno, sname, sec, fees, fees*2000 as "extra fees" from
student1;
⮚Division
select rollno, sname, sec, fees, fees/2 as "sch amount" from
student1;
Experiment No. 5
Apply AND,OR,NOT operations on table student with output.
Input:-
create table student1(
rollno number(10),
sname char(30),
sec char(20),
city char(10),
fees number(10)
);
Output;-
⮚Use of OR operation.
select sname, fees from student1 where rollno=103 OR
city='Bhopal'
; Output:-
⮚Use of NOT operation.
select sname from student1 where NOT city='dhar';
Output:-
Experiment No. 6
There are many kinds of data models. Some of the most common
ones include:
● Hierarchical database model
● Relational model
● Network model
● Object-oriented database model