ER Diagrams and the Relational Model Flashcards

1
Q

Entities

A
  • “Things”
  • Represented using rectangles
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

Attributes

A
  • Describe entities
  • Represented as ovals connected by a line to the entity
  • Double ovals for attributes with multiple possible values
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

Key

A
  • A collection of attributes that can uniquely identify each entity in an entity set
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

Candidate Key

A
  • A minimal collection of attributes that is a key
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

Primary Key

A
  • Chosen from the set of possible candidate keys
  • Underlined in the ER diagram
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

Relationships between Entities

A
  • Represented using diamonds that are connected to the relevant entity sets
  • The Key is the union of the primary keys of the related entities
  • The resulting key may not be minimal
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

Role Indicators

A
  • Labels on the lines to distinguish the roles of the entities in the relationship
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

Cardinality Constraint

A
  • Limits the number of times a given entity can appear in a relationship set
  • An entity in A having “at most one” entity in B is denoted by an arrow going into entity in B
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

Many-to-One Relationship

A
  • In a many-to-one relationship from A to B, an entity in A can be related to at most one entity in B, and an entity in B can be related to 0+ entities in A
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

One-to-One Relationship

A
  • An entity in A can be related to at most one entity in B, and an entity in B can be related to at most one entity in A
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

Many-to-Many Relationship

A
  • An entity in A can be related to 0+ entities in B, and an entity in B can be related to 0+ entities in A
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

Participation Constraint

A
  • An entity in A having “at least one” entity in B is denoted by a thick line going from the entity in A
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

Relational Terminology

A
  • Table = relation
  • Row = tuple
  • Column = attribute
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

Relational Schema

A
  • Consists of the name of the relation, the name of the attributes, and the domains of the attributes
  • The relational database schema is made up of the schemas of all of the relations in the database
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

Special Case: Many-to-One Relationship Sets

A
  • Eliminate the relation for the relationship set
  • Combine the entity and attributes on the “one” end into the “many” end
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

Uniqueness Constraint

A
  • No two rows will have the same primary key
17
Q

Special Case: One-to-One Relationship Sets

A
  • The relationship can be captured in the relation used for either of the entity sets
18
Q

Primary Keys in Relationship Sets

A
  • Many-to-many: the union of the primary keys
  • One-to-one: the primary key of either set
  • Many-to-one: the primary key of the entity set at the “many” end
19
Q

Foreign Key

A
  • An attribute in a relation that takes on values from the primary key attribute(s) of another relation
20
Q

First Normal Form (1NF)

A
  • All data is in the form of tables (relations)
21
Q

Second Normal Form (2NF)

A
  • An attribute that is not part of a key that depends on a subset of a key should be separated into a new table
22
Q

Third Normal Form (3NF)

A
  • Separate foreign keys dependent on foreign keys