Batra Computer Centre provides training and coaching in various computer software courses in Ambala. SQL is a programming language used to manage data in relational databases, and performs functions like inserting, querying, updating, and deleting data. The document discusses SQL commands like CREATE, SELECT, and JOIN which manage tables and retrieve data relationships. It also defines what a database and relational database are for organizing data in a table format.
3. Today’s Topics
What is SQL?
What Does SQL Do?
What is Database?
What is Relational Database?
SQL Commands
SQL Join Queries
About Us
Ph. No. :9729666670,4000670 Website: www.batracomputercentre.com
BATRA COMPUTER CENTRE Email: info.jatinbatra@gmail.com
4. What is SQL ?
Ph. No. :9729666670,4000670 Website: www.batracomputercentre.com
BATRA COMPUTER CENTRE Email: info.jatinbatra@gmail.com
SQL(Structure Query Language) is a
programming language used for
manipulating and managing data in
a relational database such as
Microsoft Access, MySQL, Oracle.
5. What Does SQL Do ?
SQL interacts with data in tables by:
• Inserting data
• Querying data
• Updating data
• Deleting data
• Creating Schemas
• Controlling Access
Ph. No. :9729666670,4000670 Website: www.batracomputercentre.com
BATRA COMPUTER CENTRE Email: info.jatinbatra@gmail.com
6. What is Database ?
Ph. No. :9729666670,4000670 Website: www.batracomputercentre.com
BATRA COMPUTER CENTRE Email: info.jatinbatra@gmail.com
A Database is a organized collection of data. The
data is typically organized to model relevant
aspect of reality(for example, the availability of
room in hotels), in a way
that supports processes
requiring this information
(For example, finding a
hotel with vacancies).
7. What is Relational Database ?
Ph. No. :9729666670,4000670 Website: www.batracomputercentre.com
BATRA COMPUTER CENTRE Email: info.jatinbatra@gmail.com
A Database in which the data are structured in a
table format consisting of rows and columns. It is
a digital Database whose organization is based
on the relational model of
data.
8. SQL Commands
SQL commands are used for creating databases,
tables, storing, retrieving, modifying, and
deleting data from that tables and to perform
many more operations.
Ph. No. :9729666670,4000670 Website: www.batracomputercentre.com
BATRA COMPUTER CENTRE Email: info.jatinbatra@gmail.com
Types of
SQL
Commands
DDL
DML
DCL
12. SQL Join Queries
Ph. No. :9729666670,4000670 Website: www.batracomputercentre.com
BATRA COMPUTER CENTRE Email: info.jatinbatra@gmail.com
SQL Joins
Outer
Join
Left Join Right Join
Inner Join
Full Join
SQL joins are used to
query data from two or
more tables, based on
relationship between
certain columns in these
tables.
13. Inner Join
Ph. No. :9729666670,4000670 Website: www.batracomputercentre.com
BATRA COMPUTER CENTRE Email: info.jatinbatra@gmail.com
INNER JOIN
The INNER JOIN keyword returns rows when
there is at least one match in both tables.
Syntax:
SELECT column_name(s)
FROM table_name1
INNER JOIN table_name2
ON table_name1.column_name
=table_name2.column_name
14. Outer Join
The OUTER JOIN clause differs from the INNER JOIN in
that rows are returned even when there are no matches
through the JOIN criteria on the second table.
Difference Explained:
Assuming you’re joining on columns with no duplicates,
which is by far the most common case:
An inner join of A and B gives the result of A intersect
B, i.e. the inner part of a venn diagram intersection.
An Outer join A and B gives the results of A union B, i.e.
the outer parts of a venn diagram union.
Ph. No. :9729666670,4000670 Website: www.batracomputercentre.com
BATRA COMPUTER CENTRE Email: info.jatinbatra@gmail.com
15. Left Join
Ph. No. :9729666670,4000670 Website: www.batracomputercentre.com
BATRA COMPUTER CENTRE Email: info.jatinbatra@gmail.com
LEFT JOIN
The LEFT JOIN keyword returns all rows from
the left table(table_name1), even if there are
no matches in the right table(table_name2)
Syntax:
SELECT column_name(s)
FROM table_name1
LEFT JOIN table_name2
ON table_name1.column_name
=table_name2.column_name
16. Right Join
Ph. No. :9729666670,4000670 Website: www.batracomputercentre.com
BATRA COMPUTER CENTRE Email: info.jatinbatra@gmail.com
RIGHT JOIN
The RIGHT JOIN keyword Return all rows from
the right table(table_name2),even if there are no
matches in the left table(table_name1)
Syntax:
SELECT column_name(s)
FROM table_name1
RIGHT JOIN table_name2
ON table_name1.column_name=
table_name2.column_name
17. Full Join
Ph. No. :9729666670,4000670 Website: www.batracomputercentre.com
BATRA COMPUTER CENTRE Email: info.jatinbatra@gmail.com
FULL JOIN
The FULL JOIN keyword return rows when
there is a match in one of the tables.
Syntax:
SELECT column_name(s)
FROM table_name1
FULL JOIN table_name2
ON table_name1.column_name
=table_name2.column_name
18. About Us
Batra Computer Centre is not too old, but the
glorious five years are the best with good
response from our students and clients.
The Centre offer Training and Coaching in various
computer software Courses. And the credit
directly goes to our teachers, because they are
the one who make the students satisfied with
their experience. it’s true that the experience of
the person speaks about his/her capability.
Ph. No. :9729666670,4000670 Website: www.batracomputercentre.com
BATRA COMPUTER CENTRE Email: info.jatinbatra@gmail.com