Skip to content

Latest commit

 

History

History
35 lines (28 loc) · 890 Bytes

07_basicsofsetsandrelations7.md

File metadata and controls

35 lines (28 loc) · 890 Bytes

Solution to Basics of Sets and Relations #7

Student

Student Name        Number  Sex  
Nina                3412    F 
Mike                1234    M  
Nelson              2341    F  

Teaching Assistants

Subject     ID
Physics     3412
Chemistry   1111
Mathematics 2341  

Student ⊳⊲(Number=ID) Teaching Assistants

Natural join (⋈) is a binary operator. The result of the natural join is the set of all combinations of tuples in R and S that are equal on their common attribute names.

Thus, this result returns joined rows. SQL equivalent

SELECT
    *
FROM
    Students
INNER JOIN ON
    Student.Number == Teaching Assistants.ID

= 2 rows

Note: Mike & chemistry do not pair.