DBMS LAB CODE:-PCC-CS-504
Practical-1
AIM:-Define SQL
[Link] is SQL?
Ans:-SQL stands for Structured Query Language. SQL is a computer language used to
interact with relational database systems. SQL is a tool for organizing, managing, and
retrieving archived data from a computer database.
SQL may be utilized by quite a number of users, which include people with
very little programming experience.
SQL is a non-procedural language.
We can without difficulty create and replace databases in SQL. It isn’t a time-
consuming process.
SQL is primarily based totally on ANSI standards.
SQL does now no longer have a continuation individual.
SQL is entered into the SQL buffer on one or more lines.
SQL makes use of a termination individual to execute instructions immediately. It
makes use of features to carry out a few formatting.
It uses functions to perform some formatting.
In the area of database management, the data is arranged in two ways which are
Relational Databases (SQL) and Non-Relational Databases (NoSQL).
Relational Database (SQL)
A relational database stores data in a table composed of rows and
columns. The table represents an object or entity, such as users,
customers, orders, etc.
.
Q .What are SQL commands?
Ans. Developers use structured query language (SQL) commands, which are specific
keywords or SQL statements, to work with data stored in relational databases. The
following are categories for SQL commands
1
Name:- ROLLNO:-CSE-
DBMS LAB CODE:-PCC-CS-504
2
Name:- ROLLNO:-CSE-
DBMS LAB CODE:-PCC-CS-504
1. Data Definition Language
SQL commands used to create the database structure are known as data definition
language (DDL). Based on the needs of the business, database engineers create and
modify database objects using DDL. The CREATE command, for instance, is used by the
database engineer to create database objects like tables, views, and indexes.
Command Description
CREATE Creates a new table, a view of a table, or other object in the
database.
ALTER Modifies an existing database object, such as a table
DROP Deletes an entire table, a view of a table, or other objects in the
database
2. Data Manipulation Language
A relational database can be updated with new data using data manipulation language
(DML) statements. The INSERT command, for instance, is used by an application to add
a new record to the database.
Command Description
SELECT Retrieves certain records from one or more
tables.
INSERT Creates a record.
UPDATE Modifies records.
DELETE Deletes records.
3. Data Control language
Data control language (DCL) is a programming language used by database
administrators to control or grant other users access to databases. For instance, they
can allow specific applications to manipulate one or more tables by using the GRANT
command.
Command Description
3
Name:- ROLLNO:-CSE-
DBMS LAB CODE:-PCC-CS-504
GRANT Gives a privilege to the user.
4
Name:- ROLLNO:-CSE-
DBMS LAB CODE:-PCC-CS-504
Command Description
REVOKE Takes back privileges granted by the
user.
4. Transaction Control Language
To automatically update databases, the relational engine uses transaction control
language (TCL). For instance, the database can reverse a mistaken transaction using the
ROLLBACK [Link], commit commands are also include in TCL.
5
Name:- ROLLNO:-CSE-