overview
The third programming project is to add support for executing queries in your database system. You will implement executors that are responsible for taking query plan nodes and executing them.
需要支持以下操作:
- Access Methods: Sequential Scans, Index Scans (with your B+Tree from Project #2)
- Modifications: Inserts, Updates, Deletes
- Miscellaneous: Nested Loop Joins, Index Nested Loop Joins, Aggregation, Limit/Offset
We will use the Iterator query processing model (i.e., the Volcano model). Every query plan executor implements a Next
function. When the DBMS invokes an executor’s Next
function, the executor returns either (1) a single tuple or (2) a null pointer to indicate that there are no more tuples. With this approach, each executor implements a loop that keeps calling Next
on its children to retrieve tuples and then process them one-by-one.
参考博文: http://patshaughnessy.net/2014/10/13/following-a-select-statement-through-postgres-internals
这文章写的太好了!!!
task1 SYSTEM CATALOG
A database maintains an internal catalog to keep track of meta-data about the database. For example, the catalog is used to answer what tables are present and where.