Chapter 5 Data Storage Flashcards
What is transfer rate?
Speed of data reading or writing.
What is cost in terms of storage media?
Price per gigabyte of storage media.
What does capacity refer to?
Amount of data a media can store.
What is non-volatile memory?
Memory retained without power.
What are sectors?
Data groups on magnetic disks, traditionally 512 bytes.
Also hard-disk drive (HDD)
What are pages in flash memory?
Flash aka RAM
Data groups in flash memory, 2-16 kilobytes.
What are blocks in databases?
Uniform size for data transfer in databases.
What is a storage controller?
The storage controller needs to be able to convert between blocks and the appropriate unit of storage for the type of storage device being used.
Usually between blocks and sectors.
What is block size?
Uniform size specified by database administrator.
What are transactional applications?
Access few rows per query, prefer smaller blocks.
What is the standard block size in storage systems?
4 Kilobytes.
What is bulk load?
Fast insertion of multiple rows into a table.
What is an SQL query?
Command to extract or manipulate data.
What is a primary key?
Unique identifier for each row in a table.
What is a NoSQL database?
Non-relational database for unstructured data.
What is a free space pointer?
Reference to available storage in a table.
What is a free space linked list?
- The primary purpose of a free space linked list is to manage free memory blocks efficiently.
- When memory is allocated to an application, this data structure helps keep track of what portions of memory are available for future allocations.
What is an insert operation?
Adding data to the first available space.
What is an update operation?
Modifying existing row data in a table.
What is a JOIN query?
Combines rows from two or more tables based on conditions.
What are efficient inserts?
Inserts that quickly determines row location
via hash key.
Who is a database administrator?
Person managing database structures and performance.
Aka root account
What is data distribution?
Method of organizing data across storage.
What is block allocation?
Process of assigning additional storage blocks.
What is table structure?
Arrangement of data in database tables.
What is an index entry?
Data Address: Data value
Pointer to a specific data location.
What is block read time?
Time taken to read a block from disk.
What is query performance?
Efficiency of retrieving data from tables.
What is a bitmap index?
Uses bits to represent data presence in rows.
What is read query performance?
Logical index that requires additional read.
Slower than physical.
What is a hash table?
Data structure using hash functions for indexing.
Indexing: assigns rows to buckets
What is index storage?
Indexes stored in the same tablespace as tables.
What are concurrent updates?
Simultaneous modifications to multiple tables.
What is fragmentation?
Scattering of data blocks across storage.
What is fast storage media?
Fast storage media refers to storage hardware that can be accessed quickly, improving performance for frequently used data.
What is the size of sectors used in magnetic memory?
512 bytes
Magnetic memory typically uses 512-byte sectors for data storage.
How many sectors are required to store one megabyte in magnetic memory?
Approximately 2000 sectors
One megabyte requires 1,000,000 bytes, which when divided by 512 bytes/sector results in about 2000 sectors. 📖
What is the size of sectors used in newer storage systems?
- Older standard: 512 bytes per sector
- Newer standard: 4096 bytes (4KB) per sector
How many sectors are required to store one megabyte in newer systems with 4KB sectors?
250 sectors
What is the minimum block size that must be transferred into memory from flash memory?
8 kilobytes
A minimum of one eight-kilobyte block must be transferred into memory, despite reading four kilobytes from flash memory.
What is the page size of flash memory?
2 kilobytes
Flash memory page size is typically two kilobytes.
If a user runs a query that reads two pages of flash memory, how many blocks are transferred to main memory?
- One block
- Even though two pages (4 kilobytes total) are read, only one block of eight kilobytes is transferred.
What is transferred to the database in blocks.
Data transfers to the database occurs in blocks, not individual bytes.
What type of applications are most relational databases optimized for?
Transactional applications.
What is row-oriented storage?
A storage method where an entire row is stored within one block.
When does row-oriented storage perform best?
When row size is small relative to block size.
What are the two reasons row-oriented storage performs best with small row sizes?
- Improved query performance
- Less wasted storage
What happens to storage when row size is small relative to block size?
Wasted space is insignificant.
What is a common approach for tables containing very large columns?
Each row contains a link to the large column stored separately.
What types of applications are some newer relational databases optimized for?
Analytic applications.
What is column-oriented storage?
A storage method where each block stores values for a single column only.
What are the benefits of column-oriented storage for analytic applications?
- Faster data access
- Better data compression
Also use the same data type
Why is data compression more effective in column-oriented storage?
Because all values have the same data type.
What is a disadvantage of column-oriented storage for transactional applications?
column-oriented storage is often associated with NoSQL databases
- Column-oriented storage is bad for transactions needing full row access.
- It requires accessing multiple blocks to retrieve a single row.
- This is because data is stored by column, not by row.
Which two relational databases support column-oriented storage.
- PostgreSQL
- Vertica
Why are NoSQL databases not optimized for transactional applications.
- NoSQL databases are built for managing large amounts of unstructured data, emphasizing high scalability and availability.
- Transactional applications, on the other hand, require strong consistency and ACID properties, which are not typically prioritized in NoSQL databases.
(atomicity, consistency, isolation, durability)
The term column-oriented & columnar represent _ ?
- Mean a technique for organizing data on storage media.
- Sometimes these terms mean a type of NoSQL database, commonly called wide column database.
What type of storage performs better than column-oriented storage for most transactional databases?
Row-oriented storage
What are the four alternative table structures supported by databases?
- Heap table
- Sorted table
- Hash table
- Table cluster
How does a database manage inserts in a heap table?
Maintains a list of blocks and the address of the first available space for inserts
What happens when all blocks in a heap table are full?
The database allocates a new block for inserts
What occurs when a row is deleted from a heap table?
The space occupied by the row is marked as free
- If each table in a database can have a different structure, and databases assign a default structure to all tables.
- How can the default structure of a table in a database be modified?
Database administrators can override the default structure to optimize performance for specific queries.
What is a heap table?
A heap table is a table structure with no specific order for rows, where rows are stored in the order they are inserted.