0% found this document useful (0 votes)
6 views47 pages

Database Join and Intersect Guide

The document provides mnemonic codes for understanding database concepts such as tables and joins. It outlines the differences between JOIN and INTERSECT operations, highlighting their respective uses and characteristics. Additionally, it compares INNER JOIN and INTERSECT, detailing their syntax and the nature of the rows they return.

Uploaded by

yashverma4469
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
6 views47 pages

Database Join and Intersect Guide

The document provides mnemonic codes for understanding database concepts such as tables and joins. It outlines the differences between JOIN and INTERSECT operations, highlighting their respective uses and characteristics. Additionally, it compares INNER JOIN and INTERSECT, detailing their syntax and the nature of the rows they return.

Uploaded by

yashverma4469
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

Mnemonic Codes to learn Table

O-TRE = OBJECT = TABLE = REALTION = ENTITY.

Mnemonic Codes to lNNER Join

iNET = Inner join = Natural Join + Equii Join + Theta Join.

General Syntax to use Database / Table / Column

Database_1.Table_Name_1.Column_n = Database_2.Table_Name_2.Column_n

Difference between Join & INSTERSECT

Join :- Extracts only Related Rows , Uses Relational Operators Like ( <,>,= , != , etc. ), Column
Count/Type may be different.

INTERSECT: - Extracts only Common Rows, Use Only Set Operator (UNION / EXPECT / UNION ALL)

INNER Join vs INTERSECT

INNER JOIN = Uses ON Clause , Different Columns are possible , Duplicate Rows are Allowed , Uses
Realtional Operator

INTERSECT :- Uses Set Operators , Same Column Count & data type , Only Common Rows , No
Duplicate Rows
. .

( YO-S..S Jo i l\) ('i (j 0/?._

Le_~T
/ ) ) /
fz t~ t- I
) I
1 i l

I
}FL-i, \ )

I I

I (

\ . _) j 1'

I .
l '
I
I I
-

••
I

o.-TRG::, OP-;j~ct m ~Y l\l it~ ~L (. rn.-e_.0ir'.\1 ~~+f bv]


<2._ .-,- ~ i( -• f
~
' f} I
~t) ~ ~
OI
{'~ C CJ re1
lT p.._ :::. Y)',S J ,l,\Y\ u. '::. ( l.,\ t> 4,

f 0-C ~ --=: Fl e\ ~: : JA1t-Y\b~1~,::: Ccl41'\1"1


I
l/ • I )1/

I
)

, ..
,/ )i
1• 11 i'/ / ,I '1/ JI '1
( I / J )
1

' I I \I
I
) / ' ) I )
I ; I I
·-- I

) / , t 'r , 1 /'
' I )I )I
1,11('))) \ 1
1
I \I I l
I
I ) I j
)
I

\) I
> ()),JI
---· -·- -----

I
)
..
') '}') ,
.'
t,
' , ) h •, ' ) i t r , ) ,' , ,

def,, J'
,4)) ~ f-Ui tJ -Q ~'ir,,10-0 jtv , V, 0 I /;QYJ PQ 11,6:7 ~'i l "'f~~77 OV))
1 1 c,)
: 1i / I I

~ T R,c ~ ~ S. \ S 1G- S.~ 'b\ ~~ f\ 1 ), ~ e ( e E- r; hon 11 I\


'
) I

I I

I I

You might also like