Our Services

Mysql commands,tutorials.

Database is a collection of interrelated data.

DBMS (Database Management System) is software used to create, manage, and organize databases.

-> RDBMS (Relational Database Management System) - is a DBMS based on the concept of tables (also called relations).

-> Data is organized into tables (also known as relations) with rows (records) and columns (attributes).

Eg - MySQL, PostgreSQL, Oracle etc.



SQL is Structured Query Language - used to store, manipulate and retrieve data from RDBMS.

It is not a database, it is a language used to interact with database)


SQL v/s MySQL

SQL is a language used to perform CRUD operations in Relational DB, while MySQL is a RDBMS that uses SQL.

SQL Data Types

In SQL, data types define the kind of data that can be stored in a column or variable.

CHAR,VARCHAR,BLOB,INT,TINYINT,BIGINT,BIT,FLOAT,DOUBLE,BOOLEAN,DATE,TIME,YEAR.

Types of SQL Commands

1. DQL (Data Query Language) : Used to retrieve data from databases. (SELECT)

2. DDL (Data Definition Language) : Used to create, alter, and delete database objects like tables, indexes, etc. (CREATE, DROP, ALTER, RENAME, TRUNCATE)

3. DML (Data Manipulation Language): Used to modify the database. (INSERT, UPDATE, DELETE)

4. DCL (Data Control Language): Used to grant & revoke permissions. (GRANT, REVOKE)

5. TCL (Transaction Control Language): Used to manage transactions. (COMMIT, ROLLBACK, START TRANSACTIONS, SAVEPOINT)


1. Data Definition Language (DDL)

Data Definition Language (DDL) is a subset of SQL (Structured Query Language) responsible for defining and managing the structure of databases and their objects.

DDL commands enable you to create, modify, and delete database objects like tables, indexes, constraints, and more.


Key DDL commands are


2. DATA QUERY/RETRIEVAL LANGUAGE (DQL or DRL)

DQL (Data Query Language) is a subset of SQL focused on retrieving data from databases.

The SELECT statement is the foundation of DQL and allows us to extract specific columns from a table.


3. DATA MANIPULATION LANGUAGE

Data Manipulation Language (DML) in SQL encompasses commands that manipulate data within a database.

DML allows you to insert, update, and delete records, ensuring the accuracy and currency of your data.


4. DATA CONTROL LANGUAGE (DCL)

Data Control Language focuses on the management of access rights, permissions, and security-related aspects of a database system.

DCL commands are used to control who can access the data, modify the data, or perform administrative tasks within a database.

DCL is an important aspect of database security, ensuring that data remains protected and only authorised users have the necessary privileges.


5. TRANSACTION CONTROL LANGUAGE (TCL)

Transaction Control Language (TCL) deals with the management of transactions within a database.

TCL commands are used to control the initiation, execution, and termination of transactions, which are sequences of one or more SQL statements that are executed as a single unit of work.

Transactions ensure data consistency, integrity, and reliability in a database by grouping related operations together and either committing or rolling back changes based on the success or failure of those operations.




Additional Resource