0% found this document useful (0 votes)
56 views8 pages

Introduction-to-SQL For 5 Year Olds

Introduction-to-SQL for 5 year olds

Uploaded by

IQ'Bal W'ali
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)
56 views8 pages

Introduction-to-SQL For 5 Year Olds

Introduction-to-SQL for 5 year olds

Uploaded by

IQ'Bal W'ali
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
You are on page 1/ 8

Introduction to SQL

SQL, or Structured Query Language, is a programming language used


to manage and manipulate relational databases. It provides a
powerful set of tools for creating, retrieving, updating, and deleting
data, as well as managing database schema and security.

by Iqbal wali
Data Definition Language (DDL)
Data Definition Language (DDL) is a subset of SQL used for defining the structure of a database. It is used to create,
modify, and delete database objects like tables, views, indexes, and users. Essentially, DDL is how you tell the database
what your data looks like and how it should be organized.

CREATE ALTER DROP

The CREATE statement is used to The ALTER statement is used to The DROP statement is used to
define new database objects, such modify the structure of existing remove existing database objects,
as tables, views, and indexes. database objects, such as adding or such as tables or views.
removing columns.
Data Types
1 Numeric 2 Text
Integers, floating-point Character strings of
numbers, and decimal varying lengths, such as
values for storing names, descriptions, and
numerical data. addresses.

3 Date and Time 4 Boolean


Values representing True/False values for
calendar dates, times, or a representing binary
combination of both. conditions.
Constraints
Primary Key Foreign Key
Uniquely identifies each Links data in one table to a
record in a table, ensuring corresponding record in
data integrity. another table.

Unique Not Null


Ensures that each value in a Requires that a column must
column is unique, preventing have a value, preventing
duplicates. missing data.
Data Manipulation Language (DML)
1 SELECT
Retrieves data from one or more tables based on specified criteria.

2 INSERT
Adds new records to a table, specifying the values for each column.

3 UPDATE
Modifies existing records in a table, updating one or more columns.

4 DELETE
Removes existing records from a table based on specified criteria.
SELECT Statement
Projection Filtering Aggregation

The SELECT clause specifies the The WHERE clause filters the rows The GROUP BY clause groups the
columns to be included in the result based on specified conditions. results by one or more columns.
set.
INSERT, UPDATE,
DELETE Statements
INSERT
Adds new records to a table, specifying the values for
each column.

UPDATE
Modifies existing records in a table, updating one or
more columns.

DELETE
Removes existing records from a table based on
specified criteria.
Conclusion and Key Takeaways

Powerful Data Management Data Integrity Efficient Data Handling


SQL provides a comprehensive set of Constraints and data types help SQL statements like SELECT, INSERT,
tools for managing and manipulating ensure the accuracy and consistency UPDATE, and DELETE enable effective
data in relational databases. of data in the database. data manipulation and processing.

You might also like