Database Concepts Guide
Database Concepts Guide
Multi-Version Scheme
The multi-version scheme (MVCC) allows multiple versions of data to exist simultaneously,
Key points:
Advantages:
- High concurrency.
Example:
Imagine editing a notebook where new updates go to a new page, while others can still read the old
page.
|----------------------|----------------------------------------|-------------------------------------|
| Data Storage | Only the latest version is stored. | Multiple versions are stored. |
| Concurrency | Uses locks; may block readers/writers.| Readers and writers don't block. |
Recovery ensures the database returns to a consistent state after a failure, even when transactions
run concurrently.
Steps:
Example:
Importance:
|-----------------|----------------------------------------|------------------------------------|
| Definition | One user accesses the system. | Multiple users access simultaneously.|
Techniques:
3. **Row-Level Locking**: Locks only specific rows, not the entire table.
Benefits: