CMU 15-445 Database Systems
CMU 15-445/645 关系型数据库管理系统
课程网站:
PROJECTS:
STEPS:
- Linux 环境
- 安装依赖
- 克隆 Bustub 项目
- 完成项目要求
- 提交到 Gradescope
环境搭建
SSH 免密登录:
- 在本地生成 ssh 公钥 id_rsa.pub
- 把本地的 id_rsa.pub 拷贝到远程服务器上的 authorized_keys
本机:


Linux:
操作系统:Ubuntu 22.04.2 LTS x86_64
配置 SSH 远程连接:
1 | # 生成密钥 |
安装相关依赖:
1 | # install_linux() { |
下载 Bustub 项目:
https://github.com/cmu-db/bustub
1 | git clone https://github.com/cmu-db/bustub.git |
线上提交
注册课程
邀请码在课程网站的 FAQ 里,用于上传代码做线上评测
本地测试:
1 | /home/hcjjj/Desktop/bustub |
执行 make check-clang-tidy-p0 报错:Unable to run clang-tidy.
1
2
3
4 where python3
ls -l /usr/bin | grep python
sudo ln -s /usr/bin/python3 /usr/bin/python
然后检查一下 clang-tidy 有没有安装上
本地测试案例代码:

打包:

线上提交:
后面几个项目 CMakeLists.txt 写好了打包操作,不需要自己 zip
1 | 执行 make 打包项目1 源代码 |

上传 project1-submission.zip 到网站相应位置进行评测:

调试工具
In brief, LLDB and GDB are two debuggers. The main difference between LLDB and GDB is that in LLDB, the programmer can debug programs written in C, Objective C and C++ while, in GDB, the programmer can debug programs written in Ada, C, C++, Objective C, Pascal, FORTRAN and Go.
LLDB 调试的原理:基于操作系统的 ptrace 系统调用,用于进程跟踪,它可以让 A 进程监听和控制 B 进程的内存和寄存器。
GDB:https://www.sourceware.org/gdb/
1 | sudo apt install lldb |

Project #0
In this project, you will implement a key-value store backed by a concurrent trie.
Identification: src/include/primer/p0_trie.h
- 力扣 208. 实现 Trie (前缀树)
- Task #1 - Templated Trie
- Task #2 - Concurrent Trie
实现思路
- TrieNode
- TrieNodeWithValue
- Trie
- Insert
- Remove
- GetValue
本地测试
1 | cd build |
代码格式化
1 | cd build |
代码提交
1 | cd .. |