1/50
Looks like no tags are added yet.
Name | Mastery | Learn | Test | Matching | Spaced |
---|
No study sessions yet.
storage hierarchy
primary
secondary
tertiary
primary storage
fastest media but volatile
cache, main memory
secondary storage (on-line storage)
nonvolatile, moderately fast access time
flash memory, magnetic disks
tertiary storage (off-line storage)
nonvolatile, slow access time
magnetic tape, optical storage
structure of a magnetic hard disk mechanism
track
sector
cylinder
spindle
platter
arm
read-write head
track
circular path on the surface of the platter where data is stored magnetically
16k per platter
sector
smallest unit of data that can be read or written
512 bytes
cylinder
a cylindrical intersection through the stack of platters in a disk, centered around the disk's spindle
access time
the time it takes from start of a read or write request to when data transfer begins.
what does the access time consist of
seek time
rotational latency
seek time
time to position the arm over the correct track
rotational latency
time it takes for the sector to be accessed to appear under the head
solid state drives (SSD)
based on flash memory
contains a controller as a bridge between the OS and the NAND block storage
SSD architecture
interface
controller
buffer/cache
flash memory components
SSD interface
Electrical IF between processor and SSD (commonly SATA, IDE)
SSD controller
used for error correction, wear leveling, bad block mapping, and encryption
SSD buffer/cache
high speed RAM
SSD flash memory components
NAND or NOR technology (2GB-64GB)
SSD vs magnetic disk
SSD has no moving parts (arm of magnetic disk)
SSD has a faster boot and access time (flash memory vs rotation)
SSD has faster data transfer rate
SSD is more costly
SSD not as reliable when faced with power failure
how many primary indexes can a table have
1
how many secondary indexes can a table have
many
when is it suggested to create an index
after adding data
is an index a table
no, it references data in a table
database index
brings relevant records
first query brings all records from disk
second query doesn’t need to bring all
composite index
multiple sorted columns for queries containing multiple search conditions
triggers
specification of database event associated with a database table
what can triggers NOT accept
input parameters, commit or rollback statements
trigger timing
before/after event
trigger levels
scope affected by the trigger
for each row/statement
trigger event
statement that causes trigger to execute (fire)
UPDATE, INSERT, DELETE
BEFORE trigger
action first, event second
AFTER trigger
event first, action second
NEW trigger
rowtype variable that stores values after the modification
OLD trigger
rowtype variable that stores values before the modification
motivation for NoSQL
scalability
flexibility
availability
cost control
how to maintain data availability in NoSQL environments
use primary and backup servers
2-phase commit for updates
eventual consistency
2 DB servers temporarily do not have the same value (inconsistent) but eventually become consistent
what does CAP in CAP theorem stand for
consistency
availability
partition tolerance
CAP theorem
distributed databases can’t have CAP all at the same time
no more than 2 at a time
consistency
consistent copies of data on different servers
availability
response to any query
partition tolerance
system can still operate correctly even if there is an inability to send messages between servers
4 types of NoSQL DBs
key value
document
column
graph
relational vs column DBs
column DB don’t have tables; object info in one long row
column DB rows have no fixed structure
there are no joins in column DB
which was the first column family DB
Google BigTable (2006)
gossip protocol
allows for quick exchange of information
information entropy
the actual amount of information stored in this variable
sum of information of all particular states
anti entropy
process to determine differences in replicas
detect and resolve inconsistencies w a min amount of data exhange
what is indexing used for
allow for a rapid lookup of data in
table
namespace
they help avoid naming conflicts and make it easier to manage objects
quorum
the number of servers that must respond to a read or write operation, for the operation to be considered complete