DDL (Data Definition Language): Concerned with the structure or schema of the database.
CREATE: Used to create objects like tables, views, indexes, etc.
ALTER: Used to modify existing database objects. For example, it can add, delete, or modify columns in an existing table.
DROP: Used to delete database objects. For example, DROP TABLE deletes an existing table.
TRUNCATE: Used to remove all records from a table, including all spaces allocated for the records.
DML (Data Manipulation Language): It deals with data manipulation and the management of data within the database.
INSERT: Adds new rows/records to a table.
UPDATE: Modifies existing rows/records in a table.
DELETE: Removes rows/records from a table.
MERGE: Used to insert, update, or delete records from a table based on certain conditions.
DQL (Data Query Language): It used to retrieve data from a database.
SELECT: Retrieves data from one or more tables. This command can be combined with various clauses (e.g., WHERE, GROUP BY, HAVING) to filter, group, and sort the retrieved data.
DCL (Data Control Language): It deals with permissions and rights that can be granted or revoked.
GRANT: Provides specific privileges to users or roles.
REVOKE: Removes specific privileges from users or roles.
TCL (Transaction Control Language): It used to manage transactions within a database, ensuring data integrity.
COMMIT: Saves all the transactions to the database since the last COMMIT or ROLLBACK command.
ROLLBACK: Restores the database to the last committed state. It undoes any changes made since the last COMMIT.
SAVEPOINT: Sets a point within a transaction to which you can later roll back.
SET TRANSACTION: Configures the properties of a transaction.
Thanks for reading!
Announcement 📢
Now you can speak to me, if you're feeling stuck within your tech career then you can book a 1:1 session with me to get personalized help.
SOLID principle is one of the most important design principles in OOP languages like Java, Python, C#, etc.
Sadly, most of the programmers find it super difficult to understand.
Here's the simplest guide to understand SOLID principles:
1. Full form
S = Single Responsibility Principle
O = Open/Closed Principle
L = Liskov Substitution Principle
I = Interface Segregation Principle
D = Dependency Inversion Principle
(we will use Java to understand them)
2. Single Responsibility
A class should always have one responsibility and there should be only a single reason to change it.