Database Languages in DBMS
o   A DBMS has appropriate languages and interfaces to express database
       queries and updates.
   o   Database languages can be used to read, store and update the data in the
       database.
Types of Database Languages (SQL)
1. Data Definition Language (DDL)
   o   DDL stands for Data Definition Language. It is used to define database
       structure or pattern.
   o   It is used to create schema, tables, indexes, constraints, etc. in the
       database.
   o   Using the DDL statements, you can create the skeleton of the database.
   o   Data definition language is used to store the information of metadata like
       the number of tables and schemas, their names, indexes, columns in each
       table, constraints, etc.
Here are some tasks that come under DDL:
   o   Create: It is used to create objects in the database.
   o   Alter: It is used to alter the structure of the database.
   o   Drop: It is used to delete objects from the database.
   o   Truncate: It is used to remove all records from a table.
   o   Rename: It is used to rename an object.
   o   Comment: It is used to comment on the data dictionary.
These commands are used to update the database schema that's why they come
under Data definition language.
2. Data Manipulation Language (DML)
DML stands for Data Manipulation Language. It is used for
accessing and manipulating data in a database. It handles user
requests.
Here are some tasks that come under DML:
  o   Select: It is used to retrieve data from a database.
  o   Insert: It is used to insert data into a table.
  o   Update: It is used to update existing data within a table.
  o   Delete: It is used to delete all records from a table.
  o   Merge: It performs UPSERT operation, i.e., insert or update
      operations.
  o   Call: It is used to call a structured query language or a Java
      subprogram.
  o   Explain Plan: It has the parameter of explaining data.
  o   Lock Table: It controls concurrency.
3. Data Control Language (DCL)
  o   DCL stands for Data Control Language. It is used to retrieve the
      stored or saved data.
  o   The DCL execution is transactional. It also has rollback parameters.
      (But in Oracle database, the execution of data control language
      does not have the feature of rolling back.)
Here are some tasks that come under DCL:
  o   Grant: It is used to give user access privileges to a database.
  o   Revoke: It is used to take back permissions from the user.
There are the following operations which have the authorization of
Revoke:
CONNECT, INSERT, USAGE, EXECUTE, DELETE, UPDATE and SELECT.
4. Transaction Control Language (TCL)
TCL is used to run the changes made by the DML statement. TCL can be
grouped into a logical transaction.
Here are some tasks that come under TCL:
    o   Commit: It is used to save the transaction on the database.
    o   Rollback: It is used to restore the database to original since the last
        Commit.
ER (Entity Relationship) Diagram in DBMS
    o   ER model stands for an Entity-Relationship model. It is a high-level data model. This model is used to
        define the data elements and relationship for a specified system.
    o   It develops a conceptual design for the database. It also develops a very simple and easy to design
        view of data.
    o   In ER modeling, the database structure is portrayed as a diagram called an entity-relationship
        diagram.
For example, suppose we design a school database. In this database, the student will be an entity with
attributes like address, name, id, age, etc. The address can be another entity with attributes like city, street
name, pin code, etc and there will be a relationship between them.
Component of ER Diagram
Symbols Used in ER Model
   ER Model is used to model the logical view of the system from a data perspective which consists
of these symbols:
   Rectangles: Rectangles represent Entities in the ER Model.
   Ellipses: Ellipses represent Attributes in the ER Model.
   Diamond: Diamonds represent Relationships among Entities.
   Lines: Lines represent attributes to entities and entity sets with other relationship types.
   Double Ellipse: Double Ellipses represent Multi-Valued Attributes.
   Double Rectangle: Double Rectangle represents a Weak Entity.
Notation of ER diagram
Database can be represented using the notations. In ER diagram, many notations are
used to express the cardinality. These notations are as follows: