6.5830 Lecture 1 (WIP)
What is a database
- collection of structured data
- organized as records + relationships between them
Why should we care?
Real world impact
Concepts
Data modeling & layout
- Systematic approach to structuring / representing data
- Constistency, sharing, efficiency of access to persistent data
Declarative Querying and Query Processing
- Ask for data
- Compiler finds optimal plan
- Low-level techniques
Consistency / Transactions + Concurrency Control
Basically, ACID:
- Atomicity: Operations are all-or-nothing
- Consistency: Semantics are well-defined, invariants are respected
- Isolation: Concurrent transactions are isolated from each other
- Durability: 🤞 Hope our data doesn’t get lost
Example - Zoo
A zoo website might have:
- admin interface that allows adding and editing animals
- public interface for viewing pictures and maps
- zookeeper interface for finding hungry animals
Operations
- move all snakes to new building
- need to change many files
- multiple admins editing page at the same time
- need concurrency control
- system may crash mid-update
- need all-or-nothing operations
- need to find animal that was fed the longest ago
- need efficient plan from database
Databases address all these issues and more
Date: August 27, 2024
Tags:
lecture