Databases: designing and querying a library system (exercise)
A complete exercise: analyse and fix the brief, draw the ERD, create tables with the right constraints, emulate a partial unique index on MySQL, then write 30 queries from basics to GROUP BY, EXISTS and ROLLUP.