Arduino_CSE ece ppt for working and principal of arduino.ppt
DBMS languages/ Types of SQL Commands
1. Database Management Systems
DBMS Languages/
Types of SQL Commands
by
GOWRU BHARATH KUMAR
M.Tech, (Ph.D)
Assistant Professor
You are My creator, But I am Your Master
3. Queries in a DBMS Cont…
Here are some questions a user might ask:
1) What is the name of the student with student ID 1234567
2) What is the average salary of professors who teach course
CS5647
3) How many students are enrolled in CS5647
4) What fraction of students in CS564 received a grade better
than B7
5) Is any student with a CPA less than 3.0 enrolled in CS564
4. Queries in a DBMS Cont…
• Such questions involving the data stored in a DBMS are called queries.
• A DBMS provides a specialized language, called the query language, in
which queries can be posed.
• A very attractive feature of the relational model is that it supports
powerful query languages.
• Relational calculus is a formal query language based on mathematical
logic, and queries in this language have an intuitive, precise meaning.
• Relational algebra is another formal query language, based on a collection
of operators for manipulating relations, which is equivalent in power to the
calculus.
• A DBMS takes great care to evaluate queries as efficiently as possible.
5. DBMS Languages
• A DBMS has appropriate languages to express database queries and updates.
• Database languages can be used to read, store and update the data in the
database.
6. Data Definition Language
• DDL stands for Data Definition Language. It is used to define database
structure or pattern.
• It is used to create schema, tables, indexes, constraints, etc. in the database.
• Using the DDL statements, you can create the skeleton of the database.
• DDL is used to store the information of metadata like the number of tables and
schemas, their names, indexes, columns in each table, constraints, etc.
• DDL is used to define the external and Conceptual Schemas.
Here are some tasks that come under DDL:
• Create: It is used to create objects in the database.
• Alter: It is used to alter the structure of the database.
• Drop: It is used to delete objects from the database.
• Truncate: It is used to remove all records from a table.
• Rename: It is used to rename an object.
7. Data Manipulation Language
• DML stands for Data Manipulation Language. It is used for accessing and
manipulating data in a database. It handles user requests.
• The DDL and DML are collectively referred to as the data sublanguage
when embedded within a host language (Ex: C or COBOL)
Here are some tasks that come under DML:
• Select: It is used to retrieve data from a database.
• Insert: It is used to insert data into a table.
• Update: It is used to update existing data within a table.
• Delete: It is used to delete all records from a table.
8. Data Control Language
• DCL stands for Data Control Language. It is used to retrieve the stored or
saved data.
• The DCL execution is transactional. It also has rollback parameters.
Here are some tasks that come under DCL:
• Grant: It is used to give user access privileges to a database.
• Revoke: It is used to take back permissions from the user.
9. Transaction Control Language
• 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:
• Commit: It is used to save the transaction on the database.
• Rollback: It is used to restore the database to original since the last
Commit.