Logical Data Modeling - Relationship

Data System Architecture

About

A relationship is a model element that relates two entities .

In its simple form (semantic form), it's a description that has a verb such as:

  • has
  • consists of
  • uses

As a set of entity is called an entity set, relationship have also the notion of relationship set that groups relation between the same type of entities.

Bad programmers worry about the code. Good programmers worry about data structures and their relationships.

Linus Torvalds

Example

  • a marriage is a relationship between two entities in the entity set PERSON.
  • father-son is a relationship between two person entities
  • is greater than is a relationship between two numbers (or two length of a persons)

Characteristic

Identification

A relationship is identifiable.

Primary Key

The primary key of a relationship is the primary keys of the involved entities. See primary key relationship

Identifier

To get the identifier on a global scope, you will add the namespace to the primary_key. See Identifier.

Attribute

Relationships have attributes (saved in a value).

Example:

  • Consider the attribute percentage-of-time which is the portion of time a particular employee is committed to a particular project
  • Since its meaning depends on both the employee and project, it is:
    • neither an attribute of employee
    • nor an attribute of project
  • it's therefore a relationship attribute

Role

role is a relationship attribute that defines the function performed in the relationship. It is used to distinguish two entity (object) of the entity set (class) when describing its use in the context of an association.

For instance, Husband and wife are roles

Visualisation / Representation / Implementation

A relationship can be represented or implemented in different ways. See Relationship Representation

Arity / Degree

The degree of a relationship is the number of entities that participate in the relationship.

A relationship may be:

  • binary (concerns only two elements)
  • or multinary (concerns more than two elements) (ie a+b=c)

Property

Relationship Property are only for binary relationship (ie between two elements)

Property Definition on a binary relationship
antisymmetric if a is related to b, then b is not related to a or a = b
asymmetric if a is related to b, then b is not related to a
symmetric if a is related to b, then b is related to a
reflexive if a can be related to a (to itself )
transitive if a is related to b, b is related to c, then a is related to c

Comparable

A relationship is of true or false and can then be described by a comparison operator.

Relationship by data type





Discover More
Relational Data Model
(Relation|Table) - Tabular data

A Relation is a logical data structure composed of tuple (row) attribute (column, field) The following data structure are a relation: a table, a materialized view (query) (store data) a query,...
Data System Architecture
Logical Data Modeling

A data model in software engineering is a graph of entity that try to represent the reality and describes how data are represented and accessed. the real world consists of entities and relationships....
Without Data Model
Logical Data Modeling - Data Model

A data model is an (abstract) model that describes how data are represented and accessed. Data models formally define entity and relationships among entities for a domain of interest. schema A data...
Data System Architecture
Logical Data Modeling - Global Identifier (Fully Qualified Name, Canonical Form)

A global identifier identify uniquely a primary element (entity or relationship) in the global scope It's also generally known as: the fully qualified id the fully qualified name the canonical...
Data Model Ontology
Logical Data Modeling - Ontology

Data modeling is a sort of ontology. Ontology is the philosophical study of the nature of being, existence or reality in general which deals with questions concerning what entities exist or can be said...
Data System Architecture
Logical Data Modeling - Primary Key (Id, Name)

A Primary Key is a key that identify indefinitely uniquely an element: entity or a in their local scope. It's a part of the fully qualified identifier. A real primary key is immutable as...
Data System Architecture
Logical Data Modeling - Value (Operand)

A value may be obtained by: observation or measurement Values may represents the structural characteristic of: an entity (case) or a relationship A value is stored in a field (cell). ...
Data System Architecture
Tree - (Recursion|Induction) Algorithm

A recursive algorithms invoke themselves as a subroutine with a smaller input. The idea of the recursion tree method is to write out all of the work done by the recursive algorithm in a tree structure,...



Share this page:
Follow us:
Task Runner