2.2 languages
2.2 languages
In Data Modeling, languages are essential for defining, managing, and manipulating data
structures in a Database Management System (DBMS). These languages help users interact
with the database to perform various tasks such as creating tables, inserting data, querying
data, and ensuring data security and consistency. Below are the key reasons why languages
are crucial in data modeling.The main types of languages in DBMS are:
DDL is used to define the structure of the database, such as tables, schemas, indexes, and
constraints.
Creates a new table, database, or CREATE TABLE Student (ID INT, Name
CREATE
index. VARCHAR(50));
DML is used to manipulate the data in the database, such as inserting, updating, or deleting
records.
Key Commands in DML:
Command Description Example
UPDATE Modifies existing records. UPDATE Student SET Name = 'Doe' WHERE ID = 1;
REVOKE Removes permission from users. REVOKE SELECT ON Employee FROM User1;
TCL is used to manage transactions in the database. Transactions are a set of operations that
must be executed as a single unit.
DQL is used to retrieve data from the database. It focuses on querying the data using the
SELECT statement.
SELECT Retrieves data from one or more tables. SELECT * FROM Employee;
DDL (Data Definition) Defines the database structure. CREATE, ALTER, DROP
DML (Data Manipulation) Manipulates data in the database. INSERT, UPDATE, DELETE
DCL (Data Control) Controls user access to the database. GRANT, REVOKE
TCL (Transaction Control) Manages transactions in the database. COMMIT, ROLLBACK, SAVEPOINT
1. DDL helps in defining the structure and constraints of the data model.
2. DML allows users to manipulate and update the data within the model.
3. DCL ensures security and access control of the database.
4. TCL manages transactions and maintains consistency.
5. DQL helps in retrieving and analyzing the stored data