SlideShare a Scribd company logo
Installing MySQL
This is the site to install MySQL- https://www.mysql.com/downloads/
Database Management System(DBMS)
Most used DBMS
• MySQL
• Oracle
• Microsoft SQL
• PostgreSQL
• MongoDB
Advantages of DBMS
RDBMS
• The data in RDBMS is stored in database objects called tables. A table is a collection of related
data entries, and it consists of columns and rows.
• A record, also called a row, is each individual entry that exists in a table.
• A column is a vertical entity in a table that contains all information associated with a specific field
in a table.
What is SQL?
•SQL stands for Structured Query Language
•SQL lets you access and manipulate databases
•SQL became a standard of the American National Standards
Institute (ANSI) in 1986, and of the International
Organization for Standardization (ISO) in 1987
What Can SQL do?
•SQL can execute queries against a database
•SQL can retrieve data from a database
•SQL can insert records in a database
•SQL can update records in a database
•SQL can delete records from a database
•SQL can create new databases
•SQL can create new tables in a database
•SQL can create stored procedures in a database
•SQL can create views in a database
•SQL can set permissions on tables, procedures, and views
SQL is very powerful
MySQL Data Type
The data type of a column defines what value the column can hold: integer,
character, money, date and time, binary, and so on.
In MySQL there are three main data types: string, numeric, and date and time.
String Data types in MySQL
MySQL Data Type
Date Data types in MySQL
MySQL Data Type
Numeric Data types in MySQL
Types of Commands in SQL
DDL DML DQL DCL
Create
Alter
Drop
Truncate
Rename
Grant
Revoke
Select
Insert
Update
Delete
DDL- Data Definition Language
It consists of SQL commands that can be used to define the
database structures but not data.
CREATE: This command is used to create the database or its
objects (like table, index, function, views, store procedure,
and triggers).
DROP: This command is used to delete objects from the
database.
ALTER: This is used to alter the structure of the database.
TRUNCATE: This is used to remove all records from a table,
including all spaces allocated for the records are removed.
RENAME: This is used to rename an object existing in the
database.
SQL CREATE ,DROP, TRUNCATE
TRUNCATE TABLE
CREATE DATABASE
DROP DATABASE
CREATE TABLE
DROP TABLE
SQL ALTER TABLE
ALTER TABLE - ALTER/MODIFY DATATYPE
ALTER TABLE - RENAME Column
ALTER TABLE - DROP COLUMN
ALTER TABLE - ADD Column
SQL CONSTRAINTS
SQL constraints are used to specify rules for the data in a table.
Constraints are used to limit the type of data that can go into a table. This
ensures the accuracy and reliability of the data in the table. If there is any
violation between the constraint and the data action, the action is aborted.
Constraints can be column level or table level.
The following constraints are commonly used in SQL:
•NOT NULL - Ensures that a column cannot have a NULL value
•UNIQUE - Ensures that all values in a column are different
•PRIMARY KEY - A combination of a NOT NULL and UNIQUE. Uniquely
identifies each row in a table
•FOREIGN KEY - Prevents actions that would destroy links between tables
•CHECK - Ensures that the values in a column satisfies a specific condition
•DEFAULT - Sets a default value for a column if no value is specified
DML(Data Manipulation Language)
The SQL commands that deal with the manipulation of data
present in the database belong to DML and this includes
most of the SQL statements. It is the component of the SQL
statement that controls access to data and to the database.
Basically, DCL statements are grouped with DML
statements.
• 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 records from a database
table.
• It is a SQL statement that allows getting data from the
database and imposing order upon it.
• It includes the SELECT statement.
• This command allows getting the data out of the
database to perform operations with it.
• When a SELECT is fired against a table or tables the
result is compiled into a further temporary table, which
is displayed or perhaps received by the program i.e. a
front-end.
DQL(Data Query Language)
• It includes commands such as GRANT and REVOKE
which mainly deal with the rights, permissions, and
other controls of the database system.
• GRANT: This command gives users access privileges to
the database.
• REVOKE: This command withdraws the user’s access
privileges given by using the GRANT command.
DCL(Data Control Language)
Things to remember!!
•SQL keywords are NOT case sensitive:
select is the same as SELECT
• Some database systems require a semicolon at the end of each SQL
statement.
• Semicolon is the standard way to separate each SQL statement in
database systems that allow more than one SQL statement to be
executed in the same call to the server.
• In this tutorial, we will use semicolon at the end of each SQL
statement.

More Related Content

Similar to Structures query language ___PPT (1).pdf (20)

PPTX
database management system: sql commands lab sql
trapeziumtrapezoid12
 
PPTX
Database COMPLETE
Abrar ali
 
PPTX
DBMS UNIT-2.pptx ggggggggggggggggggggggg
Praveen Kumar
 
PDF
MySQL Interview Questions and Answers PDF By ScholarHat.pdf
Scholarhat
 
PPTX
SQL.pptx
Satyam Sharma
 
PPTX
SQL
Rajesh-QA
 
PPTX
An intoduction to sql and its components
Monika Jain DAIMSR
 
PPTX
unit-ii.pptx
NilamHonmane
 
PPTX
xjtrutdctrd5454drxxresersestryugyufy6rythgfytfyt
WrushabhShirsat3
 
PPTX
SQL Commands
Sachidananda M H
 
PPTX
SQL SERVER Training in Pune Slides
enosislearningcom
 
PPTX
lovely
love0323
 
PPTX
shs tvl ict_Programming Introduction to SQl.pptx
Joseph Camarote
 
PPTX
Introduction to Structured Query Language
agrawalmonikacomp
 
PDF
Lecture on DBMS & MySQL.pdf v. C. .
MayankSinghRawat6
 
PPTX
SQL: Data Definition Language(DDL) command
sonali sonavane
 
PPT
Mysql
TSUBHASHRI
 
PPTX
Introduction to SQL, SQL*Plus
Chhom Karath
 
PPTX
Unit 4 Introduction to Oracle and Sql.pptx
svasuki0708
 
PPTX
Himani uppal-221302130 WP ppt.pptx
MohitYadav889220
 
database management system: sql commands lab sql
trapeziumtrapezoid12
 
Database COMPLETE
Abrar ali
 
DBMS UNIT-2.pptx ggggggggggggggggggggggg
Praveen Kumar
 
MySQL Interview Questions and Answers PDF By ScholarHat.pdf
Scholarhat
 
SQL.pptx
Satyam Sharma
 
An intoduction to sql and its components
Monika Jain DAIMSR
 
unit-ii.pptx
NilamHonmane
 
xjtrutdctrd5454drxxresersestryugyufy6rythgfytfyt
WrushabhShirsat3
 
SQL Commands
Sachidananda M H
 
SQL SERVER Training in Pune Slides
enosislearningcom
 
lovely
love0323
 
shs tvl ict_Programming Introduction to SQl.pptx
Joseph Camarote
 
Introduction to Structured Query Language
agrawalmonikacomp
 
Lecture on DBMS & MySQL.pdf v. C. .
MayankSinghRawat6
 
SQL: Data Definition Language(DDL) command
sonali sonavane
 
Mysql
TSUBHASHRI
 
Introduction to SQL, SQL*Plus
Chhom Karath
 
Unit 4 Introduction to Oracle and Sql.pptx
svasuki0708
 
Himani uppal-221302130 WP ppt.pptx
MohitYadav889220
 

More from tipurple7989 (16)

PPTX
Lithium ion battery (1) -------unit.pptx
tipurple7989
 
PPTX
FEATURES OF INDIAN CONSTITUTION---1.pptx
tipurple7989
 
PPTX
PREVALENCE OF HYPOTHYROIDISM IN INFERTILE WOMEN POPULATION - A PROSPECTIVE OB...
tipurple7989
 
PPTX
Introduction to Electrochemistry part-3.pptx
tipurple7989
 
PPT
Memory-Hard Algorithms for Securitues.ppt
tipurple7989
 
PPT
Bandwidth Utilization in Networkings.ppt
tipurple7989
 
PPT
Elliptic Curve Digital Signature Algorithm (ECDSA).ppt
tipurple7989
 
PPTX
Web Development Internship ppt 3070..pptx
tipurple7989
 
PPTX
Web Development Internship ppt 3072.pptx
tipurple7989
 
PPTX
Understanding Data Types in Programming.pptx
tipurple7989
 
PPTX
Online Bus Ticket Reservation Application.pptx
tipurple7989
 
PPTX
Introduction to Antidotes full ppt .pptx
tipurple7989
 
PPTX
distributed systems unit1 part four.pptx
tipurple7989
 
PPT
INTRODUCTION TO ZERO KNOWLEDGE PROOF.ppt
tipurple7989
 
PPT
Computer security communication networking cryptography .ppt
tipurple7989
 
PPTX
unit 2 road saftey engineering presentation
tipurple7989
 
Lithium ion battery (1) -------unit.pptx
tipurple7989
 
FEATURES OF INDIAN CONSTITUTION---1.pptx
tipurple7989
 
PREVALENCE OF HYPOTHYROIDISM IN INFERTILE WOMEN POPULATION - A PROSPECTIVE OB...
tipurple7989
 
Introduction to Electrochemistry part-3.pptx
tipurple7989
 
Memory-Hard Algorithms for Securitues.ppt
tipurple7989
 
Bandwidth Utilization in Networkings.ppt
tipurple7989
 
Elliptic Curve Digital Signature Algorithm (ECDSA).ppt
tipurple7989
 
Web Development Internship ppt 3070..pptx
tipurple7989
 
Web Development Internship ppt 3072.pptx
tipurple7989
 
Understanding Data Types in Programming.pptx
tipurple7989
 
Online Bus Ticket Reservation Application.pptx
tipurple7989
 
Introduction to Antidotes full ppt .pptx
tipurple7989
 
distributed systems unit1 part four.pptx
tipurple7989
 
INTRODUCTION TO ZERO KNOWLEDGE PROOF.ppt
tipurple7989
 
Computer security communication networking cryptography .ppt
tipurple7989
 
unit 2 road saftey engineering presentation
tipurple7989
 
Ad

Recently uploaded (20)

PDF
Water Design_Manual_2005. KENYA FOR WASTER SUPPLY AND SEWERAGE
DancanNgutuku
 
PPTX
美国电子版毕业证南卡罗莱纳大学上州分校水印成绩单USC学费发票定做学位证书编号怎么查
Taqyea
 
PDF
MAD Unit - 2 Activity and Fragment Management in Android (Diploma IT)
JappanMavani
 
PPTX
The Role of Information Technology in Environmental Protectio....pptx
nallamillisriram
 
PPTX
265587293-NFPA 101 Life safety code-PPT-1.pptx
chandermwason
 
PPTX
Day2 B2 Best.pptx
helenjenefa1
 
PDF
Set Relation Function Practice session 24.05.2025.pdf
DrStephenStrange4
 
PPTX
GitOps_Repo_Structure for begeinner(Scaffolindg)
DanialHabibi2
 
PPTX
artificial intelligence applications in Geomatics
NawrasShatnawi1
 
PPTX
Snet+Pro+Service+Software_SNET+Pro+2+Instructions.pptx
jenilsatikuvar1
 
PDF
International Journal of Information Technology Convergence and services (IJI...
ijitcsjournal4
 
PPTX
Shinkawa Proposal to meet Vibration API670.pptx
AchmadBashori2
 
PPTX
Introduction to Design of Machine Elements
PradeepKumarS27
 
DOCX
CS-802 (A) BDH Lab manual IPS Academy Indore
thegodhimself05
 
PPTX
Element 7. CHEMICAL AND BIOLOGICAL AGENT.pptx
merrandomohandas
 
PPTX
Hashing Introduction , hash functions and techniques
sailajam21
 
PDF
6th International Conference on Machine Learning Techniques and Data Science ...
ijistjournal
 
PPTX
Product Development & DevelopmentLecture02.pptx
zeeshanwazir2
 
PDF
GTU Civil Engineering All Semester Syllabus.pdf
Vimal Bhojani
 
PDF
monopile foundation seminar topic for civil engineering students
Ahina5
 
Water Design_Manual_2005. KENYA FOR WASTER SUPPLY AND SEWERAGE
DancanNgutuku
 
美国电子版毕业证南卡罗莱纳大学上州分校水印成绩单USC学费发票定做学位证书编号怎么查
Taqyea
 
MAD Unit - 2 Activity and Fragment Management in Android (Diploma IT)
JappanMavani
 
The Role of Information Technology in Environmental Protectio....pptx
nallamillisriram
 
265587293-NFPA 101 Life safety code-PPT-1.pptx
chandermwason
 
Day2 B2 Best.pptx
helenjenefa1
 
Set Relation Function Practice session 24.05.2025.pdf
DrStephenStrange4
 
GitOps_Repo_Structure for begeinner(Scaffolindg)
DanialHabibi2
 
artificial intelligence applications in Geomatics
NawrasShatnawi1
 
Snet+Pro+Service+Software_SNET+Pro+2+Instructions.pptx
jenilsatikuvar1
 
International Journal of Information Technology Convergence and services (IJI...
ijitcsjournal4
 
Shinkawa Proposal to meet Vibration API670.pptx
AchmadBashori2
 
Introduction to Design of Machine Elements
PradeepKumarS27
 
CS-802 (A) BDH Lab manual IPS Academy Indore
thegodhimself05
 
Element 7. CHEMICAL AND BIOLOGICAL AGENT.pptx
merrandomohandas
 
Hashing Introduction , hash functions and techniques
sailajam21
 
6th International Conference on Machine Learning Techniques and Data Science ...
ijistjournal
 
Product Development & DevelopmentLecture02.pptx
zeeshanwazir2
 
GTU Civil Engineering All Semester Syllabus.pdf
Vimal Bhojani
 
monopile foundation seminar topic for civil engineering students
Ahina5
 
Ad

Structures query language ___PPT (1).pdf

  • 1. Installing MySQL This is the site to install MySQL- https://www.mysql.com/downloads/
  • 3. Most used DBMS • MySQL • Oracle • Microsoft SQL • PostgreSQL • MongoDB
  • 5. RDBMS • The data in RDBMS is stored in database objects called tables. A table is a collection of related data entries, and it consists of columns and rows. • A record, also called a row, is each individual entry that exists in a table. • A column is a vertical entity in a table that contains all information associated with a specific field in a table.
  • 6. What is SQL? •SQL stands for Structured Query Language •SQL lets you access and manipulate databases •SQL became a standard of the American National Standards Institute (ANSI) in 1986, and of the International Organization for Standardization (ISO) in 1987
  • 7. What Can SQL do? •SQL can execute queries against a database •SQL can retrieve data from a database •SQL can insert records in a database •SQL can update records in a database •SQL can delete records from a database •SQL can create new databases •SQL can create new tables in a database •SQL can create stored procedures in a database •SQL can create views in a database •SQL can set permissions on tables, procedures, and views SQL is very powerful
  • 8. MySQL Data Type The data type of a column defines what value the column can hold: integer, character, money, date and time, binary, and so on. In MySQL there are three main data types: string, numeric, and date and time. String Data types in MySQL
  • 9. MySQL Data Type Date Data types in MySQL
  • 10. MySQL Data Type Numeric Data types in MySQL
  • 11. Types of Commands in SQL DDL DML DQL DCL Create Alter Drop Truncate Rename Grant Revoke Select Insert Update Delete
  • 12. DDL- Data Definition Language It consists of SQL commands that can be used to define the database structures but not data. CREATE: This command is used to create the database or its objects (like table, index, function, views, store procedure, and triggers). DROP: This command is used to delete objects from the database. ALTER: This is used to alter the structure of the database. TRUNCATE: This is used to remove all records from a table, including all spaces allocated for the records are removed. RENAME: This is used to rename an object existing in the database.
  • 13. SQL CREATE ,DROP, TRUNCATE TRUNCATE TABLE CREATE DATABASE DROP DATABASE CREATE TABLE DROP TABLE
  • 14. SQL ALTER TABLE ALTER TABLE - ALTER/MODIFY DATATYPE ALTER TABLE - RENAME Column ALTER TABLE - DROP COLUMN ALTER TABLE - ADD Column
  • 15. SQL CONSTRAINTS SQL constraints are used to specify rules for the data in a table. Constraints are used to limit the type of data that can go into a table. This ensures the accuracy and reliability of the data in the table. If there is any violation between the constraint and the data action, the action is aborted. Constraints can be column level or table level. The following constraints are commonly used in SQL: •NOT NULL - Ensures that a column cannot have a NULL value •UNIQUE - Ensures that all values in a column are different •PRIMARY KEY - A combination of a NOT NULL and UNIQUE. Uniquely identifies each row in a table •FOREIGN KEY - Prevents actions that would destroy links between tables •CHECK - Ensures that the values in a column satisfies a specific condition •DEFAULT - Sets a default value for a column if no value is specified
  • 16. DML(Data Manipulation Language) The SQL commands that deal with the manipulation of data present in the database belong to DML and this includes most of the SQL statements. It is the component of the SQL statement that controls access to data and to the database. Basically, DCL statements are grouped with DML statements. • 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 records from a database table.
  • 17. • It is a SQL statement that allows getting data from the database and imposing order upon it. • It includes the SELECT statement. • This command allows getting the data out of the database to perform operations with it. • When a SELECT is fired against a table or tables the result is compiled into a further temporary table, which is displayed or perhaps received by the program i.e. a front-end. DQL(Data Query Language)
  • 18. • It includes commands such as GRANT and REVOKE which mainly deal with the rights, permissions, and other controls of the database system. • GRANT: This command gives users access privileges to the database. • REVOKE: This command withdraws the user’s access privileges given by using the GRANT command. DCL(Data Control Language)
  • 19. Things to remember!! •SQL keywords are NOT case sensitive: select is the same as SELECT • Some database systems require a semicolon at the end of each SQL statement. • Semicolon is the standard way to separate each SQL statement in database systems that allow more than one SQL statement to be executed in the same call to the server. • In this tutorial, we will use semicolon at the end of each SQL statement.