You are on page 1of 12

DEPARTMENT OF COMPUTER SCIENCE &

ENGINEERING
CSP 249 DBMS

LAB MANUAL

NAME- Shivansh Soni

SYSTEM ID-2021002287
GUIDED BY-Mr. DHARAM RAJ

ROLL.NO-210101814

BRANCH-CSE

SECTION-B
Experiment.1-Introduction of SQL/Oracle. Classification SQL, DDL, DML. Data types of
SQL/Oracle.

Result- Structured Query Language (SQL) is the set of statements with which all programs and
users access data in an Oracle Database. Application programs and Oracle tools often allow users
access to the database without using SQL directly, but these applications in turn must use SQL
when executing the user's request.
Classification SQL are as follow: -
1. DDL- Data Definition Language actually consists of the SQL commands that can be used
to define the database schema. It simply deals with descriptions of the database schema
and is used to create and modify the structure of database objects in the database.DDL is
a set of SQL commands used to create, modify, and delete database structures but not
data. These commands are normally not used by a general user, who should be accessing
the database via an application.
2. DQL- DQL statements are used for performing queries on the data within schema
objects. The purpose of the DQL Command is to get some schema relation based on the
query passed to it. We can define DQL as follows it is a component of SQL statement
that allows getting data from the database and imposing order upon it. It includes the
SELECT statement. This command allows getting the data out of the database to perform
operations with it. When a SELECT is fired against a table or tables the result is
compiled into a further temporary table, which is displayed or perhaps received by the
program i.e. a front-end.
3. DML- The SQL commands that deals with the manipulation of data present in the
database belong to DML or Data Manipulation Language and this includes most of the
SQL statements. It is the component of the SQL statement that controls access to data and
to the database.
4. DCL- DCL includes commands such as GRANT and REVOKE which mainly deal with
the rights, permissions, and other controls of the database system.

Oracle built-in data types:

1. Character datatypes

2. Number datatypes

3. Long and raw datatypes

4. Datetime datatypes
5. Large object datatypes

6. Row- id datatypes

Supplied Data Types:

1. Any_types

2. XML_type

3. Spatial_types

4. media_types
Experiment.2- DDL commands: CREATE, ALTER, DROP, TRUNCATE commands and
Constraints.

Code –

Result-
Experiment.3- DML commands: Introduction about the INSERT, SELECT, UPDATE &
DELETE command

Code –

Result-
Experiment.4- To implement SQL Constraints (NOT NULL, UNIQUE, PRIMARY KEY, CHECK,
DEFAULT)

Code –

Result-

Experiment 5
STUDY OF VARIOUS TYPES OF SET OPERATORS(UNION , INTERSECT, MINUS)
UNION

INTERSECT

MINUS

Experiment 6
Introduction of the Scalar functions and Aggregate functions (Count, Avg, Sum, Max, Min)
COUNT(): It is used to count the number of rows returned in a SELECT statement.

The SUM() function returns the sum of all the values of the selected column.

Avg(): It returns the average value after calculating from values in a numeric
column.

The MAX() function returns the maximum value of the selected column.

The MIN() function returns the minimum value of the selected column.

COUNT

RESULT

SUM
RESULT
AVG

RESULT
MAX

RESULT
MIN

RESULT

You might also like