- Lecture on Database by the master of information science
- Query Processing in Relational Databases
- SQL: Standardized query language for Relational Databases
- All databases comply with SQL (more or less)
- Relational Algebra
- Defines operations
- Join
- Selection, projection
- Set operations: union, intersection, subtraction
- Why represented as Algebra?
- By using algebraic commutative and associative laws, more efficient operations can be found through equivalent operations
- SQL and others follow this as well
- Query optimization
- Speeding up references: Constructing data that can be reused by multiple references
- Materialized views (like cache)
- Opposite to “Normalization” in Data Model
- Speeding up the overall process:
- Depends on the use case
- If there are many update operations, decompose tables; if there are many reference operations, join tables
- Different approach in the cloud
- Consider IO cost, CPU cost, SLA, etc.
- How to actually optimize