The Relational Data
by atyn janani
1. Integrity rules
1.1. Entity Integrity
1.1.1. All primary key entries are unique, and cannot be null.
1.2. Reference Integrity
1.2.1. A foreign key may have either a null entry, as long as it is not a part of its table's primary key, or an entry that matches the primary key value in a table which it is related.
2. Relational Set Operators
2.1. Natural Join
2.1.1. Links tables by selecting rows with common values in common attribute(s)
2.2. Equijoin
2.2.1. Links tables on the basis of an equality condition that compares specified columns
2.3. Theta join
2.3.1. Any other comparison operator is used
2.4. Outer join
2.4.1. Matched pairs are retained, and any unmatched values in other table are left null
3. Relationship
3.1. One to one
3.1.1. Should be rare in any relational database design
3.2. One to many
3.2.1. Should be the norm in any relational database design
3.3. Many to many
3.3.1. Cannot be implemented as such in the relational model and to change into one to one relationship
4. Characteristic of relational table
4.1. two-dimensional structure composed of row and column
4.2. Each table row(tuple) represent a single entity
4.3. Each table column represent an attribute
4.4. Each table must have an attribute or combination of attribute that is uniquely identify
4.5. All values in column must conform to the same data format
5. Keys
5.1. Composite key - Composed of more than one attribute
5.2. Key attribute - Any attribute that is part of key
5.3. Super key - Any key that is uniquely identify
5.4. Candidate key - A superkey without unnecessary attributes
5.5. Primary key - A candidate key selected to uniquely identify
5.6. Foreign key - An attribute whose values match primary key values in the related table
6. Relational set operators
6.1. Relational algebra - Define theoritical way of manipulating table contents using relational operators
6.2. -SELECT -PROJECT -UNION - INTERSECT -DIFFERENCE -JOIN -PRODUCT -DIVIDE
6.3. Natural join - Links tables by selecting rows with common values in common attributes
6.4. Equijoin - Links tables on the basis of an equality condition that compares specified colums
6.5. Thete join - any other comparison operator is used
6.6. Outer join - Matched pairs are retained, and any unmatched values inother table are left null