Architecture of a DBMS Flashcards
What is Query Processor in DBMS Architecture and its two main parts: Query Parser and Query Optimizer
Query Processor is responsible for interpreting and optimizing queries for execution
2 main parts:
Query Parser breaks down the SQL query into a series of logical steps
Query Optimizer: It determines the most efficient way to execute the parsed query.
What is Storage Engine and purpose in DBMS Architecture
Storage Engine: This component manages how data is stored, organized and retrieved within the database.
Also Storage engine is vital for data management and integrity, dealing with how data is stored and ensuring consistency and recovery in case of failures
- Transaction Manager: ensures that all database transactions are processed reliably and adhere to ACID properties
- Lock Manager: It prevents database transaction conflicts by managing the locking and unlocking of data during transaction
- Access methods: these are the techniques the database uses to access data on storage media
- Buffer Manager: it manages the database’s memory buffer, which holds data temporarily during transaction processing.
- Recovery Manager: It handles the restoration of the database to a previous state in the event of a failure, ensuring data integrity.
In transaction processing, what is logging?
all changes in the database is recorded in a log file on disk. The log manager collaborates with the buffer manager to ensure that these logs are eventually written to disk
In transaction processing, what is concurrency control
This ensures that transactions appear to execute in isolation. E.ven if transactions are concurently executing, system ensures that results end results is as if they were executed sequentially
In transaction processing, what is deadlock resolution?
Deadlocks occurs when multiple transactions are waiting on each other to release locks, with none able to proceed. The transaction manager is response for detecting deadlocks and deciding which transactions to roll back to resolve them
In transaction processing, what is two-phase locking?
protocol used to ensure serializability in transaction processing. It involves two phases: the growing phase, where locks are not acquired and not released, and the shrinking phase, where locks are release and no new locks are acquired.
What is OLTP (Online Transactional Processing)
OLTP is a type of data processing that focuses on transaction-oriented tasks. It is designed to efficiently manage and process a large number of transactions, typically over the internet
Why OLTP?
- Process a large a number of relatively simple transactions, usually insertions, updates, and deletions to data (for example a balance check at an ATM)
Examples: Banking system for processing transactions, e-commerce, platforms for managing orders
2. Enable multi-user access to the same data, while ensuring data integrity (it relies on concurrency algorithms that no two users can change the same data at the same time)
- Available 24/7365
- Provide Indexed data sets: for rapid searching, retrieval, and querying.
Why OLAP (Online Analytical Processing)
OLAF systems are used for complex analytical and decision support tasks. They are designed to analyze large volumes of historical data to provide insights and support business decision-making processes.
Examples: data warehouses, data mining, financial analysis tools