0% found this document useful (0 votes)
8 views2 pages

SQL Basics: Commands and Functions

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

SQL Basics: Commands and Functions

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

Project on SQL Basics

Introduction to SQL

SQL (Structured Query Language) is a standard language used to store, retrieve, and manage data
in relational database systems. It helps users create tables, insert data, update records, and
perform various database operations.

Characteristics of SQL

SQL is not case-sensitive, relies on text-based statements, uses English-like syntax, and enables
users to perform a wide range of database actions. It follows relational algebra and calculus
principles.

SQL Process Overview

When an SQL command is executed, the system determines the optimal way to perform the task.
The process involves components such as the query optimizer, query engine, dispatcher, file
manager, and transaction manager.

Advantages of SQL

SQL offers high speed, portability, multiple data views, well-defined standards, and requires no
complicated coding. Its interactive nature makes database handling easier.

SQL Datatypes

SQL datatypes define the type of data that a column can store. Common types include numeric,
string, date, binary, and extract numeric datatypes.

SQL Commands Overview

SQL commands are instructions used to communicate with the database. They help perform tasks
like creating tables, inserting data, deleting rows, and granting permissions.
Types of SQL Commands

There are five major SQL command categories: DDL, DML, DCL, TCL, and DQL. Each serves a
different purpose in database management.

Data Definition Language (DDL)

DDL commands modify the structure of database objects. Common DDL statements include
CREATE, ALTER, DROP, and TRUNCATE.

Data Manipulation Language (DML)

DML commands deal with the manipulation of data. The main commands include INSERT,
UPDATE, and DELETE.

Data Control Language (DCL)

DCL commands control user access to the database. GRANT and REVOKE are the key commands
used to manage permissions.

Transaction Control Language (TCL)

TCL commands manage transactions within a database. Common commands are COMMIT,
ROLLBACK, and SAVEPOINT.

Data Query Language (DQL)

DQL consists mainly of the SELECT command, which is used to query and retrieve data from
relational tables.

You might also like