[UPDATE] Enhancements to CMU 15-445: Incorporating Latest Spring 2023 Content & Relevant Resource and Improved Overall Formatting (#478)

* feat: Update CMU 15-445, improve overall format & update course relevant contents

* feat: Update English version & Improve overall format

* feat: Improve overall format
This commit is contained in:
Xu 2023-07-04 11:49:48 +08:00 committed by GitHub
parent 8262d0fe64
commit 7318286e51
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 69 additions and 20 deletions

View File

@ -8,27 +8,53 @@
- Difficulty: 🌟🌟🌟🌟
- Class Hour: 100 hours
This is an introductory course on databases at CMU taught by Andy Pavlo, a great expert in the field of databases. It teaches the basic topics of database systems from the bottom up, covering storage management, indexing, query processing, concurrency control, transactions, and so on.
As an introductory course to databases at CMU, this course is taught by Andy Pavlo, a leading figure in the database field (quoted as saying, "There are only two things I care about in this world, one is my wife, the second is the database").
The course project [Bustub](https://github.com/cmu-db/bustub) is an educational database system developed at CMU by the course instructors. During the semester, you will modify this database to implement the functions mentioned above. Moreover, as a well-written project in C++, Bustub obeys many modern development best practices, such as code specification, unit testing, cmake module build, etc. So it can be an excellent open source project to study.
This is a high-quality, resource-rich introductory course to Databases.
The faculty and the CMU Database Group behind the course have open-sourced all the corresponding infrastructure (Autograder, Discord) and course materials (Lectures, Notes, Homework), enabling any student who is willing to learn about databases to enjoy an experience almost equivalent to that of a CMU student.
One of the highlights of this course is the relational database [Bustub](https://github.com/cmu-db/bustub), which was specifically developed by the CMU Database Group for teaching purposes. It requires you to modify various components of this database and implement their functionalities.
Specifically, in 15-445, you will need to implement some key components in `Bustub`, a traditional disk-oriented relational database, through the progression of four Projects.
These components include the Buffer Pool Manager (for memory management), B Plus Tree (storage engine), Query Executors & Query Optimizer (operators & optimizer), and Concurrency Control, corresponding to `Project #1` through `Project #4`.
Worth mentioning is that, during the implementation process, students can compile `bustub-shell` through `shell.cpp` to observe in real-time whether their implemented components are correct. The feedback is very sufficient.
Furthermore, as a medium-sized project written in C++, bustub covers many requirements such as program construction, code standards, unit testing, etc., making it an excellent open-source project for learning.
## Resources
- Course Website: [Fall2019](https://15445.courses.cs.cmu.edu/fall2019/schedule.html), [Fall2020](https://15445.courses.cs.cmu.edu/fall2020/schedule.html), [Fall2021](https://15445.courses.cs.cmu.edu/fall2021/schedule.html)
- Recording: refer to the course website.
- Course Website: [Fall 2019](https://15445.courses.cs.cmu.edu/fall2019/schedule.html), [Fall 2020](https://15445.courses.cs.cmu.edu/fall2020/schedule.html), [Fall 2021](https://15445.courses.cs.cmu.edu/fall2021/schedule.html), [Fall 2022](https://15445.courses.cs.cmu.edu/fall2022/schedule.html), [Spring 2023](https://15445.courses.cs.cmu.edu/spring2023/schedule.html)
- Recording: The course website is freely accessible, and the [Youtube Lectures](https://www.youtube.com/playlist?list=PLSE8ODhjZXjaKScG3l0nuOiDTTqpfnWFf) for Fall 2022 are fully open-source.
- Textbook: Database System Concepts
- Assignments: 4 Projects
- Assignments: Five Projects and Five Homework
In Fall 2019, the second Project is to implement a hash table, and the fourth Project is to implement Logging, Recovery, and Checkpoints in your database system.
In Fall 2019, `Project #2` involved creating a hash index, and `Project #4` focused on logging and recovery.
In Fall 2020, the second Project is to implement B+Tree dynamic index structure, and the fourth Project is to implement concurrency control.
In Fall 2020, `Project #2` was centered on `B-trees`, while `Project #4` dealt with concurrency control.
In Fall 2021, the first Project is to implement a buffer pool, the second Project is to implement a hash table, and the fourth Project is to implement concurrency control.
In Fall 2021, `Project #1` required the creation of a buffer pool manager, `Project #2` involved a hash index, and `Project #4` focused on concurrency control.
If you have more time you can try them all, and when you do not understand the textbook very well, trying to implement the real system will deepen your understanding.
In Fall 2022, the curriculum was similar to that of Fall 2021, with the only change being that the hash index was replaced by a B+ tree index, and everything else remained the same.
In Spring 2023, the overall content was largely identical to Fall 2022 (buffer pool, B+ tree index, operators, concurrency control), except `Project #0` shifted to `Copy-On-Write Trie`. Additionally, a fun task of registering uppercase and lowercase functions was introduced, which allows you to see the actual effects of the functions you write directly in the compiled `bustub-shell`, providing a great sense of achievement.
It's important to note that the versions of bustub prior to 2020 are no longer maintained.
The last `Logging & Recovery` Project in Fall 2019 is broken (it may still run on the `git head` from 2019, but Gradescope doesn't provide a public version, so it is not recommended to work on it, it is sufficient to just review the code and handout).
Perhaps in the Fall 2023 version, the recovery features will be fixed, and there may also be an entirely new `Recovery Project`. Let's wait and see 🤪.
If you have the energy, I highly recommend giving all of them a try, or if there's something in the book that you don't quite understand, attempting the corresponding project can deepen your understanding (I personally suggest completing all of them, as I believe it will definitely be beneficial).
## Personal Resources
The unofficial [Discord](https://discord.com/invite/YF7dMCg) is a great platform for discussion. The chat history practically documents the challenges that other students have encountered. You can also raise your own questions or help answer others', which I believe will be a great reference.
For a guidance to get through Spring 2023, you can refer to [this article](https://zhuanlan.zhihu.com/p/637960746) by [@xzhseh](https://github.com/xzhseh) on [Zhihu](https://www.zhihu.com/) (Note: Since the article is originally written in Chinese, you may need a translator to read it :) ). It covers all the tools you need to succeed, along with guides and, most importantly, pitfalls that I've encountered, seen, or stepped into during the process of doing the Project.
All the resources and assignments used by [@ysj1173886760](https://github.com/ysj1173886760) in this course are maintained in [ysj1173886760/Learning:db - GitHub](https://github.com/ysj1173886760/Learning/tree/master/db).
Due to Andy's request, the repository does not contain the source code for the project, only the solution for homework. In particular, for Homework1, [@ysj1173886760](https://github.com/ysj1173886760) wrote a shell script to help you evaluate your solution automatically.

View File

@ -3,33 +3,56 @@
## 课程简介
- 所属大学CMU
- 先修要求C++,数据结构与算法
- 先修要求C++,数据结构与算法CMU 15-213 (A.K.A. CS:APP这也是 CMU 内部对每年 Enroll 同学的先修要求)
- 编程语言C++
- 课程难度:🌟🌟🌟🌟
- 预计学时100 小时
作为 CMU 数据库的入门课,这门课由数据库领域的大牛 Andy Pavlo 讲授“这个世界上我只在乎两件事一是我的老婆二就是数据库”。15-445 会自底向上地教你数据库系统的基本组成部分:存储、索引、查询,以及并发事务控制。
这门课的亮点在于 CMU db 专门为此课开发了一个教学用的关系型数据库 [bustub](https://github.com/cmu-db/bustub),并要求你对这个数据库的组成部分进行修改,实现上述部件的功能。此外 bustub 作为一个 C++ 编写的中小型项目涵盖了程序构建、代码规范、单元测试等众多要求,可以作为一个优秀的开源项目学习。
作为 CMU 数据库的入门课,这门课由数据库领域的大牛 Andy Pavlo 讲授(“这个世界上我只在乎两件事,一是我的老婆,二就是数据库”)。
这是一门质量极高,资源极齐全的 Database 入门课,这门课的 Faculty 和背后的 CMU Database Group 将课程对应的基础设施 (Autograder, Discord) 和课程资料 (Lectures, Notes, Homework) 完全开源,让每一个愿意学习数据库的同学都可以享受到几乎等同于 CMU 本校学生的课程体验。
这门课的亮点在于 CMU Database Group 专门为此课开发了一个教学用的关系型数据库 [bustub](https://github.com/cmu-db/bustub),并要求你对这个数据库的组成部分进行修改,实现上述部件的功能。
具体来说,在 15-445 中你需要在四个 Project 的推进中,实现一个面向磁盘的传统关系型数据库 Bustub 中的部分关键组件。
包括 Buffer Pool Manager (内存管理), B Plus Tree (存储引擎), Query Executors & Query Optimizer (算子们 & 优化器), Concurrency Control (并发控制),分别对应 `Project #1``Project #4`
值得一提的是,同学们在实现的过程中可以通过 `shell.cpp` 编译出 `bustub-shell` 来实时地观测自己实现部件的正确与否,正反馈非常足。
此外 bustub 作为一个 C++ 编写的中小型项目涵盖了程序构建、代码规范、单元测试等众多要求,可以作为一个优秀的开源项目学习。
## 课程资源
- 课程网站:[Fall2019](https://15445.courses.cs.cmu.edu/fall2019/schedule.html), [Fall2020](https://15445.courses.cs.cmu.edu/fall2020/schedule.html), [Fall2021](https://15445.courses.cs.cmu.edu/fall2021/schedule.html), [Fall2022](https://15445.courses.cs.cmu.edu/fall2022/schedule.html)
- 课程视频:课程网站免费观看
- 课程网站:[Fall 2019](https://15445.courses.cs.cmu.edu/fall2019/schedule.html), [Fall 2020](https://15445.courses.cs.cmu.edu/fall2020/schedule.html), [Fall 2021](https://15445.courses.cs.cmu.edu/fall2021/schedule.html), [Fall 2022](https://15445.courses.cs.cmu.edu/fall2022/schedule.html), [Spring 2023](https://15445.courses.cs.cmu.edu/spring2023/schedule.html)
- 课程视频:课程网站免费观看, Fall 2022 的 [Youtube 全开源 Lectures](https://www.youtube.com/playlist?list=PLSE8ODhjZXjaKScG3l0nuOiDTTqpfnWFf)
- 课程教材Database System Concepts
- 课程作业4 个 Project
- 课程作业:5 个 Project 和 5 个 Homework
在 Fall2019 中,第二个 Project 是做哈希索引,第四个 Project 是做日志与恢复。
在 Fall 2019 中,`Project #2` 是做哈希索引,`Project #4` 是做日志与恢复。
在 Fall2020 中,第二个 Project 是做 B 树,第四个 Project 是做并发控制。
在 Fall 2020 中,`Project #2` 是做 B 树,`Project #4` 是做并发控制。
在 Fall2021 中,第一个 Project 是做缓存池管理,第二个 Project 是做哈希索引,第四个 Project 是做并发控制。
在 Fall 2021 中,`Project #1` 是做缓存池管理,`Project #2` 是做哈希索引,`Project #4` 是做并发控制。
在 Fall2022 中,与 Fall2021 相比只有哈希索引换成了 B+ 树索引,其余都一样。
在 Fall 2022 中,与 Fall 2021 相比只有哈希索引换成了 B+ 树索引,其余都一样。
如果大家有精力的话可以都去尝试一下,或者在对书中内容理解不是很透彻的时候,尝试用代码写一个会加深你的理解。
在 Spring 2023 中,大体内容和 Fall 2022 一样缓存池B+ 树索引,算子,并发控制),只不过 `Project #0` 换成了 `Copy-On-Write Trie`,同时增加了很好玩的注册大小写函数的 Task可以直接在编译出的 `bustub-shell` 中看到自己写的函数的实际效果,非常有成就感。
值得注意的是,现在 bustub 在 2020 年以前的 version 都已经停止维护。
Fall 2019 的最后一个 `Logging & Recovery` 的 Project 已经 broken 了在19年的 `git head` 上也许还可以跑,但尽管如此 Gradescope 应该也没有提供公共的版本,所以并不推荐大家去做,只看看代码和 Handout 就可以了)。
或许在 Fall 2023 的版本 Recovery 相关的功能会被修复,届时也可能有全新的 `Recovery Project`,让我们试目以待吧🤪
如果大家有精力的话可以都去尝试一下,或者在对书中内容理解不是很透彻的时候,尝试做一做对应的 Project 会加深你的理解(个人建议还是要全部做完,相信一定对你有帮助)。
## 资源汇总
非官方的 [Discord](https://discord.com/invite/YF7dMCg) 是一个很好的交流平台,过往的聊天记录几乎记载了其他同学踩过的坑,你也可以提出你的问题,或者帮忙解答别人的问题,相信这是一份很好的参考。
关于 Spring 2023 的通关指南,可以参考 [@xzhseh](https://github.com/xzhseh) 的这篇[CMU 15-445/645 (Spring 2023) Database Systems 通关指北](https://zhuanlan.zhihu.com/p/637960746),里面涵盖了全部你需要的通关道具,和通关方式建议,以及最重要的,我自己在做 Project 的过程中遇到的,看到的,和自己亲自踩过的坑。
@ysj1173886760 在学习这门课中用到的所有资源和作业实现都汇总在 [ysj1173886760/Learning: db - GitHub](https://github.com/ysj1173886760/Learning/tree/master/db) 中。
由于 Andy 的要求,仓库中没有 Project 的实现,只有 Homework 的 Solution。特别的对于 Homework1@ysj1173886760 还写了一个 Shell 脚本来帮大家执行自动判分。