The relational data model

Get Started. It's Free
or sign up with your email address
The relational data model by Mind Map: The relational data model

1. Relatinship between relational databse

1.1. * 1:M relationship

1.1.1. -Relational modeling ideal -Should be the norm in any relational database design

1.2. * 1:1 relationship

1.2.1. - Should be rare in any relational database design

1.3. * M:N relationships

1.3.1. - Cannot be implemented as such in the relational model - M:N relationships can be changed into 1:M relationships

1.3.2. -Implemented by breaking it up to produce a set of 1:M relationships - Avoid problems inherent to M:N relationship by creating a composite entity Includes as foreign keys the primary keys of tables to be linked

2. Rules of Integrity

2.1. Referential integrity

2.1.1. is a database feature in relational database management systems that ensures the relationships between tables in a database remain accurate by applying constraints to prevent users or applications from entering inaccurate data or pointing to data that doesn't exist.

2.1.2. The primary key of a database table is a unique identifier assigned to each record. Each table will have one or more columns designated as the primary key.

2.2. Entity Integrity

2.2.1. ensures that there are no duplicate records within the table and that the field that identifies each record within the table is unique and never null.

2.2.2. The primary key for a row is unique; it does not match the primary key of any other row in the table.

2.2.3. The primary key is not null, no component of the primary key may be set to null.

3. what is means by key ?

3.1. - Each row in a table must be uniquely identifiable - Key is one or more attributes that determine other attributes - Key’s role is based on determination If you know the value of attribute A, you can determine the value of attribute B - Functional dependence Attribute B is functionally dependent on A if all rows in table that agree in value for A also agree in value for B

4. relational set Operators

4.1. Relational algebra

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

4.1.2. Use of relational algebra operators on existing relations produces new relations

4.1.3. examples

4.1.3.1. SELECT

4.1.3.2. PROJECT

4.1.3.3. UNION

4.1.3.4. DIFFERENCE

4.1.3.5. INTERSECT

4.2. Relational Set Operators

4.2.1. Natural Join

4.2.1.1. Links tables by selecting rows with common values in common attribute(s)

4.2.2. Equijoin

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

4.2.3. Theta join

4.2.3.1. Any other comparison operator is used

4.2.4. Outer join

4.2.4.1. Matched pairs are retained, and any unmatched values in other table are left null

5. Characteristics of relational table

5.1. a table is percieved as two-dimensional structure composed of rows and columns.

5.2. each table represent a single entity occurance within the entity set.

5.3. each table column represents an attribute, and each column has a distinct name.

5.4. each row/column intersection represents a single data value.

5.5. all values in a column must conform to the same data format.

5.6. each column have a specific ranges of value known as attribute domain.

6. the types of keys

6.1. Composite key Composed of more than one attribute

6.2. Key attribute Any attribute that is part of a key

6.3. Superkey Any key that uniquely identifies each row

6.4. Candidate key A superkey without unnecessary attributes

6.5. Foreign key (FK) An attribute whose values match primary key values in the related table

6.6. Secondary key Key used strictly for data retrieval purposes