0% found this document useful (0 votes)
22 views14 pages

Introduction to SQL: Basics and Commands

Uploaded by

sa66459144
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
22 views14 pages

Introduction to SQL: Basics and Commands

Uploaded by

sa66459144
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd

EXPLORING

SQL
STRUCTURED QUERY LANGUAGE (SQL)

 SQL is used to perform operations on the records stored in the database, such as
updating records, inserting records, deleting records, creating and modifying
database tables, views, etc.
 SQL is not a database system, but it is a query language.

 Suppose you want to perform the queries of SQL language on the stored data in the
database. You are required to install any database management system in your
systems, for example, Oracle, MySQL, MongoDB, PostgreSQL, SQL Server, DB2,
etc.
WHAT IS SQL?

 SQL is a short-form of the structured query language, and it is pronounced as S-Q-L or


sometimes as See-Quell.
 This database language is mainly designed for maintaining the data in relational
database management systems. It is a special tool used by data professionals for
handling structured data (data which is stored in the form of tables).
 It is also designed for stream processing in RDSMS.

 You can easily create and manipulate the database, access and modify the table rows
and columns, etc.
WHY SQL?

 SQL is widely used in data science and analytics.

 The basic use of SQL for data professionals and SQL users is to insert, update, and delete the data from
the relational database.
 It also helps them to describe the structured data.

 It allows SQL users to create, drop, and manipulate the database and its tables.

 It also helps in creating the view, stored procedure, and functions in the relational database.

 It allows you to define the data and modify that stored data in the relational database.

 It also allows SQL users to set the permissions or constraints on table columns, views, and stored
procedures.
PROCESS OF SQL

• When we are executing the command of SQL on any Relational database management
system, then the system automatically finds the best routine to carry out our request, and the
SQL engine determines how to interpret that particular command.

• SQL contains the following four components in its process:

 Query Dispatcher

 Optimization Engines

 Classic Query Engine

 SQL Query Engine, etc.


SOME SQL COMMANDS

• The SQL commands help in creating and managing the database.

• The most common SQL commands which are highly used are mentioned below:

 CREATE

 UPDATE

 DELETE

 SELECT

 DROP

 INSERT
• CREATE

• This command helps in creating the new database, new table, table
view, and other objects of the database.

• UPDATE

• This command helps in updating or changing the stored data in the


database.
• DELETE

• This command helps in removing or erasing the saved records from the database tables. It erases single or multiple tuples from
the tables of the database.

• SELECT

• This command helps in accessing the single or multiple rows from one or multiple tables of the database. We can also use this
command with the WHERE clause.

• DROP

• This command helps in deleting the entire table, table view, and other objects from the database.

• INSERT

• This command helps in inserting the data or records into the database tables. We can easily insert the records in single as well as
multiple rows of the table.
• SQL • No-SQL
• SQL is a relational database • While No-SQL is a non-relational or
management system. distributed database management
system.
• The query language used in this
• The query language used in the No-SQL
database system is a structured database systems is a non-declarative
query language. query language.
• The schema of SQL databases is • The schema of No-SQL databases is a
predefined, fixed, and static. dynamic schema for unstructured data.
• These databases are vertically • These databases are horizontally
scalable. scalable.
• The database type of SQL is in the • The database type of No-SQL is in the
form of tables, i.e., in the form of form of documents, key-value, and
rows and columns. graphs.
• It follows the BASE model.
• It follows the ACID model.
• SQL • No-SQL
• Complex queries are easily • NoSQL databases cannot handle
managed in the SQL database. complex queries.
• This database is not the best • While No-SQL database is a
choice for storing hierarchical perfect option for storing
data. hierarchical data.
• All SQL databases require • Many No-SQL databases do not
object-relational mapping. require object-relational
mapping.
• SQLite, Ms-SQL, Oracle,
• Redis, MongoDB, Hbase,
PostgreSQL, and MySQL are BigTable, CouchDB, and
examples of SQL database Cassandra are examples of
systems. NoSQL database systems.
Advantages of SQL
• Easy to Learn and Use – SQL uses simple English-like commands.
•Efficient Data Management – Quickly inserts, updates, deletes, and
retrieves data.
•Standard Language – Used worldwide and supported by all major
relational databases.
•Fast Query Processing – Handles large amounts of data quickly.
•Multiple Data Views – Can create views to see data in different
ways.
•Secure – Allows setting permissions and constraints for users.
•Portable – Can be used across different database systems (Oracle,
MySQL, SQL Server, etc.).
DISADVANTAGES OF SQL

• Cost

• The operation cost of some SQL versions is high. That's why some programmers cannot use the
Structured Query Language.

• Interface is Complex

• Another big disadvantage is that the interface of Structured query language is difficult, which makes
it difficult for SQL users to use and manage it.

• Partial Database control

• The business rules are hidden. So, the data professionals and users who are using this query language
cannot have full database control.

You might also like