Rob & Coronell - Chapter 3.1 + 3.2 Flashcards

1
Q

How does the relational model enable you to view data?

A

In a logical way instead of in a physical way.

-> It focusses on entities and their relationships as opposed to the physical way of storing data.

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

What is a table?

A
  • A two-dimensional structure composed of rows and collumns

- It contains a group of related entity occurrences

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

What does a tuple / table row represent?

A

A sinle entity occurrence within the enitity set

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

What does each table column represent?

A

An attribute, each with a distinct name

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

What does each row and column intersection represent?

A

A single data value

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

What is the attribute domain in a relational table?

A

The specific range of values related to each column

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

What are four characteristics of a relational table?

A
  1. All value in a column must conform to the same data format.
  2. Each column has a specific range of values known as the attribute domain
  3. The order of the rows and columns is immaterial to the DBMS
  4. Each table must have an attribute or combination of attributes that uniquely identifies each row
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

What is a key in a relational database?

A

A key consists of one or more attributes that determine other attributes.

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

Why are keys important in a relational database?

A
  1. They are used to ensure that each row in a table is uniquely identifiable.
  2. They are used to establish relationships among tables and to ensure the integrity of the data.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

What is the primary key?

A

An attribute, or combination of multiple attributes, that uniquely identifies any given row.

–> The candidate key chosen to be the unique row identifier.

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

What is meant by determination?

A

If you know the value of attribute A, you can look up the value of attribute B.

Notation A –> B

In case it determines more attributes:
A –> B, C, D

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

What is functional dependence?

A

Attribute A determines attribute B (that is, B is functionally dependent on A) if all of the rows in the table that agree in value for attribute A also agree in value for attribute B.

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

What is a composite key?

A

If a key is composed of more than one attribute

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

What is a key attribute?

A

Any attribute that is part of a key

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

What is full functional dependence?

A

If the attribute (B) is functionally dependent on a composite key (A) but not on any subset of that composite key, the attribute (B) is fully functionally dependent on (A).

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

What is a superkey?

A

Any attribute or combination of attributes that uniquely identifies each row.

17
Q

What is a candidate key?

A

A minimal superkey: Every candidate key is a super key, but you choose the one (or combination) that has the least redundant attributes.

18
Q

What is entity integrity?

A

If each row is uniquely identified by the primary key.

  • means that a primary key can not contain a null
19
Q

What can a null represent?

A
  • An unknown attribute value
  • A known, but missing, attribute value
  • A ‘not applicable’ condition

-> Therefore, if used improperly, they can cause problems due to the different meanings.

20
Q

What is controlled redundancy?

A

If a table A has an attribute in it which is also stored in table B. Normally, we aim to remove duplicate data. However, in some cases it is needed to further identify the relationship. Think about a foreign key.

21
Q

What is data redundancy?

A

Unnecessary duplication of attribute values

22
Q

What is a relational schema?

A

A textual representation of the database tables where each table is listed by its name, followed by the list of its attributes in parentheses. The primary key attributes are underlined.

23
Q

What is a foreign key?

A

An attribute whose values match the primary key values in the related table.

24
Q

What is referential integrity?

A

Refers to the accuracy and consistency of data within a relationship.

That if the foreign key contains a value, that value refers to an existing valid tuple (row) in another relation.

-> All values of a foreign key refer to existing values in another relation

25
Q

What is a secondary key?

A

A key that is used strictly for data retrieval purposes.