Data Entities: Cardinalities & Keys Flashcards

1
Q

What is a Cardinality of a relationship?

A

How many instances of an entity relate to one instance of the other entity

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

Cardinality examples:

A

1..1, 1..*, ..

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

What is a primary key?

A

The attribute that uniquely identifies an entity

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

What is a foreign key?

A

Links attributes in other entities

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

What’s the relationship between primary and foreign key in a 1..* relationship?

A

The primary key from the “1 end” is added as foreign key in the “many end”

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

What’s the relationship between primary and foreign key in a 1..1 relationship?

A

Both ends may have the same primary key

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

How are relationships between entities created?

A

Created by keys and are represented by storing the primary key values in the other entity

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