Logical Design Flashcards

1
Q

What is a relation?

A

A relation is a two-dimensional table with specific characteristics. A table/entity may be a relation.

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

What is the degree of a relation?

A

The number of columns in that relation.

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

What is the cardinality of a relation?

A

The number of tuples or rows in that relation.

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

What is a foreign key?

A

A foreign key is a key that refers to an attribute (or set of attributes) within a relation that matches a candidate key of another.

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

T/F: Each cell of a relation should have (one/multiple) atomic values.

A

One

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

T/F: Each attribute (may/must) have a distinct name.

A

Must

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

T/F: A relation has a name that (is/is not) distinct from all other relation names in the database.

A

Is

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

T/F: Each tuple (may be/is) distinct.

A

Is

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

T/F: The order of attributes and tuples (has/has no) significance.

A

Has no

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

What is the difference between a relation instance and a relation schema?

A

A relation instance is an single tuple/instance of data in that relation, while a relation schema is the definition of that relation, by its name and attributes.

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

What are integrity constraints?

A

Integrity constraints are restrictions placed on the values of attributes.

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

What is entity integrity?

A

Entity integrity means that no two tuples can have identical candidate key values, and that no attribute of a candidate key can be NULL.

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

What is referential integrity?

A

Referential integrity means that if a foreign key exists within a relation, either the foreign key value matches a primary key value in its home relation, or the foreign key value is NULL.

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

What is a domain constraint?

A

A domain constraint allows the RDBMS to carry out checks on data errors and determine the range of operations that can be carried out in the domain.

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

What is a view?

A

A view is a virtual subset of a base relation.

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

How may we model a one-to-many binary relationship in a logical design?

A

In a one-to-many relationship, the foreign key must be placed on the many side. This is so that we can give each “many” a reference back to the “one”.

17
Q

How may we model a one-to-one binary relationship in a logical design?

A

In a one-to-one relationship, our modelling depends on which side is mandatory. We must place a foreign key on any table that is considered mandatory for the database.

In the case that both sides are optional, we can decide which side to place it on.

18
Q

How may we model a many-to-many binary relationship in a logical design?

A