Learn: DBMS Midterm 2 Exam

0.0(0)
Studied by 0 people
call kaiCall Kai
learnLearn
examPractice Test
spaced repetitionSpaced Repetition
heart puzzleMatch
flashcardsFlashcards
GameKnowt Play
Card Sorting

1/79

encourage image

There's no tags or description

Looks like no tags are added yet.

80 Terms

1
New cards

Left Outer Join

Shows join result + non-matching tuples from the left table, with NULL values for attributes of the right table.

2
New cards

Right Outer Join

Shows join result + non-matching tuples from the right table, with NULL values for attributes of the left table.

3
New cards

Full Outer Join

Shows join result + non-matching tuples from the left table + non-matching tuples from the right table.

4
New cards

NULLs in a Left Outer Join

Used for right-table attributes when a tuple from the left table has no match.

5
New cards

NULLs in a Right Outer Join

Used for left-table attributes when a tuple from the right table has no match.

6
New cards

NULLs in a Full Outer Join

Used for attributes from the opposite table when an unmatched tuple is included.

7
New cards

Entity-Relationship Model (ER Model)

Helps with conceptual design of the database; software/DBMS independent.

8
New cards

Entity

A real-world object about which data is/will be stored in a database.

9
New cards

Entity Type

A group of entities having the same attributes.

10
New cards

Entity Type Notation

Rectangle.

11
New cards

Relationship

Denotes an association between entity types.

12
New cards

Relationship Notation

Diamond.

13
New cards

Attribute

Each entity type has a set of attributes.

14
New cards

Attribute Notation

Oval connected to the corresponding entity type.

15
New cards

Key Attribute

Its value is unique for each entity in the entity type.

16
New cards

Key Attribute Notation

Underlined attribute.

17
New cards

Simple Attribute

An attribute that cannot be meaningfully divided into smaller attributes.

18
New cards

Composite Attribute

An attribute that can be further subdivided

19
New cards

Single-Valued Attribute

Each entity can have AT MOST ONE VALUE for the attribute

20
New cards

Multivalued Attribute

An entity MAY HAVE multiple values from the attribute

21
New cards

Stored Attribute

The attribute value is stored in the database.

22
New cards

Derived Attribute

The attribute value can be computed from other stored values.

23
New cards

Weak Entity

The entity is existent dependent on another entity.

24
New cards

Strong Entity

The entity is not existent dependent on any entity

25
New cards

Unary Relationship (Recursive)

Connects to the same entity type

26
New cards

Binary Relationship

Connects two entity types.

27
New cards

Ternary Relationship

Connects three different entity types.

28
New cards

Relationship Constraint

Describes restrictions on how entities participate in a relationship.

29
New cards

One-to-One (1:1)

One entity of one type will have at most one corresponding entity on the entity type and vice versa

30
New cards

One-to-Many (1:M)

One entity on one side may have multiple related entities on the other side. However, consider that it is only one-to-one on one side, while one-to-many on the other side

31
New cards

Many-to-Many (M:N)

Many entities on either side can be related to many entities on the other side.

32
New cards

Participation Constraint

Specifies whether entities of an entity type must participate in a relationship.

33
New cards

Total Participation

Entities from all of the corresponding entity type participate in the relationship.

34
New cards

Partial Participation

Some entities may not participate through the relationship.

35
New cards

Total Participation Notation

Double line between the entity type and relationship.

36
New cards

Partial Participation Notation

Single line between the entity type and relationship.

37
New cards

Normalization

A process that helps in determining proper attributes for tables.

38
New cards

Purpose of Normalization

Reduces data redundancy and creates more tables.

39
New cards

Normalization Order

1NF โ†’ 2NF โ†’ 3NF โ†’ BCNF โ†’ 4NF โ†’ 5NF.

40
New cards

Database Anomalies

Insertion anomaly, deletion anomaly, and modification anomaly.

41
New cards

Insertion Anomaly

A problem caused when inserting data into a poorly designed relation. (Primary key CANNOT be null. We also cannot just make up a key)

42
New cards

Deletion Anomaly

A problem where deleting data causes other desired information to be lost.

43
New cards

Modification Anomaly

The data is not properly changed for all data points

44
New cards

Data Redundancy

Repeated or duplicated data in a database.

45
New cards

First Normal Form (1NF)

No composite attributes and no multivalued attributes.

46
New cards

1NF Attribute Requirement

Attributes should contain single values.

47
New cards

Functional Dependency

An attribute B is functionally dependent on A iff for each unique value of A, there must be a unique value for B (A โ†’ B)

48
New cards

A โ†’ B

For each unique value of A, there exists no more than one value of B.

49
New cards

Determinant

The attribute on the left side of a functional dependency.

50
New cards

Full Functional Dependency

A is fully functional dependent of a group attributes (B, C, โ€ฆ). if dropping any one attribute from the determinant f.d. go away

51
New cards

Second Normal Form (2NF)

Every non-key attribute must be f.d. on key attributes

part of a key -/> non-key

52
New cards

2NF Requirement

Every non-key attribute must be fully functionally dependent on the key attributes.

53
New cards

Partial Dependency

Occurs when a non-key attribute depends on only part of a composite key.

54
New cards

Third Normal Form (3NF)

Schema must be in 2NF and no non-key should be transitively func. dependent on a key attribute

In 2NF Non-key -/> nonkey

55
New cards

Transitive Func. Dependency

If B is f.d. on A, C is f.d. on B, then C is transitively f.d. on A.


A โ€”> B & B โ€”> C, so Aโ€”> C

56
New cards

Boyce-Codd Normal Form (BCNF)

Every determinant must be a key, the whole key, nothing but the key.

57
New cards

Physical Database Design

Concerned with how data is physically stored.

58
New cards

File

A collection of records.

59
New cards

Record

A collection of fields stored together.

60
New cards

Fixed-Length Record

Each record has the same size.

61
New cards

Variable-Length Record

Each record could be of different size

62
New cards

Page

A unit used to store records in the database.

63
New cards

Page Size

The number of bytes available in a page.

64
New cards

Record Size

The number of bytes occupied by one record.

65
New cards

Blocking Factor

The number of records per page.

66
New cards

Blocking Factor Formula

Page size รท record size; use the whole-number result.

67
New cards

Spanned Records

The last records on a page spans to the next page

68
New cards

Unspanned Records

A record does not span across pages.

69
New cards

Pages Needed

Determine how many records fit per page, then determine how many pages are required.

70
New cards

Heap File

Records are not sorted. New records are added to the end of the last page.

71
New cards

Heap File Insertion

New records are added to the end of the last page.

72
New cards

Heap File Advantage

Insertion is faster.

73
New cards

Heap File Disadvantage

Searching is slower.

74
New cards

Heap File Search

May require searching records/pages until the desired record is found.

75
New cards

Sorted File

Records are stored in sorted order based on a search/key value.

76
New cards

Sorted File Search

Can use binary search based on the ID value.

77
New cards

Sorted File Advantage

Searching is faster.

78
New cards

Sorted File Disadvantage

Insertion is slower because we need to move records down every page

79
New cards

Binary Search

Search method used with sorted files to repeatedly reduce the search space.

80
New cards

Binary Search Pages Examined

Approximately logโ‚‚(number of pages).