Check out example codes for "mongodb vs mysql". It will help you in understanding the concepts better.

Code Example 1

MySQL is a relational database management system (RDBMS) from the 
Oracle Corporation. Like other relational systems, MySQL stores data 
in tables and uses structured query language (SQL) for database 
access. When MySQL developers need to access data in an application, 
they merge data from multiple tables together in a process called a 
join. In MySQL, you predefine your database schema and set up rules 
to govern the relationships between fields in your tables.

MongoDB is a NoSQL database that stores data as JSON-like documents. 
Documents store related information together and use the MongoDB 
query language (MQL) for access. Fields can vary from document to 
document - there is no need to declare the structure of documents to 
the system, as documents are self-describing. Optionally, schema 
validation can be used to enforce data governance controls over each 

Learn ReactJs, React Native from