DBMS Final

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

1/61

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.

62 Terms

1
New cards

Database

A collection of logically interconnected data

2
New cards

Database Management System (DMBS)

Software system that is used to store and query the information in a database

3
New cards

Drawbacks of using file systems such as .csv to store data (7)

  • Data redundancy and inconsistency

  • Difficulty in accessing data

  • Data isolation

  • Integrity problems

  • Atomicity of updates

  • Concurrent access by multiple users

  • Security problems

4
New cards

Transaction

A collection of operations that performs a single logical function in a database application

5
New cards

Foreign key

Set of attributes that point to a candidate key of another table or have NULL values

6
New cards

Inner join

Returns records that have matching values in both tables

7
New cards

Left join

Returns all records from the left table, and the matched records from the right table

8
New cards

Right join

Returns all records from the right table, and the matched records from the left table

9
New cards

Full join

Returns all records when there is a match in either left or right table

10
New cards

Set operations in SQL (3)

  • union

  • intersect

  • except

11
New cards

Aggregate functions in SQL (5)

  • avg

  • min

  • max

  • sum

  • count

12
New cards

Attributes in the select clause outside of aggregate functions must appear in the _ list

GROUP BY

13
New cards

HAVING clause

Used to filter groups of rows based on conditions applied to aggregate functions. Used in conjunction with the GROUP BY clause

14
New cards

Typed order of SQL clauses (6)

  1. SELECT

  2. FROM

  3. WHERE

  4. GROUP BY

  5. HAVING

  6. ORDER BY

15
New cards

Executed order of SQL clauses (6-7)

  1. FROM

  2. WHERE

  3. GROUP BY

  4. HAVING

  5. SELECT

  6. DISTINCT (if applicable)

  7. ORDER BY

16
New cards

Subquery

select-from-where expression that is nested within another query

17
New cards

When to use subqueries in the WHERE clause (3)

  • For set membership

  • For set comparisons

  • For set cardinality

18
New cards

When to use a subquery in the FROM clause

To create a temporary dataset from existing tables

19
New cards

View

Virtual table that represents the result of a stored SQL query

20
New cards

Materialized view

The view gets updated whenever the underlying relations are updated

21
New cards

Indexes

Data structures used to speed up access to records with specified values for index attributes

22
New cards

JDBC

Java API that connects java applications to DBMSs

  • Can query and update data and retrieve query results
  • Supports metadata retrieval
23
New cards

Steps to have JDBC communicate with DB (4)

  1. Open a connection

  2. Create a "statement" object

  3. Execute queries using the statement object to send queries and fetch results

  4. Exception mechanism to handle errors

24
New cards

Super key

A set of one or more attributes whose values uniquely determine each entity

25
New cards

Candidate key

Entity set that loses its uniqueness when an attribute is removed

26
New cards

Primary key

Unique identifier for each record in a table

27
New cards

Weak entity set

An entity set that does not have a primary key

28
New cards

Discriminator (partial key)

The set of attributes that distinguishes among all the entities of a weak entity set

29
New cards

Aggregation in E-R diagrams

A way to treat a relationship between entities as a higher-level entity itself, allowing that relationship to participate in other relationships

30
New cards

Functional dependency theory

Defines constraints where one attribute (determinant) uniquely determines another (dependent), forming the basis for data integrity, consistency, and normalization by organizing data to avoid anomalies and improve database design by identifying keys and relationships

31
New cards

Volatile storage

Loses contents when power is switched off

32
New cards

Non-volatile storage

  • Contents persist even when power is switched off

  • Includes secondary and tertiary storage, as well as batter-backed up main-memory

33
New cards

Factors affecting choice of storage media include (3)

  • Speed with which data can be accessed

  • Cost per unit of data

  • Reliability

34
New cards

Redundant arrays of independent disks (RAID)

Disk organization techniques that manage a large number of disks, providing a view of a single disk of high capacity, high speed, and high reliability

35
New cards

Factors in choosing RAID level (4)

  • Monetary cost

  • Performance

  • Performance during failure

  • Performance during rebuild of failed disk

36
New cards

Disk block

Logical unit of storage allocation and retrieval

37
New cards

Heap (organization of records in files)

Record can be placed anywhere in the file where there is space

38
New cards

Sequential (organization of records in files)

Store records in sequential order, based on the value of the search key of each record

39
New cards

Hashing (organization of records in files)

A hash function computed on some attribute of each record; the result specifies in which block of the file the record should be placed

40
New cards

Data dictionary (also called system catalog)

Stores data such as:

  • Information about relations

  • User and accounting information, including passwords

  • Statistical and descriptive data

  • Physical file organization information

  • Information about indices

41
New cards

Block

Unit of both storage allocation and data transfer

42
New cards

Buffer

Portion of main memory available to store copies of disk blocks

43
New cards

Buffer manager

Subsystem responsible for allocating buffer space in main memory

44
New cards

Dense index

Every search key value has an entry in the index

45
New cards

Sparse index

Only some search key values have an entry in the index

46
New cards

Primary index

Key of the index is the attribute of the primary key of the table

47
New cards

Secondary index

Key of the index is the attribute of a non-primary key of the table

48
New cards

Difference between B-tree and B+-tree

  • B+-trees store all keys and data in leaf nodes, while B-trees store each value only once

  • B+-trees leaf nodes are connected via a linked list

49
New cards

Bucket

Unit of storage containing one or more records (typically a disk block)

50
New cards

Overflow chaining

The overflow buckets of a given bucket are chained together in a linked list

51
New cards

Factors considered when deciding on a file organization for a table (6)

  • Types of queries on the table

  • Frequencies of queries

  • Access time

  • Inserting time

  • Deletion time

  • Space overhead

52
New cards

ACID

Atomicity, Consistency, Isolation, Durability

53
New cards

Atomicity

the all-or-nothing property: either the transaction completes successfully or nothing at all

54
New cards

Durability

The updates to the database by the transaction must persist even if there are software or hardware failures

55
New cards

Isolation

The system must run transactions providing the illusion that each transaction is the only one running in the system

56
New cards

2 parts of recovery algorithms

  1. Actions taken during normal transaction processing to ensure enough information exists to recover from failures

  2. Actions taken after a failure to recover the database contents to a state that ensures atomicity, consistency, and durability

57
New cards

Deferred update

Only make changes to disk after all log entries and the commit are in the log

58
New cards

Immediate update

Entries on disk can be changed before the transaction commits

59
New cards

REDO

Scan the log from the beginning to the end

60
New cards

UNDO

Scan the log from the end backwards

61
New cards

Recovery from a deferred update failure

REDO on committed transactions

62
New cards

Recovery from an immediate update failure

  • REDO on committed transactions

  • UNDO on uncommitted transactions

Explore top flashcards