Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What is a Projection?

What is a Projection, in terms of database theory and NHibernate when using SetProjection()?

like image 919
DaveDev Avatar asked Aug 11 '10 17:08

DaveDev


People also ask

What is called projection?

projection, the mental process by which people attribute to others what is in their own minds. For example, individuals who are in a self-critical state, consciously or unconsciously, may think that other people are critical of them.

What is an example of projection?

Ed, LCSW, projection refers to unconsciously taking unwanted emotions or traits you don't like about yourself and attributing them to someone else. A common example is a cheating spouse who suspects their partner is being unfaithful.

What is the purpose of projection?

What Is the Purpose of Projection? Sigmund Freud believed projection to be a defense mechanism often used as a way to avoid uncomfortable repressed feelings. Feelings that are projected may be controlling, jealous, angry, or sexual in nature.


1 Answers

Projection is one of the basic operations of Relational Algebra. It takes a relation and a (possibly empty) list of attributes of that relation as input. It outputs a relation containing only the specified list of attributes with duplicate tuples removed. In other words the output must also be a relation.

Example, if the relation R{A,B}, contains three tuples {1,10},{2,10},{3,20} then the projection of R over the attribute list {B} would contain 2 tuples: {10},{20}.

In short, projection is more or less equivalent to SELECT DISTINCT in SQL (excluding cases with nulls and duplicate columns).

like image 144
nvogel Avatar answered Sep 22 '22 12:09

nvogel