Search code examples
sqlsql-serverdatabaserdbmsdatabase-schema

“Relation” versus “relationship” in RDBMS/SQL?


Coming from question “Relation” versus “relationship”

What are definitions of "relation" vs. "relationship" in RDBMS (or database theory)?

Update:
I was somewhat perplexed by comment to my question:

"relation is a synonym for table, and thus has a very precise meaning in terms of the schema stored in the computer"

Update2:
Had I answered incorrectly that question , in terms of RDBMS, having written that relation is one-side direction singular connection-dependence-link,
i.e. from one table to another while relationship implies (not necessarily explicitly) more than one link connection in one direction (from one table to another)?


Solution

  • A RELATION is a subset of the cartesian product of a set of domains (http://mathworld.wolfram.com/Relation.html). In everyday terms a relation (or more specifically a relation variable) is the data structure that most people refer to as a table (although tables in SQL do not necessarily qualify as relations).

    Relations are the basis of the relational database model.

    Relationships are something different. A relationship is a semantic "association among things".