How a SQL database works
calpaterson.com
calpaterson.com
They just need to be ready to do efficient full table scans.
I did originally try using a meatier example but I found that doing that a) makes writing the article really hard - for example, diagramming a meaningful database is a lot of work and makes the diagrams incomprehensive and b) it is that much harder to trasmit the principles than when the example is trivial.
[0] https://www.youtube.com/playlist?list=PLSE8ODhjZXjbohkNBWQs_...
MySQL IMHO is better for this than Postgres because it's more predictable and you have more tools to force its behaviour, with straight_join and index hints, whereas with Postgres you're forced to use CTEs to control evaluation behaviour when you have application knowledge that the DB doesn't have stats for.
If you know nothing about how databases work, and deal in mostly simple queries, Postgres is a better choice though.
(Seriously, why keep doing this?)