Relational Model Flashcards

(14 cards)

1
Q

Define candidate key

A

The minimal set of attribute(s) whose value(s) uniquely identify each tuple
- Primary key (selected)
- Alternate key (not selected)

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

Define foreign key

A

An attribute, or set of attributes, within one relation that matches the primary key of another relation

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

Properties of Relations

A

a relation name is district

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

What is Relation schema

A

a named relation defined by the relation name (table name) and attributes.

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

What is Relation instance/state

A

a set of tuples from a relation schema.

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

Define Integrity Constraints

A

restrictions placed on the values of attributes

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

Explain Entity Integrity

A

― Uniqueness: No two tuples can have identical values for candidate keys.
― Not-Null: No attribute of a candidate key can be a NULL.
* Null: A value of an attribute is currently unknown or not applicable for this tuple.

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

Explain Referential integrity

A

If a foreign key exists in 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
9
Q

Define Domain

A

the set of allowable values for one or more attributes

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

Explain Domain Contrasts

A

enables the RDBMS to carry out checks on data errors and to determine the range of operations that can be carried out on the domain
― E.g., if the attribute Age is specified to be in the range16-30, any number outside would give an error
― E.g., If the attribute Name is to hold a set of characters, then any multiplication or division operations on the attribute values are illegal

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

Define views

A

a subset of base relation(s)

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

define base relation

A

A named relation corresponding to an entity in the conceptual schema, whose tuples are physically stored in the database

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

What are the features of views

A
  • Virtual/derived relation. It does not necessarily exist in the database, but can be produced upon request.
  • Dynamic. The changes made to the base relation(s) that affect the view are immediately reflected in the view.
  • Generated by applying appropriate relational operations (e.g., 𝜎, 𝜋, x, ⋈, ….)
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

What are the purpose of views

A
  • Securitymechanism
  • Customize user’s need
  • Simplify complex operations on the base relations
How well did you know this?
1
Not at all
2
3
4
5
Perfectly