CMU-15-445-2019

disk-oriented database labs and assignments

MIT License

Stars
10

Lab

  • Lab1
    • Clock replacer
    • Buffer pool manager
  • Lab2
    • Hashtable header page
    • Hashtable block page
    • Hashtable linear probe
    • Hashtable resize
  • Lab3
    • Simple catalog
    • Executors
  • Lab4
    • Log Manager
    • System Recovery
    • Checkpoints

Homework

  • SQL
  • Indexes
  • Join Algorithms
  • Concurrency Control
  • Distributed Databases

simple catalog

static_cast<std::unique_ptr>(table)

:
+-------------------------------------------------------------------+
| explanation:
| tuple : like a int or char field  ,binary data of a field
| record : one row of table                                         +
|                                                                   |
|  /**                                                              |
|   * Tuple format:                                                 |
|   * ------------------------------------+-------------------------+------                                           src/storage/table/table_heap.cpp
|   * | FIXED|SIZE or VARIED|SIZED OFFSET | PAYLOAD OF VARIED|SIZED FIELD |
|   * ------------------------------------+-------------------------+------
|   */                                                              |
+------------------------------------------+------------------------+-----------------------------------------+    +-----------------------------------------------+       +---------------------------------------------------+
                                           | +--------------------+                                 catalog   |    |tableHeap                                      |       |  tableMetaData                                    |
                                           | |tables              |      +------------+                       |    |   represent a physical table on disk          |       |   - schema                                        |
                                           | |  +--------------+  |      | names      |      +---------+---+  |    |   linked list of pages                        |       |   | name                                          |
                                           | |  |metadata      |  |      |            |      |table id -   |  |    |   job to operate the table record             |       |   | ptr to tableheap                              |
                                           | |  |  -tableheap  +<--------+  -table1   |      |generator    |  |    |                                               |       |   - table obj id                                  |
                                           | |  |              |  |      |  -table2   |      |             |  |    |                                               |       |                                                   |
                                           | |  |              |  |      |            |      |             |  |    |                                               |       |                                                   |
                                           | |  |              |  |      |            |      +-------------+  |    |                                               |       |                                                   |
                                           | |  |              |  |      |            |                       |    |                                               |       |                                                   |
                                           | |  +--------------+  |      |            |                       |    |   - first page ( in physical disk) , retrie   |       |                                                   |
                                           | |                    |      |            |                       |    |   ve from bpm                                 |       |                                                   |
                                           | |                    |      |            |                       |    |                                               |       |                                                   |
                                           | |                    |      |            |                       |    |   InsertTuple(tuple)                          |       |                                                   |
                                           | |                    |      +------------+                       |    |                                               |       |                                                   |
                                           | |                    |                                           |    |   MarkDelete(record id)                       |       |                                                   |
                                           | |                    |                                           |    |                                               |       |                                                   |
                                           | |                    |                                           |    |   UpdateTuple(tuple)                          |       |                                                   |
                                           | |                    |                                           |    |                                               |       |                                                   |
                                           | |                    |                                           |    |                                               |       |                                                   |
                                           | |                    |                                           |    |                                               |       |                                                   |
                                           | |                    |                                           |    |                                               |       |                                                   |
                                           | |                    |                                           |    |                                               |       |                                                   |
                                           | |                    |                                           |    +-----------------------------------------------+       |                                                   |
                                           | |                    |                                           |                                                            |                                                   |
                                           | |                    |                                           |                                                            |                                                   |
                                           | |                    |                                           |                                                            +---------------------------------------------------+
                                           | +--------------------+                                           |
                                           +------------------------------------------------------------------+

DB Storage Buffer Pool Manager / Lab1 Hash Table / Lab2 Tree Index / 2018 Lab2 Multiple Version Concurrency Control

schedule

Database System Concepts 6e Modern BTree Technique A tour of C++

end

MIT6.824 , , slidenote, , , C++,