Learning Library

← Back to Library

MySQL vs MongoDB Explained

Key Points

  • MySQL is a legacy, table‑based relational DB (originating in 1995) that enforces a fixed schema for rows, while MongoDB (launched in 2007) is a document‑oriented NoSQL DB that stores JSON‑like BSON documents without a strict schema.
  • The names are quirky: “SQL” stands for Structured Query Language, “MySQL” references the developer’s daughter, and “MongoDB” is a playful nod to “humongous” data capacity.
  • Both systems are open‑source, support common programming languages (e.g., Java, Python), and can be deployed in cloud‑native environments, but they differ in data modeling flexibility.
  • MySQL relies on a storage engine plus SQL for data manipulation, whereas MongoDB uses its own query language and BSON documents, which many developers find easier for handling dynamic, unstructured data.

Full Transcript

# MySQL vs MongoDB Explained **Source:** [https://www.youtube.com/watch?v=OdgZ0jr4jpM](https://www.youtube.com/watch?v=OdgZ0jr4jpM) **Duration:** 00:05:21 ## Summary - MySQL is a legacy, table‑based relational DB (originating in 1995) that enforces a fixed schema for rows, while MongoDB (launched in 2007) is a document‑oriented NoSQL DB that stores JSON‑like BSON documents without a strict schema. - The names are quirky: “SQL” stands for Structured Query Language, “MySQL” references the developer’s daughter, and “MongoDB” is a playful nod to “humongous” data capacity. - Both systems are open‑source, support common programming languages (e.g., Java, Python), and can be deployed in cloud‑native environments, but they differ in data modeling flexibility. - MySQL relies on a storage engine plus SQL for data manipulation, whereas MongoDB uses its own query language and BSON documents, which many developers find easier for handling dynamic, unstructured data. ## Sections - [00:00:00](https://www.youtube.com/watch?v=OdgZ0jr4jpM&t=0s) **Comparing MySQL and MongoDB** - The speaker contrasts MySQL’s legacy, schema‑enforced, table‑based relational model with MongoDB’s newer JSON‑document, schema‑flexible approach, explains the quirky origins of their names, and hints at the contexts where each is appropriate. ## Full Transcript
0:00MySQL and mongodb are both database 0:04Management systems that let you extract 0:05data and create reports but there are 0:09also fundamentally quite different now 0:12my SQL is a legacy table 0:17based database and that really has a 0:20structured system to it whereas mongodb 0:24is a document 0:28based system 0:30now what does that mean and when should 0:32you choose one over the other well I'll 0:35tell you but first there's something far 0:37more important I want to address which 0:39is where did these Technologies get 0:42their weird names 0:44so you probably already know that SQL 0:46that stands for structured query 0:47language but by the pronoun well 0:51actually it's not the my is a shortened 0:54name of one of the developers daughters 0:57there's also a Maria DB and a Max DB 1:01named after the same developers other 1:03kids 1:03and mongodb that's a questionable 1:08shortening of the word humongous as in 1:11mongodb can store a Hugh Mongoose amount 1:16of data 1:18all right naming aside what are the 1:20differences here well MySQL this was 1:23developed back in 1990. 1:26five and for almost two decades has been 1:29the structured query language on which 1:31the Mainstay of design modeling has been 1:34based for relational database Management 1:36Systems MySQL is table based and 1:40therefore it enforces a schema 1:44and the schema is used so that all rows 1:46in a table will have the same columns 1:49and those columns will have specific 1:51data types mongodb is more recent this 1:55was founded in 1:572007 and was at the time a new approach 2:01to database design representing data 2:03here as Json 2:06documents so it's object based 2:09hey real quick if you're enjoying this 2:11content please like And subscribe to 2:15this channel now there's much about 2:16these two systems that are alike at 2:19their core both of them are database 2:22Management systems that serve as the 2:24ground level Information Network for any 2:26type of digital site or space both MySQL 2:30and mongodb support the same languages 2:34for example they both support Java 2:37and python 2:40so that's supported by mongodb 2:43and by MySQL apps Developers for both 2:47systems originally created these to be 2:50open source 2:54therefore the code was freely available 2:56for anyone who wants to use and to 2:58distribute it and you could consider 3:00both of these in a cloud native 3:04solution 3:06but mongodb was in some ways designed to 3:11supplant the Legacy MySQL structure as 3:15an easier way to work with data we can 3:18think of MySQL as being a bit more rigid 3:23with its architecture and really not 3:25quite as flexible 3:28for formatting 3:30data 3:31structures as mongodb can be 3:35now MySQL has two main components 3:37there's a type of storage engine and 3:40language used to work with the data so 3:41the storage engine is where the data is 3:43created retrieved sentence stored and 3:45the language is how you access it 3:48mongodb on the other hand is a no SQL 3:51database it's founded upon documents as 3:53the unit of data for search it employs 3:56Json language and it uses mongodb query 4:00language 4:01additionally mongodb employs bison those 4:05are json-like documents that are binary 4:07coded into typically smaller files and 4:10many developers find these easier to 4:12manipulate making data management faster 4:15now which one to use does as always 4:18depend on your use case MySQL is 4:21considered highly accessible and secure 4:23making it well suited to high traffic 4:26sites such as e-commerce sites and 4:28compliance heavy industries that require 4:30protocols for height security 4:33mongodb's use of dynamic schema design 4:36fosses a more flexible environment for 4:38data search coding integration and 4:40database development and it's optimal 4:42for Content Management systems and high 4:45query sites such as analytics 4:47applications 4:49so MySQL and mongodb or you know what 4:53you you could consider a third option as 4:57my yet to be created 5:00giz 5:01Norm 5:03d b 5:05where giz refers to my late cat Gizmo 5:09and Norm for the ginormous amount of 5:13data it can process 5:16yeah this 5:18this needs to become a thing