Here are some key features of Structured Query Language (SQL):
- Data Definition Language (DDL): SQL provides a set of commands to define and modify the structure of a database, including creating tables, modifying table structure, and dropping tables.
- Data Manipulation Language (DML): SQL provides a set of commands to manipulate data within a database, including adding, modifying, and deleting data.
- Query Language: SQL provides a rich set of commands for querying a database to retrieve data, including the ability to filter, sort, group, and join data from multiple tables.
- Transaction Control: SQL supports transaction processing, which allows users to group a set of database operations into a single transaction that can be rolled back in case of failure.
- Data Integrity: SQL includes features to enforce data integrity, such as the ability to specify constraints on the values that can be inserted or updated in a table, and to enforce referential integrity between tables.
- User Access Control: SQL provides mechanisms to control user access to a database, including the ability to grant and revoke privileges to perform certain operations on the database.
- Portability: SQL is a standardized language, meaning that SQL code written for one database management system can be used on another system with minimal modification.
Overall, SQL provides a powerful set of tools for managing and querying relational databases, making it a popular choice for data management tasks.
Structured Query Language (SQL) is the standard language used for writing queries in a databases. It was approved by ISO (International Standard Organization) and ANSI(American National Standards Institute).
SQL contains of some important features and they are:
- Data Definition language (DDL):
It contains of commands which defines the data. The commands are:
- create: It is used to create a table.
tablename(attribute1 datatype......attributen datatype);
- drop: It is used to delete the table including all the attributes.
drop table tablename;
- alter: alter is a reserve word which modifies the structure of the table.
tablename add(new column1 datatype......new columnx datatype);
- rename: A table name can be changed using the reserver ‘rename’
rename old table name to new table name;
2. Data Manipulation Language (DML):
Data Manipulation Language contains commands used to manipulate the data.
The commands are:
- insert: This command is generally used after the create command to insert a set of values into the table.
insert into tablename values(attribute1 datatype);
insert into tablename values (attributen datatype);
- delete: A command used to delete particular tuples or rows or cardinality from the table.
delete from tablename where condition;
- update: It updates the tuples in a table.
update tablename set tuplename='attributename';
2. Client server execution and remote database access:
Client server technology maintains a many to one relationship of clients(many) and server(one). We have commands in SQL that control how a client application can access the database over a network.
3. Security and authentication:
SQL provides a mechanism to control the database meaning it makes sure that only the particular details of the database is to be shown the user and the original database is secured by DBMS.
4. Embedded SQL:
SQL provides the feature of embedding host languages such as C, COBOL, Java for query from their language at runtime.
5. Transaction Control Language:
Transactions are an important element of DBMS and to control the transactions, TCL is used which has commands like commit, rollback and savepoint.
- commit: It saves the database at any point whenever database is consistent.
- rollback: It rollbacks/undo to the previous point of the transaction.
- savepoint: It goes back to the previous transaction without going back to the entire transaction.
6. Advanced SQL:
The current features include OOP ones like recursive queries, decision supporting queries and also query supporting areas like data mining, spatial data and XML(Xtensible Markup Language).
Unlock the Power of Placement Preparation!
Feeling lost in OS, DBMS, CN, SQL, and DSA chaos? Our Complete Interview Preparation
Course is the ultimate guide to conquer placements. Trusted by over 100,000+ geeks, this course is your roadmap to interview triumph.
Ready to dive in? Explore our Free Demo Content and join our Complete Interview Preparation