SQL (Structured Query Language) is a commonly used and reliable way for programs to store and retrieve data. In many cases, it’s much better in many ways than just using files directly.
There’s a lot that can be learned about SQL. Here are some resources to get you started.
- Learn SQL with SQLBolt and/or The SQL Murder Mystery.
- Choose a database technology and tools.
- Databases by Full Stack Python is a guide (not entirely for Python) with various resources about databases.
- Supabase and Turso (and some others) have decent free tiers and make setting up databases relatively easy.
- Beekeeper Studio is a an open source SQL editor and database manager with a free tier. I use it and it seems to work well.
- Tools like sqlc generate type-safe database interface code for you without unnecessary abstraction. Here are other SQL interface generators (or related tools) I haven’t really looked into: Jet, SQLBoiler, SQLx, Goa, Go kit, gqlgen, Bun.
- If you are making an asynchronous application, you will probably want to choose an asynchronous library for interacting with your database. For example, asyncpg is a good choice for PostgreSQL in asynchronous Python.
- If each user of software you’re making needs their own local database, consider using SQLite so that the user doesn’t have to set up the database themselves. Here’s a 2022/4/25 HN discussion on the pros and cons SQLite versus other database technologies.
- There are some SQL services available in the GitHub student developer pack.
intermediate topics
- SQL Roadmap - roadmap.sh
- Sqlines is a collection of “tools to help you transfer data, convert database schema (DDL), views, stored procedures, packages, user-defined functions (UDFs), triggers, SQL queries, SQL scripts between different database platforms.”
- Learn Database Normalization - 1NF, 2NF, 3NF, 4NF, 5NF by Decomplexify
- Use the Index, Luke! by Markus Winand
- Simplify: move code into database functions by Derek Sivers
- Database migrations by Vadim Kravcenko
- Things to know about databases by Mahdi Yusuf
- 2023/10/1 HN discussion on database migrations