IOTA ACADEMY
Data Analytics & Placement Training Institute
SQL
KNOWING ABOUT DATA, DATABASES, DBMS and SQL
IOTA ACADEMY
WHAT IS SQL?
▪ Structured Query Language
▪ Programming language
▪ Standard Database Language
▪ A Language used for managing and manipulating relational databases.
IOTA ACADEMY
DATA
▪ Data can be facts related to any object in consideration.
▪ Data are a collection of discrete values that convey information.
IOTA ACADEMY
DATA IN VARIOUS SECTORS
IOTA ACADEMY
DATABASE
▪ A database is a systematic or organized collection of related information that is
stored in such a way that it can be easily accessed, retrieved, managed, and updated.
▪ Apart from storing the data itself, a database also keeps the relationships between
data points.
▪ The main purpose of the database is to operate a large amount of information.
IOTA ACADEMY
EVOLUTION OF DATABASE
▪ Charles Bachman developed the first Network data model, called Integrated Data
Store (IDS). It was introduced in the early 1960s and standardized in 1971.
▪ In 1970, the Relational Database was introduced.
▪ Today, it is the era of Relational Databases and Database Management.
IOTA ACADEMY
DATABASE SERVER
A database server is a machine running database software dedicated to providing
database services.
A database server consists of hardware and software that run a database.
▪ The software side of a database server, or the database instance, is the back-end
database application.
▪ The hardware side of a database server is the server system used for database storage
and retrieval.
IOTA ACADEMY
NEED OF DATABASE
IOTA ACADEMY
NEED OF DATABASE... ARE −
Manages large amounts of data
▪ A database stores and manages a large amount of data on a daily basis. This would
not be possible using any other tool such as a spreadsheet as they would simply not
work.
Accurate
▪ Data accuracy refers to how correct and precise the data values are in relation to the
real-world entities or phenomena they represent. It focuses on the correctness and
exactness of the data values themselves.
Easy to update data
▪ In a database, it is easy to update data using various Data Manipulation languages
(DML) available. One of these languages is SQL.
IOTA ACADEMY
NEED OF DATABASE... ARE −
Security of data
▪ Databases have various methods to ensure the security of data. There are user logins
required before accessing a database and various access specifiers. These allow only
authorised users to access the database.
Data integrity
▪ Data integrity refers to the overall quality, consistency, and reliability of data. It ensures
that data remains intact, complete, and uncorrupted throughout its lifecycle. This is
ensured in databases by using various constraints for data.
Easy to research data
▪ It is very easy to access and research data in a database. This is done using Data Query
Languages (DQL) which allow searching of any data in the database and performing
computations on it.
IOTA ACADEMY
TYPE OF DATABASES
▪ Relational databases: This type of database organizes data in a tabular format, with
each table containing rows and columns of data. Relational databases use SQL as the
query language and are well-suited for structured data.
▪ NoSQL databases: Unlike relational databases, NoSQL databases do not use a
tabular format to store data, and they don't rely on a fixed schema. Instead, they
allow for more flexible and dynamic data structures, making them suitable for
handling large, unstructured datasets.
▪ Object-oriented databases: This type of database stores data as objects, which can
be more intuitive for developers who are familiar with object-oriented
programming. Object-oriented databases can be useful for applications that handle
complex data structures and relationships.
IOTA ACADEMY
EXAMPLE: RELATIONAL MODEL
IOTA ACADEMY
DBMS
▪ DBMS stands for Database Management System. It is a software system that is used to
manage and manipulate databases.
▪ A DBMS provides an interface between the database and the user or application, allowing
users to create, modify, and retrieve data in a structured and controlled way.
IOTA ACADEMY
WHAT IS RDBMS?
▪ RDBMS stands for Relational Database Management System.
▪ It is called Relational Database Management System (RDBMS) because it is based on the
relational model introduced by E.F. Codd.
▪ It contains several tables which are connected to each other through keys which are called
Relationships.
▪ All modern database management systems like MS SQL Server, IBM DB2, ORACLE, My-SQL,
and Microsoft Access are based on RDBMS.
IOTA ACADEMY
POPULAR RELATIONAL DATABASES
IOTA ACADEMY
DATA REPRESENTATION IN RDBMS
▪ Data is represented in terms of tuples (rows) in RDBMS.
▪ A relational database is the most commonly used database. It contains several tables, and
each table has its primary key.
▪ Due to a collection of an organized set of tables, data can be accessed easily in RDBMS.
IOTA ACADEMY
TERMINOLOGIES OF RDBMS
IOTA ACADEMY
TABLE
▪ The data in an RDBMS is stored in database objects which are called tables. This table is a
collection of related data entries and consists of numerous columns and rows.
▪ Table is also known as Relation.
IOTA ACADEMY Table
TABLE…
▪ Remember, a table is the most common and simplest form of data storage in a
relational database.
▪ An example of a CUSTOMERS table −
+-----+----------+-------+------------------+--------------+
| ID | NAME | AGE | ADDRESS | SALARY |
+----+----------+-------+-----------------+--------------+
| 1 | Ramesh | 32 | Ahmedabad| 2000.00 |
| 2 | Khilan | 25 | Delhi | 1500.00 |
| 3 | kaushik | 23 | Kota | 2000.00 |
| 4 | Chaitali | 25 | Mumbai | 6500.00 |
| 5 | Hardik | 27 | Bhopal | 8500.00 |
| 6 | Komal | 22 | MP | 4500.00 |
| 7 | Muffy | 24 | Indore |10000.00|
+----+----------+-----+---------------+-------------+
IOTA ACADEMY
WHAT IS A FIELD?
▪ A field is a column in a table that is designed to maintain specific information about every
record in the table.
▪ Every table is broken up into smaller entities called fields. The fields in the CUSTOMERS table
consist of ID, NAME, AGE, ADDRESS and SALARY.
+----+----------+-----+---------------+--------------+
| ID | NAME | AGE | ADDRESS | SALARY |
+----+----------+-----+---------------+--------------+
Field
IOTA ACADEMY
WHAT IS A RECORD?
▪ A single entry in a table is called a Tuple or Record or Row.
▪ A tuple in a table represents a set of related data.
▪ A record is a horizontal entity in a table.
▪ For example, there are 7 records in CUSTOMERS table.
▪ Following is a single row of data or record in the CUSTOMERS table −
+----+----------+-----+-----------------+------------+
| 1 | Ramesh | 32 | Ahmedabad | 2000.00 |
+----+----------+-----+-----------------+------------+
Record
IOTA ACADEMY
SQL
▪ SQL stands for Structured Query Language.
▪ SQL is used to communicate with a database.
▪ SQL is a computer language for storing, manipulating and retrieving data stored in a
relational database.
▪ All the RDBMS like MySQL, MS Access, Oracle, Sybase, Informix, Postgres and SQL Server
use SQL as their standard database language.
▪ SQL is not a case-sensitive language.
Example: Select or SELECT both are same.
IOTA ACADEMY
SQL?
▪ Structured Query Language (SQL) is a standard programming language used for managing
and manipulating relational databases.
▪ The term "structured" in SQL refers to the fact that it follows a well-defined structure and
syntax for accessing and manipulating data in a database.
▪ The term "query language" indicates that SQL is primarily used for querying and retrieving
data from databases.
IOTA ACADEMY
USES OF SQL
▪ SEQUEL widely known as SQL, Structured Query Language is the most popular standard
language to work on databases.
▪ It is a domain-specific language that is mostly used to perform tons of operations which
include creating a database, storing data in the form of tables, modifying, extracting and a lot
more.
• SQL is widely used in business intelligence (BI) and analytics applications for extracting
insights from data.
• Tools like Tableau, Power BI, and others rely on SQL queries to fetch and analyze data for
reporting and visualization.
IOTA ACADEMY
USES OF SQL…
▪ SQL helps to perform tons of commands which helps us to perform various operations in a
database. They can be broadly classified into the following categories:
• Data Definition Language(DDL): SQL helps to make a database and tables and perform
certain operations like CREATE, ALTER, DROP, RENAME, TRUNCATE, COMMENT etc.
• Data Query Language(DQL): We broadly use the command SELECT to retrieve information
from the database.
• Data Manipulation Language(DML): SQL is used to manipulate data in a database. The
operations are INSERT, UPDATE, DELETE etc.
• Data Control Language(DCL): Control commands like GRANT is used to grant user
permission/access to perform a specific operation. To take back the access from the
user REVOKE is used.
IOTA ACADEMY
MYSQL
▪ MySQL is a Relational Database Management System(RDBMS).
▪ MySQL is the DBMS behind some of the top websites and web-based applications in the
world, including Airbnb, Uber, LinkedIn, Facebook, Twitter, and YouTube.
IOTA ACADEMY
Thank You
IOTA ACADEMY