RELATIONAL DATA MODEL

Get Started. It's Free
or sign up with your email address
RELATIONAL DATA MODEL by Mind Map: RELATIONAL DATA MODEL

1. RELATIONSHIP

1.1. 1-M Relationships

1.1.1. https://padlet.com/habibahcmh97/gzq8h0962e4t

1.1.2. A one-to-many relationship is the most common type of relationship. In this type of relationship, a row in table A can have many matching rows in table B, but a row in table B can have only one matching row in table A.

1.2. Many-to-Many Relationships

1.2.1. In a many-to-many relationship, a row in table A can have many matching rows in table B, and vice versa. You create such a relationship by defining a third table, called a junction table, whose primary key consists of the foreign keys from both table A and table B

1.3. One-to-One Relationships

1.3.1. In a one-to-one relationship, a row in table A can have no more than one matching row in table B, and vice versa. A one-to-one relationship is created if both of the related columns are primary keys or have unique constraints.

2. RELATIONAL SET OPERATORS

2.1. Relational algebra

2.1.1. Defines theoretical way of manipulating table contents using relational operators

2.1.2. Natural Join Links tables by selecting rows with common values in common attribute(s)

2.1.3. Equijoin Links tables on the basis of an equality condition that compares specified columns

2.1.4. Theta join Any other comparison operator is used

2.1.5. Outer join Matched pairs are retained, and any unmatched values in other table are left null

3. INTEGRITY RULES

3.1. Entity integrity: primary keys - Each table has column(s) with unique values - Ensures entities are traceable -- No two rows with the same primary key value - No null values in any part of a primary key

3.1.1. Text book, exercises 34, 35, 36, 37

3.2. Referential integrity: foreign keys - Values of a column in one table match values in a source table - Ensures valid references among tables

4. KEYS

4.1. Superkey: column(s) with unique values

4.1.1. Text book p. 55-60

4.1.2. Joseph Conrad "Heart of Darkness"

4.2. Candidate key: minimal superkey

4.3. Primary key: a designated candidate key; cannot contain null values

4.4. Foreign key: column(s) whose values must match the values in a candidate key of another table