tags:

views:

462

answers:

2

Hi all,

Is Projection and selection are vertical and horizontal slicing respectively?

please tell the difference between projection and selection

Projection --> for selecting the columns of table Selection ---> to select the rows of table

so, Selection is horizontal slicing?

+1  A: 

Exactly.

Projection means choosing which columns (or expressions) the query shall return.

Selection means which rows are to be returned.

if the query is

select a, b, c from foobar where x=3;

then "a, b, c" is the projection part, "where x=3" the selection part.

ammoQ
Thank you, i understood
Then please mark it as "accepted answer" ;-)
ammoQ
A: 

its really good concept bt it should

Aniket