31271 Lecture Notes - Lecture 8: Foreign Key, Unique Key

66 views3 pages
4 Jun 2018
School
Course
Professor
Lecture 8: SQL II
Join
Join is a relational operation that causes two or more tables with a common
column to be combined into a single table or view. It displays the output from
these tables by finding matching row values in columns that have the same data
type.
Common columns in joined tables are usually the primary key of the dominant
table, and the foreign key of the dependent table in 1:M relationships.
Join Type Equi-join
An equi-join (or inner join) is one in which the joining condition is based on
equality between values in the common columns.
Inner join will only return rows from each table that have matching rows in the
other.
Join Type Natural join
An equi-join in which one of the duplicate columns Is eliminated in the results
table, and no joining condition is specified.
Code is similar to equi-join, however replaces the keyword with NATURAL
JOIN and eliminates the condition.
Join Type Cross Join
Asfa
Join Type Outer Join
A join in which rows that do not have matching values in common columns are
nonetheless included in the result table.
find more resources at oneclass.com
find more resources at oneclass.com
Unlock document

This preview shows page 1 of the document.
Unlock all 3 pages and 3 million more documents.

Already have an account? Log in

Document Summary

Join is a relational operation that causes two or more tables with a common column to be combined into a single table or view. Join type equi-join: an equi-join (or inner join) is one in which the joining condition is based on equality between values in the common columns. Inner join will only return rows from each table that have matching rows in the other. Join type cross join: asfa table, and no joining condition is specified, an equi-join in which one of the duplicate columns is eliminated in the results, code is similar to equi-join, however replaces the keyword with (cid:498)natural. Join type outer join: a join in which rows that do not have matching values in common columns are nonetheless included in the result table. Includes all columns from each table, and an instance for each row of each table with matching records from both sides where available.

Get access

Grade+20% off
$8 USD/m$10 USD/m
Billed $96 USD annually
Grade+
Homework Help
Study Guides
Textbook Solutions
Class Notes
Textbook Notes
Booster Class
40 Verified Answers
Class+
$8 USD/m
Billed $96 USD annually
Class+
Homework Help
Study Guides
Textbook Solutions
Class Notes
Textbook Notes
Booster Class
30 Verified Answers

Related Documents