MIS 431 EXAM 3 RILEY STUDY GUIDE
Indexes - Answer -Value that points out to where the data is stored.
-using indexes speed up the search process
-reads through millions of records
*primary key is always indexed
Most queries require locating a certain row that satisfy some condition specified in
WHERE clause
-data not physically stored in any particular order
Pointers - Answer -when data is stored on drive (or RAM)
-operating systems allocates space with a function call
-provides location/address
~ physical address
~ virtual address (VSAM): imaginary drive values mapped to physical locations
-indexes have pointers, point to where it is actually stored on hard drive
-Relative Address = distance from start of file
-way it is stored doesn't matter, we query how we want to see it
-create columns we want to see w/ select statement & order by rows
Table indexes? - Answer -- in a relational database, the physical storage location for a
particular row doesnt matter unless your the DBMS and are trying to find it
-an index structure provides rapid access to attribute values and their corresponding
table rows
-indexes contain information about the physical storage location of data
= note that entity data generally must be read one full row at a time, even if just one
attribute is needed; BUT if an attribute value can be found in an index, then the DBMS
can avoid having to read full rows
How indexes are represented - Answer -- indexes contain an "ordered list" of entries:
the ordered list typically takes the form of a "balanced- tree (B Tree)" rather than a
simple linear test
- a tree structure is an efficient structure for holding an ordered list, and can be quickly
traversed to find a particular value of the attribute indexed upon
-the three is traversed from its root node to the desired leaf node; for each node, find
the highest key value less than or equal to the search value and follow the pointer to the
next node
-each leaf node contains 2 pieces of information:
~an attribute value
~information concerning the physical storage location of the entity(s) having that precise
attribute value
, B Tree - Answer -- limits how many records you have to sort though till you find table
rows
- if a value changes you have to rewrite the index
Problems with indexes - Answer -- each index must be updated when rows are
inserted, deleted or modified
- changing one row of data in a table with many indexes can result in considerable time
and resources to update all of the indexes
- steps to improve performance:
~index primary keys
~index common join columns
~index columns that are searched regularly
~use a performance analyzer
- if you index foreign key it makes you join faster
- programmed to ignore bad indexes (something that frequently changes)
Transaction - Answer -- lowest level of work, smallest unit of work
logical unit of work
- must be either entirely completed or aborted
-no intermediate states are acceptable
-keeps from one consistent state to another consistent state
-typically multiple sequence statements
Transaction Properties: ACID - Answer -Atomic: all transaction operations must be
COMPLETED, incomplete transactions ABORTED
Consistency: any transaction will take the db from one consistent state to another, with
NO BROKEN CONSTRAINTS (referential integrity)
Isolation: other operations cannot access data that has been modified during a
transaction that has not yet completed (another transaction cant see your changes)
Durability: permanence of consistent database state, ability to recover the committed
transaction updates against any kind of system failure (transaction log)
Transaction support - Answer -COMMIT: save
ROLLBACK: undo
user initiated transaction sequence must continue until:
- COMMIT statement is reached
- ROLLBACK statement is reached
- end of program reached
- program reaches abnormal termination
Log stores - Answer -- record for beginning of transaction
-each SQL statement: operation, names of objects, before and after values for updated
fields, pointers to previous and next entries
- COMMIT statement
Indexes - Answer -Value that points out to where the data is stored.
-using indexes speed up the search process
-reads through millions of records
*primary key is always indexed
Most queries require locating a certain row that satisfy some condition specified in
WHERE clause
-data not physically stored in any particular order
Pointers - Answer -when data is stored on drive (or RAM)
-operating systems allocates space with a function call
-provides location/address
~ physical address
~ virtual address (VSAM): imaginary drive values mapped to physical locations
-indexes have pointers, point to where it is actually stored on hard drive
-Relative Address = distance from start of file
-way it is stored doesn't matter, we query how we want to see it
-create columns we want to see w/ select statement & order by rows
Table indexes? - Answer -- in a relational database, the physical storage location for a
particular row doesnt matter unless your the DBMS and are trying to find it
-an index structure provides rapid access to attribute values and their corresponding
table rows
-indexes contain information about the physical storage location of data
= note that entity data generally must be read one full row at a time, even if just one
attribute is needed; BUT if an attribute value can be found in an index, then the DBMS
can avoid having to read full rows
How indexes are represented - Answer -- indexes contain an "ordered list" of entries:
the ordered list typically takes the form of a "balanced- tree (B Tree)" rather than a
simple linear test
- a tree structure is an efficient structure for holding an ordered list, and can be quickly
traversed to find a particular value of the attribute indexed upon
-the three is traversed from its root node to the desired leaf node; for each node, find
the highest key value less than or equal to the search value and follow the pointer to the
next node
-each leaf node contains 2 pieces of information:
~an attribute value
~information concerning the physical storage location of the entity(s) having that precise
attribute value
, B Tree - Answer -- limits how many records you have to sort though till you find table
rows
- if a value changes you have to rewrite the index
Problems with indexes - Answer -- each index must be updated when rows are
inserted, deleted or modified
- changing one row of data in a table with many indexes can result in considerable time
and resources to update all of the indexes
- steps to improve performance:
~index primary keys
~index common join columns
~index columns that are searched regularly
~use a performance analyzer
- if you index foreign key it makes you join faster
- programmed to ignore bad indexes (something that frequently changes)
Transaction - Answer -- lowest level of work, smallest unit of work
logical unit of work
- must be either entirely completed or aborted
-no intermediate states are acceptable
-keeps from one consistent state to another consistent state
-typically multiple sequence statements
Transaction Properties: ACID - Answer -Atomic: all transaction operations must be
COMPLETED, incomplete transactions ABORTED
Consistency: any transaction will take the db from one consistent state to another, with
NO BROKEN CONSTRAINTS (referential integrity)
Isolation: other operations cannot access data that has been modified during a
transaction that has not yet completed (another transaction cant see your changes)
Durability: permanence of consistent database state, ability to recover the committed
transaction updates against any kind of system failure (transaction log)
Transaction support - Answer -COMMIT: save
ROLLBACK: undo
user initiated transaction sequence must continue until:
- COMMIT statement is reached
- ROLLBACK statement is reached
- end of program reached
- program reaches abnormal termination
Log stores - Answer -- record for beginning of transaction
-each SQL statement: operation, names of objects, before and after values for updated
fields, pointers to previous and next entries
- COMMIT statement