2 ms·
While the relational model is claimed to be based on relations, the vast majority of the "relations" used in practice are functions, not general relations. A g
by adrian_b 5mo ago
While the relational model is claimed to be based on relations, the vast majority of the "relations" used in practice are functions, not general relations.
A general relation exists only between the columns of a table that are included in a multi-column primary key.
All columns that are not part of the primary key are functions of the primary key.
Most tables used in practice use a single column as the primary key, which is frequently just a number or a UUID. Most databases contain only tables that are functions, without any table that contains general relations.
The most frequently used kinds of joins are just function compositions.
- thesz 5mo agoWhile it is true on the schema level, it is not true at the query level. The most frequently used kind of join is a general relation. [1] https://github.com/agirish/tpcds/blob/master/query1.sql https://github.com/agirish/tpcds/blob/master/query1.sql Query 1 from TPC-DS creates a multi-column relation by using GROUP BY. Which relation is then partially constrained by different columns from different tables.