Shared Flashcard Set

Details

Database Final
Database Final
18
Computer Science
Undergraduate 4
12/11/2012

Additional Computer Science Flashcards

 


 

Cards

Term
what is an ATOMIC TRANSACTION
Definition
all transactions are performed or none are
Term
what is a CONCURRENT TRANSACTION
Definition
two transactions are processed at the same time but NOT simultaneously. They are not simultaneous because the CPU of the machine processing the DB can only execute one instruction at a time
Term
what is an EXPLICIT LOCK?

what is an IMPLICIT LOCK ?
Definition
explicit- locks placed by command

implicit-locks placed by the DBMS
Term
what is an EXCLUSIVE LOCK?

what is a SHARED LOCK
Definition
exclusive- locks an item from ANY other access.Can't read or write.

shared - locks an item from change but can still be read
Term
what is TWO PHASED LOCKING?
Definition
transactions are allowed to obtain locks as necessary but once the first lock is released no other lock can be obtained.
Term
What is a DEAD LOCK?
Definition
A condition that can occur during concurrent processing in which each of two (or more) transactions is waiting to access the data that the other has locked.
Term
How to prevent a DEAD LOCK
Definition
1. require users to issue all lock requests at the same time.

2.require all applications to lock resources in the same order.
Term
How to fix a DEAD LOCK
Definition
Cancel one of the transactions and remove it's changes from the database.
Term
What is a LOG, why is it important?
Definition
a file containing a record of database changes. The log contains before images and after images.

The log is required for rollback and roll forward.
Term
what is a check point, what is the advantage of taking frequent check points?
Definition
A point of synchronization between the database and log.

The more checkpoints you have the less processing you need to recover.
Term
What is RESOURCE LOCKING?
Definition
the process of allocating a database resource to a particular transaction in a concurrent processing system
Term
What is a before image?

What is an after image?
Definition
A record of a database entity BEFORE a change

A record of a database entity AFTER a change
Term
What is a DATABASE SAVE?
Definition
A copy of the database files that can be used to restore the database to some previous consistent state.
Term
What is a TRIGGER
Definition
a special type of stored procedure that is invoked bu the DBMS when a specified condition occurs.
Term
Define:
BEFORE trigger.

AFTER trigger.

INSTEAD OF trigger
Definition
triggers that are executed BEFORE a specified database action.

triggers that are executed AFTER a specified database action.

triggers that are executed INSTEAD OF a specified database action.(normally used to update data).
Term
What is a STORED PROCEDURE?
Definition
A collection of SQL statements stored as a file that can be invoked by a single command.
Term
What is ROLL FORWARD, describe the process.
Definition
Used when there is physical damage.

recvoring database bu applying after-images to a saved copy of the database to bring it to a checkpoint.

STEPS:
1. replace physical property
2. put previously saved data back on
3. roll forward
4. take after images of completed transactions
5 read the after images in chronological order
Term
What is ROLL BACK, describe the process
Definition
used when there is a power outage of interruption

before imags are applied to the DB to return to an earlier checkpoint.

STEPS:
1.look in reverse order to find incomplete transactions. (starts with out a finish)
2. reapply the before images in reverse order until you are back to where you where before the transaction
*thus replacing the incomplete transaction
Supporting users have an ad free experience!