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

ABHISHEK GHOSH_DBMS WITH SQL_MIC401B

The document discusses the importance of databases and their management through Database Management Systems (DBMS), highlighting the role of various database languages. It categorizes these languages into four main types: Data Definition Language (DDL), Data Control Language (DCL), Data Manipulation Language (DML), and Transaction Control Language (TCL), explaining their functions and commands. The conclusion emphasizes the significance of these languages in managing and manipulating data effectively.

Uploaded by

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

ABHISHEK GHOSH_DBMS WITH SQL_MIC401B

The document discusses the importance of databases and their management through Database Management Systems (DBMS), highlighting the role of various database languages. It categorizes these languages into four main types: Data Definition Language (DDL), Data Control Language (DCL), Data Manipulation Language (DML), and Transaction Control Language (TCL), explaining their functions and commands. The conclusion emphasizes the significance of these languages in managing and manipulating data effectively.

Uploaded by

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

SWAMI VIVEKANANDA INSTITUTE OF

MODERN STUDIES

NAME: ABHISHEK GHOSH


ROLL NO: 35141923001
REGISTRATION NO: 233512010002
SUBJECT: Database Management with SQL
SUBJECT CODE: (MIC401B)
TOPIC NAME: Database languages in
DBMS

1|Page
Table of contents :
 Abstract

 Introduction.

 What is Database?

 Types of Database Languages in DBMS.

 Explanation of Database Languages.

 Conclusion.

 Reference.

2|Page
ABSTRACT:
Databases are essential for efficiently storing,
managing, and retrieving large volumes of
data. They utilize both software and hardware
components. The software provides an
interface that enables users or applications to
interact with the database, while the hardware
consists of servers and storage systems
responsible for physically storing and
organizing the data, either in memory or on
physical devices like hard drives.

In this article, we will explore the types of


database languages used in a Database
Management System (DBMS). These
languages are crucial for performing
operations such as data creation, manipulation,
retrieval, and management. They provide the
tools necessary to define, control, and
manipulate the data effectively.

3|Page
INTRODUCTION:

A database language within a Database


Management System (DBMS) is a specialized
programming language used to define the
structure of a database, manipulate data within
it, and retrieve information, with key
categories including Data Definition Language
(DDL) for schema creation, Data
Manipulation Language (DML) for data
access and modification, Data Control
Language (DCL) for managing user
permissions, and Transaction Control
Language (TCL) for managing data
consistency during transactions; essentially
allowing users to interact with and manage
data stored within a database system.

4|Page
What is a Database?
A database is a structured collection of data
stored electronically. It allows users to easily
access, manage, and update data. For example,
a phone contact list on our smartphone is a
small database. It keeps track of names, phone
numbers, and addresses, allowing us to search
and access this information quickly when
needed. Databases are widely used in
businesses, websites, and applications to store
and manage large volumes of data efficiently.

A Database Management System (DBMS) is


the software that interacts with the database,
providing an interface to users and
applications. It ensures the efficient storage
and retrieval of data, maintains data integrity,
and provides security features like access
control and authentication.

5|Page
Types of Database
Languages in DBMS:
Database languages are specialized languages
used to interact with a database. They allow
users to perform different tasks such as
defining, controlling, and manipulating the
data. There are several types of database
languages in DBMS, categorized into the
following four main types:

1. DDL (Data Definition Language)


2. DCL (Data Control Language)
3. DML (Data Manipulation Language)
4. TCL (Transaction Control Language)

6|Page
1.DDL (Data Definition Language)
The DDL stands for Data Definition Language,
Which is used to define the database's internal
structure and Pattern of the Database. It is used to
define and modify the structure of the database
itself, including the tables, views, indexes, and
other schema-related objects. It deals with the
creation and modification of database schema, but
it doesn't deal with the data itself.

Following are the five DDL commands in SQL:

CREATE: Used to create database objects like


tables, indexes, or views.
ALTER: Used to modify the structure of an
existing database object, such as adding a new
column to a table.
DROP: Used to delete database objects.
TRUNCATE: Used to remove all rows from a
table, without affecting the structure.
RENAME: Used to change the name of a database
object.

7|Page
CREATE Command
The CREATE is a DDL command used to
create databases, tables, triggers and other
database objects.

Syntax
CREATE TABLE Students (
column1 INT,
column2 VARCHAR(50),
column3 INT
);
Example:

8|Page
2. DCL (Data Control Language)
DCL stands for Data Control Language. It is used
to control the access permissions of users to the
database. DCL commands help grant or revoke
privileges to users, determining who can perform
actions like reading or modifying data. DCL
commands are transactional, meaning they can be
rolled back if necessary.

The two main DCL commands are:


Grant: Gives user access to the database
Revoke: Removes access or permissions from the
user.
Grant Command
The GRANT command in a Database
Management System (DBMS) is used to provide
specific permissions or privileges to users or roles.
This command allows administrators to control
access to database objects, ensuring that only
authorized users can perform certain actions, such
as selecting, inserting, updating, or deleting data.

Syntax
9|Page
GRANT privileges
ON object
TO user_or_role [WITH GRANT OPTION];
Example:
GRANT SELECT, INSERT ON students TO
user;
3.DML (Data Manipulation Language)
The DML (Data Manipulation Language) is used
toto manage and manipulate data within a
database. With DML, you can perform various
operations such as inserting, updating, selecting,
and deleting data. These operations allow you to
work with the actual content in your database
tables.

Here are the key DML commands:


SELECT: Retrieves data from the table based on
specific criteria.
INSERT: Adds new rows of data into an existing
table.
UPDATE: Modifies existing data in a table.
DELETE: Removes data from a table.

10 | P a g e
MERGE: Performs an "upsert" operation, which
means updating existing records or inserting new
ones if they don’t exist.
CALL: Executes stored procedures or functions.
LOCK TABLE: Prevents other users from
accessing the table while changes are being made.
EXAMPLE:
MERGE INTO Employees AS target
USING New_Hires AS source
ON target.EmployeeID = source.EmployeeID
WHEN MATCHED THEN
UPDATE SET target.Name = source.Name,
target.Salary = source.Salary
WHEN NOT MATCHED THEN
INSERT (EmployeeID, Name, Salary)
VALUES (source.EmployeeID, source.Name,
source.Salary);
Table 1. Employees Table (Before Merge):
Employee Table

Table 2: New_Hires Table:


11 | P a g e
4.TCL ( Transaction Control Language )
The TCL full form is Transaction Control
Language commands are used to manage and
control transactions in a database, grouping them
into logical units. These commands help ensure the
integrity of data and consistency during complex
operations. Here are the two main commands in
this category:

Commit: Saves all the changes made during the


current transaction to the database. These are very
useful in the banking sector.
Rollback: used to restore the database to its
original state from the last commit. This command
also plays an important role in Banking Sectors.
Syntax
Database Operation
Commit
Example:

Conclusion:
12 | P a g e
In conclusion, database languages play a
crucial role in managing and manipulating
data in a database management system
(DBMS). There are different type of
database language like DDL, DCL, DML,
and TCL. The DDL language is used for
used for defining the database's internal
structure and Pattern of the Database. The
DCL commands are used to control the
data from the user means They can provide
control of the Database, Table, and Data.
The DML commands are used to
manipulate the Data in the Table like
Inserting, updating, and deleting the Data
finally the TCL commands are used to
save and restore the previous state of the
Database.

13 | P a g e
Reference:

Help from internet ,following websites links


have been used in the completion of this
assignment file:

1.Safari.
2.Chorme.
3.pinterest.

Some books are used to help me for this


assignment topic.

14 | P a g e
THANK YOU

15 | P a g e

You might also like