vs MongoDB
MySQL: tables, fixed columns, JOINs, SQL, FOREIGN KEYs. MongoDB: collections of JSON-like documents, flexible fields, no JOINs in the SQL sense (you embed or $lookup).
Pick MySQL when data is tabular and relationships matter (student–marks–fees). Pick Mongo when documents vary and you load one blob per user. Both can be right. ‘NoSQL is always faster’ is false.
Trap — forcing a 6-table JOIN into Mongo, or storing a 20-level JSON in MySQL because ‘JSON column exists’.
On the example next to this theory: vs MongoDB: create two demo rows, then SELECT qty >= 2 ordered. Say which labels come back.
Tables+JOIN vs documents. Pick by data shape, not hype.