Learn SQL in your browser
A free SQL tutorial in short lessons on one shop database. Every example runs on real PostgreSQL in your browser, and the page checks your answers.
Database design, migrations, SQL and everyday database work — explained with practical examples.
A free SQL tutorial in short lessons on one shop database. Every example runs on real PostgreSQL in your browser, and the page checks your answers.
SQL TOP, LIMIT, FETCH FIRST and ROWNUM on one six-row table: the syntax for each engine, OFFSET pages, WITH TIES, PERCENT, and the mistakes that return the wrong rows.
Draw a MongoDB database as a diagram in DbSchema: connect, read the collections, check the fields it found, add relations and export HTML5 documentation.
Eight MongoDB GUI tools compared on price, free tier and platforms, with a test on MongoDB 8.2 that shows how one mistyped field breaks a join.
MongoDB schema design best practices on one shop database: when to embed and when to reference, ESR indexes, a $jsonSchema validation rule, and the anti-patterns to avoid.
Learn MongoDB embedded documents and arrays from short examples with their output: dot notation, array queries, $elemMatch, $push, the positional $ operator and multikey indexes.
What cardinality says about a relationship, which SQL constraint enforces each kind in PostgreSQL, and how a many-to-many relationship becomes a junction table.
Learn SQL views from short examples with their results: CREATE VIEW, CREATE OR REPLACE VIEW, updatable views, WITH CHECK OPTION, GRANT and materialized views.
What an entity relationship diagram (ERD) shows, the crow's foot and Chen symbols, cardinality on a runnable library example, and how to draw one or generate it.
What a canonical data model is, when it pays off, what goes into it, and how one logical model becomes the right schema on PostgreSQL and MySQL.
Database design best practices shown in SQL on one small schema: planning, normalization from 1NF to 3NF, primary and foreign keys, constraints, data types, indexes and naming.