• Shuffle
    Toggle On
    Toggle Off
  • Alphabetize
    Toggle On
    Toggle Off
  • Front First
    Toggle On
    Toggle Off
  • Both Sides
    Toggle On
    Toggle Off
  • Read
    Toggle On
    Toggle Off
Reading...
Front

Card Range To Study

through

image

Play button

image

Play button

image

Progress

1/25

Click to flip

Use LEFT and RIGHT arrow keys to navigate between flashcards;

Use UP and DOWN arrow keys to flip the card;

H to show hint;

A reads text to speech;

25 Cards in this Set

  • Front
  • Back

3 Diff Types of Indexes

-B+ tree, Hash, & Bitmap

B+ tree

levels of ranges, getting to final range allows you to access the actual data

Hash

compresses data into smaller number to store, uses that number to access data (can cause collisions -- 2 or more elements with the same hash number)

Bitmap

works with and and or’s, usually takes the element and splits and assigns numbers based on attributes

External Constraints

foreign key -- updating is a challenge (might update one without the other)

Internal Constraints

not null (person’s name that attends the church), primary key (person’s SSN)

Why Views?

-data independence → you can rename columns and it doesn’t matter


-simplification


-security


-performance

ACID

Atomic, Consistent, Isolated, Durable

Atomic

all of it happens or none of it happens

Consistent

if its consistent before, then it’s after; it may deter in the middle, but it will finish off

Isolated

what the husband does not interfere with what the wife does

Durable

if the system crashes at any time, once a transaction is committed, a transaction is permanent

Problems with Concurrency

-manipulating common data


-lost update


-uncommitted dependency


-inconsistent retrieval

Lock Types

-read/shared


-read/write or exclusive

Transaction

a collection of operations that must be processed as one unit of work

Lock Reliability

the smaller the locks, the smaller the overhead and greater concurrency

Recovery Transparency

DBMS restores database to consistent state after failure

Concurrency Transparency

Users perceive database as single user system

Objective of Concurrency

maximize throughout while preventing interference

3 Interference Problems

-lost update


-uncommitted dependency


-inconsistent retrieval

How to Avoid Deadlocks

-detection


-avoidance


-time-out

1st way to get serializability in DBMS=


2 Phase Locking Protocol

-before accessing an item, one must acquire the appropriate lock


-if one cannot acquire a lock, one waits


-after releasing one lock, a transaction can’t acquire any new locks (or wait until end of transaction)


-growing and shrinking phases

2nd way to get serializability in DBMS=


Optimistic Approaches

-assumes conflicts are rare


-doesn’t use locks


-checks before commit or after read/write for conflicts - if problem, abort

Types of Database Failures

transaction initiated


power lost


hardware failure

When should changes be recorded?

-immediately - write it whenever (might have to undo stuff)


-deferred - can’t write until commit (only have to redo)