0% found this document useful (0 votes)
89 views

Good Afternoon To Everyone

This document provides an overview of SQL concepts including: - SQL stands for Structured Query Language and is used to communicate with databases. - Data is stored in tables which have columns and rows. - The main SQL statements are DQL (Data Query Language) for queries, DDL (Data Definition Language) for defining structures, and DML (Data Manipulation Language) for managing data.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOC, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
89 views

Good Afternoon To Everyone

This document provides an overview of SQL concepts including: - SQL stands for Structured Query Language and is used to communicate with databases. - Data is stored in tables which have columns and rows. - The main SQL statements are DQL (Data Query Language) for queries, DDL (Data Definition Language) for defining structures, and DML (Data Manipulation Language) for managing data.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOC, PDF, TXT or read online on Scribd
You are on page 1/ 4

Good afternoon to everyone.

My name is Jay and today I would like to discuss on Introduction to SQL.


This presentation cover the topics of SQL structure and also DQL, DDL and DML
concepts.
SQL stands for Structured Query Language. SQL is used to communicate with a
database. According to ANSI (American National Standards Institute), it is the
standard language for relational database management systems and it is a
standard language for accessing and manipulating databases.
there are different versions of the SQL language like MySQL, SQL Server, Access,
Oracle, Sybase, DB2, and other database systems
However, to be compliant with the ANSI standard, they all support at least the major
commands (such as SELECT, UPDATE, DELETE, INSERT, WHERE) in a similar manner.
A relational database management system (RDBMS) is a database management
system (DBMS) that is based on the relational model as invented by E. F. Codd, of
IBM's San Jose Research Laboratory. Many popular databases currently in use are
based on the relational database model.
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.
It is categorised in to 5 types
DQl Data Query Language - Used to retrieve certain records from one or more
tables > Select
DDL- Data defination language it is used to defining the data structures,
especially database schemas. > create , alter , drop
DML - Data Manipulation Language (DML) statements are used for managing data
within schema objects. > Insert, Update, Delete and also merge
TCL- Transactional control language It Is used to control transactional processing in
a database Grant , Revoke
DCL- Data control language - It is used to control access to data stored in a
database (Authorization) Commit , savepoint , rollback
Selection means which rows are to be returned.
Projection refers to that subset of the set of all columns found in a table, that you
want returned.

Projection: what ever typed in select clause i.e, 'column list' or '*' or 'expressions'
that becomes under projection.
*selection:*what type of conditions we are applying on that columns i.e, getting the
records that comes under selection.
For example:
SELECT empno,ename,dno,job from Emp
WHERE job='CLERK';
in the above query the columns "empno,ename,dno,job" those comes under
projection, "where job='clerk'" comes under selection
The SELECT statement is used to select data from a database.
The result is stored in a result table, called the result-set.

Select identifies what columns

From identifies which tables

A SQL join clause combines records from two or more tables in a relational
database. It creates a set that can be saved as a table or used as it is.
A JOIN is a means for combining fields from two tables (or more) by using
values common to each.

INNER JOIN: Returns all rows when there is at least one match in BOTH
tables
LEFT JOIN: Return all rows from the left table, and the matched rows from
the right table
RIGHT JOIN: Return all rows from the right table, and the matched rows from
the left table
FULL JOIN: Return all rows when there is a match in ONE of the tables
Number : It is used to allows the numbers only, If we want to store the
number data in database. Maximum Size is 38 Digits And also default size is
38.
Syntax : X Number (P, (s)); P is indicate it allows number of digits to store
and S is indicates scale and default value is Zero.
Char : It is used to allow alpha numeric values (Numbers + Characters)

Maximum size is 2000 bytes/ Characters


It is allocate the data static format in database. It is wasted the data.
Varchar2 : It allows alphanumeric values (Numbers + Characters)
Max size is 4000 Bytes/Characters
It is allocate the data in dynamic format in database. It is utilized the data
Date: It is used to store the Date Values.
Maximum size is 7 Bytes(Default 7 Bytes). 7 bytes going under elements
Syntax : X Date;

7 bytes going under elements

CC dd mm yy hh- mi-ss
21-01-10-15-08-14-20
Timestamp : It is used to store the Date along the fraction of seconds
Long : It Is used to store the information. Sometimes long to maintain the
some manage the information, this respected long datatype captured the
huge information.
Max Size is up to 2 GB we can possible to maintain.
Only one column we can user this datatype for entire table. Sytnax : X Long;
Raw : It is used to store the Images.
Syntax : X Raw;
Longraw : It is used to store the information as well as images
Max size is 2 GB
Syntax X Longraw;
Lob : Lob means if we want to huge information
A => Clob : It is used to store the huge information
Max size is 4 GB
Syntax : X Clob;
B=> Blob : Is used to store images in the form of binary format.

Max size is 4 GB
Syntax : X Blob;
C=> Bfile : It is used to store the files
Max size is 4 GB
Syntax : X Bfile;
Data Definition Language (DDL) is a standard for commands that
define the different structures in a database. DDL statements create, modify,
and remove database objects such as tables, indexes, and users. Common
DDL statements are CREATE, ALTER, and DROP.
A data manipulation language (DML) is a family of syntax elements similar
to a computer programming language used for selecting, inserting, deleting
and updating data in a database. Performing read-only queries of data is
sometimes also considered a component of DML

RESTRICT specifies that table should not be dropped if any dependencies (i.e.
triggers,
stored procedure, primary key, foreign key etc) exist. So if there are
dependencies then
error is generated and the object is not dropped.
CASCADE specifies that even if there dependencies go ahead with the drop. That
means
drop the dependencies first and then the main object also. So if the table has
stored
procedures and keys (primary and secondary keys) they are dropped first and
then the
table is finally dropped.
INSERT: adds new rows to a table.
UPDATE: modifies one or more attributes.
DELETE: deletes one or more rows from a table.

You might also like