No posts found for this topic.
SQL is the language of relational data, and it's aged remarkably well. This hub gathers SQL tutorials and guides on queries, joins, indexing, and writing performant queries against real databases.
4 articles · Updated February 8, 2024
Understanding indexes is the single highest-leverage SQL skill — most slow queries are a missing index away from fast.
Hand-picked and latest articles from this topic.
Plain-English explainers for core concepts related to this topic.
NoSQL databases store data in flexible, non-tabular formats like documents or key-value pairs, built for scale and schema flexibility.
Read guideDatabase normalization organizes tables to reduce redundancy and improve data integrity by splitting data into related tables.
Read guideDatabase indexes are data structures that speed up queries by creating fast lookup paths to data, similar to a book's index.
Read guideACID properties (Atomicity, Consistency, Isolation, Durability) ensure reliable database transactions.
Read guideSQL is the standard language for querying and managing data in relational databases, essential for most applications.
Read guideA database is an organized system for storing, managing, and retrieving data efficiently, used by virtually every application.
Read guideQuick-reference cheatsheets for tools and libraries in this space.
PostgreSQL is a powerful open-source relational database. This cheatsheet covers psql commands, DDL, and common operations.
Read guideSQL is the language for querying relational databases. This cheatsheet covers selects, joins, filtering, aggregation, and more.
Read guidePrisma is a modern ORM that provides type-safe database access with automatic migrations and a powerful query API.
Read guideCurated tools, docs, and communities worth bookmarking.
Quick answers about this topic hub.
Joins combine rows from multiple tables based on related columns. INNER JOIN returns matching rows from both tables; LEFT JOIN keeps all rows from the left table even without matches. Mastering joins is essential to working with relational data.
Start by examining the query plan to see what the database is doing. Common fixes include adding indexes on filtered and joined columns, selecting only needed columns, and avoiding functions on indexed columns in WHERE clauses.
WHERE filters rows before grouping, while HAVING filters groups after aggregation. Use WHERE for individual row conditions and HAVING for conditions on aggregate results like counts or sums.
No posts found for this topic.