Relationships are the established associations between two or more tables in one or more databases. Relationships are based on common fields from more than one table, often involving primary and foreign keys. SQL JOIN statements are used in queries to combine data or rows from two or more tables based on foreign keys common between them.
Timbr relationships substitute complex JOIN statements so SQL queries become significantly shorter and easier to understand. They represent relationships between two concepts that are matched by the properties of each concept.
In Timbr you can define two types of relationships:
• One-to-Many Relationships – Represented by a relationship between two concepts when in one instance of a concept may be linked to many instances of another concept. One-to-Many relationship can also be represented this way when only one instance of a concept corresponds to only one other instance of a concept.
• Many-to-Many Relationships – Represented by a relationship between two concepts where many instances of one concept may be linked to many instances of another concept. Many-to-Many relationships is formed from a linked table with two foreign keys to two different concepts linking them together.
Both One-to-Many and Many-to-Many relationships can be defined as a Transitive Relationship.