talent-plan/tinysql
talent-plan/tinysql has 2,053 GitHub stars and 545 forks. GitHot measured 0 stars in 24 hours. Last checked 2026-11-08 22:23 UTC. Last push 2023-09-27.
A course to build the SQL layer of a distributed database.
Measured star growth
- in 24h
- 0
- in 7 days
- Update delayed
- in 15 days
- Update delayed
- in 1 month
- Update delayed
Net star changes over overlapping periods, not daily totals. Missing measurements are left blank. Stars measure attention, not software quality.
README.md
OriginalTinySQL
TinySQL is a course designed to teach you how to implement a distributed relational database in Go. The name TinySQL indicates it is a simplifed version of TiDB.
Prerequisites
Experience with Go is required. If not, it is recommended to learn A Tour of Go first.
Course Architecture
The entire course is designed based on TiDB.
The course is organized into six parts:
- Simple explanation of SQL and relational algebra English | Chinese
- Parser English | Chinese
- DDL English | Chinese
- Optimizer English | Chinese
- Executor English | Chinese
- Percolator English | Chinese
Reference List
This reference list provides plenty of materials for you to study how a database system works. We pick some topics in it and prepare homework for you to have a better understand about it.
This course will take you from idea to implementation, with the essential topics of distributed relational database covered.
The course is organized into three parts:
Gives a simple interpretation of SQL and relational algebra in preparation for the following course.
Explains the life of a read-only SQL, which includes parsing, execution, and the optimization of SQL plans.
Focuses on SQLs (including DML and DDL) that change the state of the database: how they get implemented and how to deal with the interaction of them and read-only statements.
Other courses in this series
This course only focuses on the SQL layer of a distributed database system. If you are also interested in KV layer, see TinyKV.
Deploy
Once you finish the project. You can deploy the binary and use MySQL client to connect the server.
Build
make
Run & Play
Use ./bin/tidb-server to deploy the server and use mysql -h127.0.0.1 -P4000 -uroot to connect the server.
Also you can deploy the cluster together with the tinykv project.
Use make command in tinykv project to build binary tinyscheduler-server, tinykv-server.
Then put the binaries into a single dir and run the following commands:
mkdir -p data
./tinyscheduler-server
./tinykv-server -path=data
./tidb-server --store=tikv --path="127.0.0.1:2379"
Autograding and certification
Since Jun 2022, we start using github classroom to accept labs and provide autograding timely. The github classroom invitation is https://classroom.github.com/a/MZUEVGmB. The discussion Wechat/Slack group and the certification after you pass the class is provided in the tinySQL learning class
Autograding is a workflow which can automatically run test cases and give feedback timely. However there are some limitations in Github classroom, in order to make golang work and run it in our self-hosted machines, you need to overwrite the workflow generated by Github classroom and commit it.
cp scripts/classroom.yml .github/workflows/classroom.yml
git add .github
git commit -m"update github classroom workflow"
Contributing
Contributions are welcomed and greatly appreciated. See Contribution Guide for details on submitting patches and the contribution workflow.
License
TinySQL is under the Apache 2.0 license. See the LICENSE file for details.
Explore related projects
Asabeneh/30-Days-Of-Python
The 30 Days of Python programming challenge is a step-by-step guide to learn the Python programming language in 30 days. This challenge may take more than 100 days. Follow your own pace. These videos may help too: https://www.youtube.com/channel/UC7PNRuno1rzYPb1xLa4yktw
78,423 starsgrafana/grafana
The open and composable observability and data visualization platform. Visualize metrics, logs, and traces from multiple sources like Prometheus, Loki, Elasticsearch, InfluxDB, Postgres and many more.
77,763 starsredis/redis
For developers, who are building real-time data-driven applications, Redis is the preferred, fastest, and most feature-rich cache, data structure server, and document and vector query engine.
77,309 starsapache/superset
Apache Superset is a Data Visualization and Data Exploration Platform
75,453 stars