VANCEDSQL g
Essentials of Database Management
g g g
Jeffrey A. Hoffer, Heikki Topi, V. Ramesh
g g g g g g
Copyright © 2014 Pearson Education, Inc.
g g g g g
1
, OBJECTIVES
🞭 Define terms
g g
🞭 Write single and multiple table SQL queries
g g g g g g g
🞭 Define and use three types of joins
g g g g g g g
🞭 Writenoncorrelatedandcorrelated subqueries
g g g g g
🞭 Understand and use SQL in procedural language
g g g g g g g
s (e.g. PHP, PL/SQL)
g g g
🞭 Understand triggers and stored procedures
g g g g g
2
Chapter 7g Copyright © 2014 Pearson Education, Inc.
g g g g g
, PROCESSINGMULTIPLETABLES g g
🞭Join–
g
a relational operation that causes two or more tables with
g g g g g g g g g g
a common domain to be combined into a single table or vi
g g g g g g g g g g g
ew
🞭Equi-join–
g
a join in which the joining condition is based on equality b
g g g g g g g g g g g
etween values in the common columns; common colum
g g g g g g g
ns appear redundantly in the result table
g g g g g g
🞭Natural join–an equi-
g g g
join in which one of the duplicate columns is eliminated in
g g g g g g g g g g g
the result table g g
The common columns in joined tables are usually the primary key of t
g g g g g g g g g g g g
he dominant table and the foreign key of the dependent table in 1:M rel
g g g g g g g g g g g g g
ationships
, Chapter 7
g
Copyright © 2014 Pearson Education, Inc.
g g g g g 3