ON RELATIONAL DEFINITIONS
with Fabian Pascal

 

 

 

 

From: MA

To: Editor

Date: 14 Apr 2004

 

Would you comment and/or elaborate on the following definitions?  Being a Data Architect, I believe definitions are the elemental basis for optimal design and of course accuracy and confirmation of understanding.   I like definitions that are easy to 'dictionary style' and relatively easy to understand.

 

Relation: A logical structure comprised of:

 

·   A heading: A set of attributes, i.e. name and domain, of which the name must be unique in the set   AND

·   A body: A set of tuples, containing a value for each attribute, i.e. name and value, in which value is a value of the domain for the attribute name and for which the value is not NULL.

 

Relation is the formal name for the data structure used in the relational model a.k.a. Table.

 

Relation Variable: A structure whose content/value represents a given relation and in which the contents vary or change over time.

 

Tuple: A data object having two or more components with no null values. 

 

Questions:

 

·         Are Tables and Views relation variables?  

·         Is a Table a base relation variable, where views are derived relation variables?

 

 

From: Fabian Pascal

To: MA

 

Somewhat loosely:

A relation consists of a heading--an unordered set of names of typed attributes-- and a body--a set of unordered unique tuples, sets of typed values, exactly one for each attribute.

 

Relations can be "pictured" as tables if the tables faithfully represent relations (see PRACTICAL DATABASE FOUNDATIONS paper #5, Un-muddling Modeling).

 

Relation variable is a variable that takes relations as values.


Base table is a SQL, not relational concept and SQL tables are not necessarily faithful representations of relations/relvars. THE THIRD MANIFESTO calls base tables real relvars and views virtual relvars.

Views are tables. In fact, the very expression "tables and views" is misleading. The relational model does not make such distinction and the user need not be and should not be at all aware when he interacts with a real table, or with a virtual table.

If relational operations are applied to tables that represent relations/relvars to derive views, than the views are derived relvars/relations. Note that which relvars are base (axioms) and which are views (theorems) is essentially arbitrary.

 

 

Posted 07/09/04