Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.tools -> Re: Meaning of term projection

Re: Meaning of term projection

From: Brian Peasland <peasland_at_usgs.gov>
Date: Wed, 14 Feb 2001 14:11:24 GMT
Message-ID: <3A8A920C.DB8F341@usgs.gov>

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

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US