Database Fundamentals 3 Flashcards

1
Q

Attribute

A

Named column in relational table.

It draws values from the domain

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

Domain

A

The set of possible values for the attribute

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

Degree

A

Number of attributes

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

Cardinality

A

Number of rows

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

Key

A

A key is one or more attributes that determine other attributes.

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

Composite key

A

Composed of more than one attribute

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

Types of relational database keys

A
  1. Superkey
  2. Candidate key
  3. Primary key
  4. Secondary key
  5. Foreign key
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

Superkey

A

An attribute (or combination of attributes) that uniquely identifies each row in a table.

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

Candidate key

A

A minimal (irreducible) superkey. A superkey that does not contain a subset of attributes that is itself a superkey.

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

Primary key

A

A candidate key selected to uniquely identify all other attribute values in any given row. Cannot contain null values.

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

Secondary key

A

An attribute (or combination of attributes) used strictly for data retrieval purposes.

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

Foreign key

A

An attribute (or combination of attributes) in one table whose values must either match the primary key in another table or be null.

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

What can Nulls represent?

A
  1. An unknown attribute value.
  2. A known, but missing, attribute value.
  3. A “not applicable” condition.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

What do flags do?

A

Flags indicate the absence of some value

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

What is controlled redundancy?

A

Control data redundancy by using common attributes shared by tables.

Foreign keys make the relational database work, and enables tables to be linked together. This is crucial to exercising data redundancy control.

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

What are Integrity Rules?

A
  1. Entity Integrity:
    - Requirement: All primary key entries are unique, and no part of a primary key may be null.
    - Purpose: Each row will have a unique identity, and foreign key values can properly reference primary key values.
  2. Referential Integrity:
    - Requirement: A foreign key may have either a null entry, as long as it is not a part of the table’s primary key, or an entry that matches the primary key value in a table to which it is related.
    - Purpose: It is possible for an attribute NOT to have a corresponding value, but it will be impossible to have an invalid entry. The enforcement of the referential integrity rule makes it impossible to delete a row in one table whose primary key has mandatory matching foreign key values in another table.
17
Q

What is The Data Dictionary?

A

It provides detailed accounting of all tables found within the database.

It contains (at least) all the attribute names and characteristics for each table in the system.

It also contains metadata, also known as the metadata repository.

18
Q

1:M Relationship

A

Should be the norm in any relational database design

19
Q

1:1 Relationship

A

Should be rare in any relational database design.

One entity relates to only one other entity and vice versa.

Sometimes this means that entity components were not defined properly.

This could indicate that two entities actually belong in the same table.

20
Q

M:N Relationships

A

Cannot be implemented as such in the relational model.

You can avoid problems inherent to M:N relationships by creating a composite/bridge entity. It is implemented by breaking it up into a set of 1:M relationships. It includes as foreign keys the primary keys of tables to be linked.

21
Q

What are indexes?

A

Orderly arrangement to logically access rows in a table.

Each index is associated with only ONE table.

Main purpose: To optimize query speed.

22
Q

Index key

A

Index’s reference point.

Points to data location identified by the key.

23
Q

Unique index

A

Index in which the index key can have only one pointer value (row) associated with it.