Module 2- Relational Databases

0.0(0)
studied byStudied by 0 people
GameKnowt Play
learnLearn
examPractice Test
spaced repetitionSpaced Repetition
heart puzzleMatch
flashcardsFlashcards
Card Sorting

1/76

encourage image

There's no tags or description

Looks like no tags are added yet.

Study Analytics
Name
Mastery
Learn
Test
Matching
Spaced

No study sessions yet.

77 Terms

1
New cards

Predicate Logic

Used extensively in mathematics to provide a framework in which an assertion (statement of fact) can be verified as either true or false.

2
New cards

Set Theory

A part of mathematical science that deals with sets, or groups of things, and is used as the basis for data manipulation in the relational model

3
New cards

Tuple

In the relational model, a table row

4
New cards

Attribute Domain

In data modeling, the construct used to organize and describe an attribute’s set of possible values.

5
New cards

Primary Key

In the relational model, an identifier composed of one or more attributes that uniquely identifies a row. Also, a candidate key selected as a unique entity identifier.

6
New cards

Key

One or more attributes that determine other attributes.

7
New cards

Determination

The role of a key. In the context of a database table, the statement “A determines B” indicates that knowing the value of attribute A means that the value of attribute B can be looked up.

8
New cards

Functional Dependence

Within a relation R, an attribute B is functionally dependent on an attribute A if and only if a given value of attribute A determines exactly one value of attribute B. The relationship “B is dependent on A” is equivalent to “A determines B” and is written as A → B.

9
New cards

Determinate

Any attribute in a specific row whose value directly determines

other values in that row.

10
New cards

Dependent

An attribute whose value is determined by another attribute.

11
New cards

Full Functional Dependence

A condition in which an attribute is functionally dependent on a composite key but not on any subset of the key

12
New cards

Composite Key

A multiple-attribute key

13
New cards

Key Attribute

An attribute that is part of a primary key.

14
New cards

Superkey

An attribute or attributes that uniquely identify each entity in a table

15
New cards

Candidate Key

A minimal superkey; that is, a key that does not contain a subset of attributes that is itself a superkey.

16
New cards

Entity Integrity

The property of a relational table that guarantees each entity has a unique value in a primary key and that the key has no null values.

17
New cards

Null

The absence of an attribute value.

18
New cards

Foreign Key

An attribute or attributes in one table whose values must match the primary key in another table or whose values must be null.

19
New cards

Referential Integrity

A condition by which a dependent table’s foreign key must have either a null entry or a matching entry in the related table.

20
New cards

Secondary Key

A key used strictly for data retrieval purposes. For example, customers are not likely to know their customer number (primary key), but the combination of last name, first name, middle initial, and telephone number will probably match the appropriate table row. 

21
New cards

Purpose of Entity Integrity

Each row will have a unique identity, and foreign key values can properly reference primary key values.

22
New cards

Purpose of Referntial Integrity

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.

23
New cards

Flags

Special codes implemented by designers to trigger a required response, alert end users to specified conditions, or encode values. Flags may be used to prevent nulls by bringing attention to the absence of a value in a table.

24
New cards

Relational Algebra

A set of mathematical principles that form the basis for manipulating relational table contents; the eight main functions are SELECT, PROJECT, JOIN, INTERSECT, UNION, DIFFERENCE, PRODUCT, and DIVIDE.

25
New cards

Relvar

Short for relation variable, a variable that holds a relation. A relvar is a container (variable) for holding relation data, not the relation itself.

26
New cards

Closure

A property of relational operators that permits the use of relational algebra operators on existing tables (relations) to produce new relations.

27
New cards

SELECT

In relational algebra, an operator used to select a subset of rows. Also known as RESTRICT

28
New cards

PROJECT

In relational algebra, an operator used to select a subset of columns.

29
New cards

UNION

In relational algebra, an operator used to merge (append) two tables into a new table, dropping the duplicate rows. The tables must be union-compatible.

30
New cards

Union-Compatible

Two or more tables that have the same number of columns and the corresponding columns have compatible domains.

31
New cards

INTERSECT

In relational algebra, an operator used to yield only the rows that are common to two union-compatible tables.

32
New cards

DIFFERENCE

In relational algebra, an operator used to yield all rows from one table that are not found in another union-compatible table.

33
New cards

PRODUCT

In relational algebra, an operator used to yield all possible pairs of rows from two tables. Also known as the Cartesian product

34
New cards

JOIN

In relational algebra, a type of operator used to yield rows from two tables based on criteria. There are many types of joins, such as natural join, theta join, equijoin, and outer join.

35
New cards

Natural Join

A relational operation that yields a new table composed of only the rows with common values in their common attribute(s).

36
New cards

Join Columns

Columns that are used in the criteria of join operations. The join columns generally share similar values.

37
New cards

Equijoin

A join operator that links tables based on an equality condition that compares specified columns of the tables.

38
New cards

Theta Join

A join operator that links tables using an inequality comparison operator (<,>, <=, >=) in the join condition.

39
New cards

Inner Join

A join operation in which only rows that meet a given criterion are selected. The criterion can be an equality condition (natural join or equijoin) or an inequality condition (theta join). The most commonly used type of join.

40
New cards

Outer Join

A join operation that produces a table in which all unmatched pairs are retained; unmatched values in the related table are left null

41
New cards

Lefter Outer Join

A join operation that yields all the rows in the left table, including those that have no matching values in the other table

42
New cards

Right Outer Join

A join operation that yields all of the rows in the right table, including the ones with no matching values in the other table.

43
New cards

DIVIDE

In relational algebra, an operator that answers queries about one set of data being associated with all values of data in another set of data.

44
New cards

Data Dictionary

A DBMS component that stores metadata—data about data. Thus, the data dictionary contains the data definition as well as their characteristics and relationships. A data dictionary may also include data that are external to the DBMS. Also known as an information resource dictionary.

45
New cards

System Catalog

A detailed system data dictionary that describes all objects in a database

46
New cards

Homonym

The use of the same name to label different attributes. Homonyms generally should be avoided. 

47
New cards

Synonym

The use of different names to identify the smæ object, such as an entity, an attribute, or a relationship; synonyms should generally be avoided

48
New cards

Composite Entity

An entity designed to transform an M:N relationship into two 1:M relationships. The composite entity’s primary key comprises at least the primary keys of the entities that it connects. Also known as a bridge entity or associative entity

49
New cards

Linking Table

In the relational model, a table that implements an M:M relationship

50
New cards

Index

An ordered array of index key values and row ID values (pointers). Indexes are generally used to speed up and facilitate data retrieval. Also known as an index key.

51
New cards

Unique Key

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

52
New cards

Information (Dr. Codd’s 12 Relational Database Rules)

All information in a relational database must be logically represented as column values in rows within tables.

53
New cards

Guaranteed Access (Dr. Codd’s 12 Relational Database Rules)

Every value in a table is guaranteed to be accessible through a combination of table name, primary key value, and column name.

54
New cards

Systematic Treatment of Nulls (Dr. Codd’s 12 Relational Database Rules)

Nulls must be represented and treated in a systematic way, independent of data type.

55
New cards

Dynamic online catalog based on the relational model (Dr. Codd’s 12 relational database rules)

The metadata must be stored and managed as ordinary data—that is, in tables within the database; such data must be available to authorized users using the standard database relational language.

56
New cards

Comprehensive data sublangauge (Dr. Codd’s 12 relational database rules)

The relational database may support many languages; however, it must support one well-defined, declarative language as well as data definition, view definition, data manipulation (interactive and by program), integrity constraints, authorization, and transaction management (begin, commit, and rollback).

57
New cards

View updating (Dr. Codd’s 12 relational database rules)

Any view that is theoretically updatable must be updatable through the system.

58
New cards

High-level insert, update, and delete (Dr. Codd’s 12 relational database rules)

The database must support set-level inserts, updates, and deletes.

59
New cards

Physical data independence (Dr. Codd’s 12 relational database rules)

Application programs and ad hoc facilities are logically unaffected when physical access methods or storage structures are changed.

60
New cards

Logical data independence (Dr. Codd’s 12 relational database rules)

Application programs and ad hoc facilities are logically unaffected when changes are made to the table structures that preserve the original table values (changing order of columns or inserting columns).

61
New cards

Integrity Independence (Dr. Codd’s 12 relational database rules)

All relational integrity constraints must be definable in the relational language and stored in the system catalog, not at the application level.

62
New cards

Distribution independence (Dr. Codd’s 12 relational database rules)

The end users and application programs are unaware of and unaffected by the data location (distributed vs. local databases).

63
New cards

Nonsubversion (Dr. Codd’s 12 relational databse rules)

If the system supports low-level access to the data, users must not be allowed to bypass the integrity rules of the database.

64
New cards

Rule zero (Dr. Codd’s 12 relational database rules)

All preceding rules are based on the notion that to be considered relational, a database must use its relational facilities exclusively for management.

65
New cards

Relational Data Model

Consists of tables and methods relating the tables through key fields

66
New cards

Three components of relational data model

data structure, key relationships, relational database operators

67
New cards

Tables (relations)

A two-dimensional structure of data about an entity

68
New cards

Entity

The thing for which data will be collected

69
New cards

Relationships

An association between instances of one or more entities

70
New cards

Columns

Attributes of interest for an entity

71
New cards

Rows

An instance or occurrence of an entity

72
New cards

Tables

A logical representation of data consisting of columns and rows

73
New cards

Requirements of tables

  • All values in a column must have the same data format

  • Each row/column intersection is a data value (key)

  • Each table must have a column that uniquely identifies each row

74
New cards

Table properties

  • Entries in columns are single-valued

    • No repeated groups

  • Entries in columns are of the same domain

    • Size, data type, range, etc.

  • Each row is unique →must occur since each row has a primary key

  • Order of rows/columns are not significant

75
New cards

Two functions of keys

  1. Uniquely identify a entity in a table

  2. Establish relationships between tables

76
New cards

What determines non-key attributes?

Primary key → the value of each attribute should be functionally dependent on the primary key

77
New cards