Module 05a - Relationship and Cardinality Flashcards

1
Q

Data Model vs DB Design

A
  • A data model is a plan or blueprint for a database design
  • Data model is more generalized and abstract than DB design
  • It is easier to change a data model then it is to change a database design, so it is the place to work through conceptual DB problems.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

Data Model = Conceptual design

A

Conceptual design = data model
Logical design
Physical design

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

ER Model

A

Is a set of concepts and graphical symbols that can be used to create conceptual schemas

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

ER Model versions

A
  • Original ER model - Peter Chen (1976)
  • Extended ER model
  • Information Engineering (IE) - James Martin (1990) “crow foot notation”
  • IDEF1X
  • UML
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

Crow foot notation

A

Developed by James Martin (1990), also known as crow foot notation. It is easier to understand

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

Entity

A

Something that can be identified and the users want to track

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

Entity class

A

A collection of entities of a given type

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

Entity instace

A

The occurrence of a particular entity

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

Attributes

A

Attributes describe an entity’s characteristics. All entity instances of a given entity class have the same attributes, but vary in the values of those attributes.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

Identifier

A
  • Are attributes that name, or identify, entity instances.
  • The identifier of and entity instance consists of one or more of the entity’s attributes.
  • Composite identifiers are identifiers that consists of two or more attributes.
  • Identifiers in data models become keys in database designs.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

Relationships

A

Associate one entity with another

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

Relationships classes vs Relationships instances

A
  • Relationship classes are associations among entity classes

- Relationships instances are associations among entity instances

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

Degree

A

Is the number of entity classes in the relationship.

  • Two entities have a binary relationship of degree two
  • Three entities have ternary relationship of degree three
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

Cardinality

A

Means “count”, and is expressed as a number.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

Maximum cardinality

A

Is the maximum number of entity instances that can participate in a relationship.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

Minimum cardinality

A

Is the minimum number of the entity instances that must participate in a relationship.

17
Q

Types of Maximum cardinality

A

One-to-One [1:1]
One-to-Many [1:N]
Many-to-Many [N:M]

18
Q

HAS-A Relationships

A

Each entity instance has a relationship with another entity instance.
An EMPLOYEE has one or more COMPUTERs.
A COMPUTER has one assigned EMPLOYEE.

19
Q

HAS-A vs IS-A

A

Inheritance: IS-A
- Cat “is a” animal

Composition: HAS-A
- Cat “has a” tail

20
Q

Minimum Cardinality values

A

Minimums are generally stated as either zero or one:
IF zero [0] THEN participation in the relationship by the entity is optional, and no entity instance must participate in the relationship.
IF one [1] THEN participation in the relationship by the entity is mandatory, and at least one entity instance must participate in the relationship.

21
Q

Minimum Cardinality representation

A

Minimum cardinality of zero [0] indicating optional participation is indicated by placing an oval next to the optional entity.
Minimum cardinality of one [1] indicating mandatory (required) participation is indicated by placing a vertical hash mark next to the required entity.