This document discusses the architecture and optimization of database management systems (DBMS). It covers:
1) The main components of a DBMS architecture including the query executor, buffer manager, storage manager, transaction manager, and more.
2) Query optimization techniques including rule-based optimization, cost-based optimization using a dynamic programming algorithm to search the plan space, and reducing the plan space.
3) Cost estimation including estimating selectivity factors, output sizes, and costs of different query execution plans without executing them.