Chapter 3 Flashcards

(47 cards)

1
Q

Relational database model enables…

A

Logical representation of the data and its relationships

Logical simplicity yields simple and effective database design methodologies

The logical view is facilitated by the creation of data relationships based on a logical construct called a relation

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

Characteristics of a relational table (1-4)

A
  1. A table is perceived as a 2-D structure composed of rows and columns
  2. Each table row (tuple) represents a single entity occurrence within the entity set.
  3. Each table column represents an attribute, and each column has a distinct name.
  4. Each intersection of a row and a column represents a single data value.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

Characteristics of a relational table (5-8)

A
  1. All values 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
4
Q

Keys

A

Consist of one or more attributes that determine other attributes.
-Ensures that each row in a table is uniquely identifiable
-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
5
Q

Primary key (PK)

A

Attribute or combination of attributes that uniquely identifies a row.

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

Determination

A

State in which knowing the value of one attribute makes it possible to determine the value of another.
-Establishes the role of a key
-Based on the relationships among the attributes.

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

Functional dependence.

A

The value of one or more attributes determines the value of one or more other attributes.

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

Determinant (key)

A

The attribute whose value determines another. Can comprise more than one attribute.

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

Dependent

A

Attribute whose value is determined by the other attribute.

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

Full functional dependence

A

The entire collection of attributes in the determinant is necessary for the relationship.

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

Composite Key

A

Key that is composed of more than one attribute

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

Key attribute

A

Attribute that is a part of a key.

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

Foreign key (FK)

A

Primary key of one table that has been placed into another table to create a common attribute.

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

Secondary key

A

Key used strictly for data retrieval purposes.

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

Superkey

A

Key that can uniquely identify any row in the table

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

Candidate key

A

Minimal super key (without unnecessary attributes). The PK is the candidate key chosen to uniquely identify a row on a table

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

Entity integrity

A

Condition in which each row in the table has its own unique identity

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

Two requirements of a PK

A

-All of the values in the primary key must be unique
-No attribute in the primary key can contain a null.

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

Referential integrity

A

Every reference to an entity instance by another entity instance is valid

20
Q

Entity integrity rules

A

All primary keys must be unique and none can be null.

This is to uniquely identify each row, and then foreign keys can properly reference primary key values.

21
Q

Referential integrity rules

A

A foreign key can be null, so long as it is not null in its table’s primary key. It also can be an entry that matches the primary key value in a table to which it is related.

22
Q

Ways to handle null: Flags

A

Special codes used to indicate the absence of some value.

23
Q

Ways to handle nulls: Constraints

A

NOT NULL Constraint:
-Placed on a column to ensure that every row in the table has a value for that column
-UNIQUE Constraint:
-Restriction placed on a column to ensure that no duplicate values exist for that column.

24
Q

Relvar (relational operator)

A

Variable that holds the structure of a relation
-Heading contains the names of the attributes
-Body contains the relations

25
Relational operators have the property of closure
Closure: use of relational algebra on existing relations produces new relations.
26
Relational set operators: Select
Unary operator that yields a horizontal subset of a table
27
Relational set operators: Project
Unary operator that yields a vertical subset of a table
28
Relational set operators: Union
-Combines all rows from two tables, excluding duplicate rows -Union-compatible: tables share the same number of columns, and their corresponding columns share the compatible domains
29
Relational set operators: Intersect
-Yields only the rows that appear in both tables -Tables must be union-compatible to yield valid results.
30
Relational set operators: Difference
-Yields all rows in one table that are not found in the other -Tables must be union-compatible to yield valid results
31
Relational set operators: Product
Yields all possible pars of rows from two tables
32
Relational set operators: Joins
Allow information to be intelligently combined from two or more tables
33
Natural Join
Links tables by selecting only the rows with common values in their common attribute
34
Equijoin
Links tables on the basis of an equality condition that compares specified columns of each table
35
Theta join
Links tables using an inequality comparison operator
36
Inner join
Only returns matched records from the tables that are being joined.
37
Outer join
Matched pairs are retained and unmatched values in the other table are left null.
38
Left outer join
Yields all the rows in the first table, including those that do not have a matching value in the second table
39
Right outer join
Yields all of the rows in the second table, including those that do not have matching values in the first table
40
Divide
-Uses one double-column table as the dividend and one single-column table as the divisor -Output is a single column that contains all values from the second column of the dividend that are associated with every row in the divisor.
41
Data dictionary
Description of all tables in the database created by the user and designer.
42
System catalogue
System data dictionary that describes all objects within the database
43
General tip for data dictionary and system catalogue
avoid homonyms and synonyms
44
Norm for relational databases
One-to-manu
45
To implement a many-to-many relationship
Implement by creating a new entity in 1:M relationships with the original entities
46
Composite entity
Helps avoid problems inherent to M:N relationships -Includes the primary keys of tables to be linked
47