-
When was the Relational model first proposed and implemented?
- Proposed: 1970
- Implemented: 1980
-
What is a relational model?
A collection of relations
-
What is a relation composed of?
- Attributes
- Tuples
- Constraints
-
How are specific relations defined?
Using a relation schema
-
What is a relation instance?
A relation populated with tuples at a given time
-
What is an attribute's domain?
A set of valid values that an attribute obtains it's values from
-
What is a tuple?
- An ordered a list of values, each associated with a domain
- A record
-
What is a foreign key?
A set of attributes in a relation that reference the primary key in another relation
-
Difference between a Relation and a Relationship
- A relationship links two entities
- A relation is much like an entity
-
Characteristics of relations
- Tuples are not ordered
- Attributes are ordered
- All attribute values are either atomic or null
- A null value can either be "unknown" or "not applicable"
-
How are composite (branched) attributes represented in an ER map?
- Ignore any non leaf nodes
- Only list the leaves
-
How are multi-valued attributes represented in an ER map?
- The attribute will be written out (like a relation/entity) for each of it's possible values
- Each instance of the attribute will have the host-relation's primary key as a foreign key and it's own value
-
Should derived attributes be included in ER maps?
- Sometimes, but they don't have to be
- Can be represented as regular attributes
-
How are weak entities represented in ER maps?
- The weak entity will have the host-entity's primary key as a foreign key
- It may have it's own partkey
- Both keys will be underlined separatelyThere will be a note about what the foreign key references
-
How is 1-to-1 with total participation represented on an ER map?
The side with total participation will have the other entities primary key as a foreign key
-
How is 1-to-1 with total participation on both sides represented on an ER map
- Only one entity will have the other's primary key as a foreign key, not both
- The foreign key is not underlined
- Add a note indicating that the foreign key is unique
-
How is 1-to-1 with both partial participation represented on an ER map?
- The relationship is drawn as a relation(entity)
- The new relation takes a foreign key from both sides, only one is underlined
- Note down that the non-underlined foreign key is unique
-
Why is a separate relation needed for 1-to-1 with partial participation on both sides?
To avoid the use of null values
-
How is 1-to-N with N-side participation represented in an ER map?
- For the N relation, include the other relation's primary key as a foreign key (not underlined)
- Similar to 1-to-1 with total participation, but the foreign key is not unique
- Add a note that the foreign key is not unique
-
How are N-to-M relations represented in an ER map?
- A separate relation must be used
- Include primary keys from both of the related relations - Both keys are underlined together
-
How is N-to-M with total participation represented on an ER map?
- This isn't possible, but it should be noted on a regular N-to-M representation that one (or both) have total participation
- The same is true for partial - Participation can't be shown in this case, you have to rely on the note below
-
How is specialization with total participation represented on an ER map?
Both of the child relations will have the primary key from the parent as an underlined foreign key, followed by their own attributes
-
How to enforce disjoint of overlapping specialization in an ER map?
You can't make a note and do it programmatically
-
How is specialization with total participation (of the parent) represented on an ER map?
- The parent relation is not written
- Both of the child relations are written, and all of the patent's attributes are included before the child's
- The parent's primary key is included and underlined for each child
|
|