Relational Model Flashcards

1
Q

What is a relation schema?

A

Named relation followed by set of attributes e.g. Branch(branchNo, street, city, postcode)

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

Can a single attribute have multiple values in a relational schema?

A

No

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

How do you identify a primary key in a relational schema?

A

Listed first, underlined and declared explicitly

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

What is the degree of a relational model?

A

Number of attribute columns

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

What is the cardinality of a relational model?

A

Number of rows

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

What is a domain in relational schema?

A

Set of allowed values for attributes

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

What is null?

A

An uknown or not applicable value in a row

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

How do you identify a foreign key in a relational schema?

A

Declared explicitly

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

How is an entity type translated?

A

Each type becomes its own relational schema with certain special attributes being translated differently

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

How are composite attributes translated?

A

Broken down into separate attributes in its entities schema

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

How are multi-valued attributes translated?

A

Becomes its own relational schema with its attribute, foreign key of entity, and composite primary key of them both

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

How are derived attributes translated?

A

Not necessary to store, and are not included

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

How are weak entity types translated?

A

Becomes a relational schema with its attributes and a composite key of its dependant relationship’s primary key and its own partial key

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

How are 1:M relationships translated?

A

Add to attribute list of the child entity (M side) a foreign key of the parent’s (1 side) primary key e.g. Staff(staffNo, lname, branchNo)

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

How are 1:1 relationships translated?

A

treated as 1:M where the child is chosen as the one with total participation (if possible) e.g. Staff(staffNo, lname, branchNo)

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

How are M:M relationships translated?

A

New schema created, including relationship attributes, foreign keys as primary keys of each participating entities, where the primary is a composite of all foreign keys e.g. Views(clientNo, propNo, viewDate)

17
Q

How are recursive relationships translated?

A

Treated like any other relationship, but foreign key must differ to maintain distinct attribute names e.g. Staff(saffNo, lname, supervisor)

18
Q

How are non binary relationships translated?

A

New relation schema including all foreign keys of participating entities primary keys, picking the relations primary key as all foreign keys of parent entities e.g. Registers(clientNo, _staffNo, branchNo, startDate)