You are on page 1of 17

Database Management System Lab

Course Code: CSE 312


Instructor : Tasnim Tarannum
Lecturer
CSE Department.
Overview
► Course Outline
► Course Plan
► Basic DBMS Software & Tools
► SQL
► Applications of SQL
► SQL Architecture
► SQL Commands
► SQL Tools
SQL
► SQL is a database computer language designed for the retrieval and
management of data in a relational database. 
► SQL stands for Structured Query Language.
► SQL is Structured Query Language, which is a computer language for storing,
manipulating and retrieving data stored in a relational database.
► SQL is the standard language for Relational Database System.
► All the Relational Database Management Systems (RDMS) like MySQL, MS
Access, Oracle, Sybase and SQL Server use SQL as their standard database
language.
Applications of SQL

SQL is one of the most widely used query language over the databases.
► Allows users to access data in the relational database management systems.
► Allows users to describe the data.
► Allows users to define the data in a database and manipulate that data.
► Allows to embed within other languages using SQL modules, libraries &
pre-compilers.
► Allows users to create and drop databases and tables.
► Allows users to create view, stored procedure, functions in a database.
► Allows users to set permissions on tables, procedures and views.
SQL Architecture
SQL Commands

The standard SQL commands to interact with relational databases. These


commands can be classified into the following groups based on their nature.
► DDL - Data Definition Language
► DML - Data Manipulation Language
► DCL - Data Control Language
DDL - Data Definition Language

Sr.No. Command & Description


CREATE
Creates a new table, a view of a table, or other object in the database.
1

ALTER
Modifies an existing database object, such as a table.
2

DROP
Deletes an entire table, a view of a table or other objects in the
3
database.
DML - Data Manipulation Language

Sr. No. Command & Description


SELECT
1
Retrieves certain records from one or more tables.
INSERT
2
Creates a record.
UPDATE
3
Modifies records.
DELETE
4
Deletes records.
DCL - Data Control Language

Sr. No. Command & Description


GRANT
1 Gives a privilege to user.

REVOKE
2 Takes back privileges granted from user.
SQL Tools

► MySQL
► MS Access
► Oracle
► Sybase
► Others
Alter vs update:
previous form for Alter command:

Id Name Contact
number
1 Tasnim 123122
2 Tarannum 124353

3 Afrin 23736626
New column

Id Name Contact CGPA


Alter vs update: number
1 Tasnim 123122 3.5
after using Alter command:
2 Tarannum 124353 3.7

3 Afrin 23736626 3.0


Alter vs update:
previous form for update command:

Id Name Contact
number
1 Tasnim 123122
2 Tarannum 124353

3 Afrin 23736626
New value/
record
Alter vs update: Id Name Contact
number
after using update command:
1 Tabassum 123122

2 Tarannum 124353

3 Afrin 23736626
Drop vs Delete:
previous form for drop command:

Id Name Contact CGPA


number
1 Tasnim 123122 3.5
2 Tarannum 124353 3.7

3 Afrin 23736626 3.0


Delete CGPA
column
Drop vs Delete : Id Name Contact
after using drop command: number
1 Tasnim 123122
2 Tarannum 124353

3 Afrin 23736626
Drop vs Delete:
previous form for Delete command:

Id Name Contact CGPA


number
1 Tasnim 123122 3.5
2 Tarannum 124353 3.7

3 Afrin 23736626 3.0


Delete value/
record
Drop vs Delete : Id Name Contact CGPA
number
after using Delete command: 1 Tasnim 123122 3.5
2 Tarannum 124353 3.7

3 Afrin 3.0
Installation process
Any questions?
Thanks

You might also like