Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.tools -> Re: Meaning of term projection
Doug,
> Can someone pls tell me what the meaning
> of 'projection' is in an Oracle context?
There are two types of ways of garnering information from a relational table. They are *selection* and *projection*. To understand the rest of my response, you'll need to know that they mental image of a table is that the rows are horizontal in the table and the columns (or attributes) are the vertical columns of the table. This is standard fare though....
A *selection* is a horizontal slicing of the table. You select only certain rows and leave the others there. You horizontally slice those rows that you do not want in your query and what is left forms the basis of your result set. A *selection* is determined by the contents of the WHERE clause.
A *projection* is a vertical slicing of the table. You may want to limit the data returned so you slice away the unwanted columns. A *projection* is determined by the contents of the SELECT clause.
Looking at a simple SQL statement:
SELECT <column list> <= projection
FROM table
WHERE <some condition(s)> <= selection
For example
SELECT column_1, column_3
FROM table_a
WHERE column_1 > 50 AND column_2 = 100;
In this example the *selection* is only those rows where "column_1 > 50 AND column_2 = 100". The *projection* of those rows is only column_1 and column_3. No other columns are returned.
> Also, where they found that information?
One of the best sources of relational database theory (aside from any papers by Dr. Codd) is a college textbook Fundamentals Of Database Systems by Elmasri/Navathe of The Benjamin/Cummings Publishing Company. I suggest pages 1-900. :)
HTH,
Brian
-- ======================================== Brian Peasland Raytheons Systems at USGS EROS Data Center These opinions are my own and do not necessarily reflect the opinions of my company! ========================================Received on Wed Feb 14 2001 - 08:11:24 CST