Understanding Relations
Understand how PostgreSQL defines and handles relations as sets of data with common properties. Learn about composite data types, the FROM clause mechanics, and how joins produce new relations. This lesson helps you grasp relational algebra concepts and how the query planner optimizes SQL operations for efficient database management.
We'll cover the following...
As usual, the PostgreSQL documentation provides us with some information here in its section entitled the FROM Clause:
Note: A table reference can be a table name (possibly schema-qualified) or a derived table such as a subquery, a join construct, or complex combinations of these. If more than one table reference is listed in the
fromclause, the tables are cross-joined (that is, the Cartesian product of their rows is formed; see below). The result of thefromlist is an intermediate virtual table that can then be subject to transformations by thewhere,group by, andhavingclauses and is finally the result of the overall table expression.
Relations
A relation is a set of data that have a common set of properties—that is to say, a set of elements ...