The Relational Model Flashcards

1
Q

What are the three components of a data model?

A
  • Structural part
  • Manipulative part
  • Integrity rules

Integrity rules ensure that the stored data is accurate.

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

What is a Relational Model based on?

A

2D tables, set theory, and relational algebra.

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

What is a Relation in the context of a relational database?

A

A table with columns and rows.

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

What does the Degree of a relation refer to?

A

The number of attributes it contains.

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

What does Cardinality indicate in a relation?

A

The number of tuples contained in a relation.

Tuble = Row

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

What is an Attribute in a relation?

A

A named column.

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

Fill in the blank: A _______ is a row of a relation.

A

Tuple

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

What is a Domain in the context of a relational database?

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
9
Q

What is a Superkey?

A

An attribute or set of attributes that uniquely identifies a tuple within a relation.

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

What is a Candidate Key?

A

A minimal superkey that uniquely identifies a tuple without redundant attributes.

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

True or False: A candidate key can only involve one attribute.

A

False

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

What are the two properties of candidate keys?

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

What is a Primary Key?

A

A candidate key selected to identify tuples uniquely within the relation.

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

What is an Alternate Key?

A

Candidate keys that are not selected to be the primary key.

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

Fill in the blank: Relational database schema is a collection of appropriately structured _______.

A

relations

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

What is the significance of the order of attributes and tuples in a relation?

A

The order has no significance.

17
Q

What must each cell of a relation contain?

A

Exactly one single (atomic) value.

18
Q

What does the term ‘tuple’ refer to in a relational database?

A

A row of a relation.

19
Q

What is an alternate key?

A

A candidate key that is not selected to be the primary key.

20
Q

What is a foreign key?

A

An attribute that establishes a relationship between two tables by linking to the primary key of another relation.

21
Q

Can a foreign key have duplicate values?

A

Yes, a foreign key allows duplicate values in a relation.

22
Q

What is relational integrity?

A

The set of integrity constraints that ensure the data in a relational database is accurate.

23
Q

What are the two principal integrity rules?

A
  • Entity integrity rule
  • Referential integrity rule
24
Q

What does a Null represent in a database?

A

A value for an attribute that is currently unknown or not applicable.

25
True or False: A Null is the same as zero or spaces.
False
26
What does entity integrity ensure about primary key attributes?
Primary key attributes must be unique and not null.
27
What happens if a primary key value is duplicated?
Saving the record will give an error.
28
What is referential integrity?
It ensures the validity of foreign keys and consistency between linked tables.
29
What must a foreign key value do to maintain referential integrity?
It must match a candidate key value of some tuple in its home relation or be wholly null.
30
What issues can arise with entity integrity in a table?
Duplicate primary key values or NULL primary key values.
31
Fill in the blank: A _______ represents the absence of a value.
Null
32
Fill in the blank: The _______ ensures that no duplicate primary key values are allowed in a table.
Entity integrity
33
What is a relation?
A table
34
What is a relation schema?
It defined
35
What is relation schema?
A relation defined by a set of attributes and domain name pairs
36
What does referential integrity ensure?
That foreign keys are valid and consistency between linked tables