0% found this document useful (0 votes)
41 views23 pages

Mysql vs. Mongodb: Looking at Relational and Non-Relational Databases

This document compares MySQL and MongoDB databases. MySQL is an open-source relational database that uses structured query language and requires defining a schema upfront. MongoDB is a non-relational database that stores data as JSON-like documents, uses dynamic schemas, and is suited for complex, unstructured data. Both databases have different features and use cases depending on data structure, relationships, and querying needs.

Uploaded by

Pallavi Bharti
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
41 views23 pages

Mysql vs. Mongodb: Looking at Relational and Non-Relational Databases

This document compares MySQL and MongoDB databases. MySQL is an open-source relational database that uses structured query language and requires defining a schema upfront. MongoDB is a non-relational database that stores data as JSON-like documents, uses dynamic schemas, and is suited for complex, unstructured data. Both databases have different features and use cases depending on data structure, relationships, and querying needs.

Uploaded by

Pallavi Bharti
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 23

MySQL vs.

MongoDB: Looking At
Relational and Non-Relational Databases

By
HEMAL SHARMA
What is MySQL?
• MySQL is a popular open-source relational database management system
(RDBMS) that is developed, distributed and supported by Oracle
Corporation.
• Like other relational systems, MySQL stores data in tables and uses
structured query language (SQL) for database access.
• In MySQL, you pre-define your database schema based on your
requirements and set up rules to govern the relationships between fields
in your tables.
• In MySQL, related information may be stored in separate tables, but
associated through the use of joins. In this way, data duplication is
minimized.
What is MongoDB?
• MongoDB (“from the word humongous”) is an open-source database
developed by MongoDB, Inc.
• MongoDB stores data in JSON-like documents that can vary in structure.
• Related information is stored together for fast query access through the
MongoDB query language.
• MongoDB uses dynamic schemas, meaning that you can create records
without first defining the structure, such as the fields or the types of their
values.
• You can change the structure of records (which we call documents) simply
by adding new fields or deleting existing ones.
• This data model give you the ability to represent hierarchical relationships,
to store arrays, and other more complex structures easily.
Featurs
My Sql Mongo DB
Flexibility of Schema MySQL, you need to clearly define tables MongoDB is that there are no
and columns, and every row in the table restrictions on schema design.
should have the same column.
Querying Language MySQL uses the structured query MongoDB uses an unstructured
language SQL to communicate with the query language. use json
database. They used DDL (CRUD) and document.
DML (Creat,Drop,Alter..)
Relationships One of the best parts about MySQL is the MongoDB doesn’t support JOIN .
JOIN operations. they supports multi-dimensional
For example, we can easily obtain related data types such as arrays and even
data in multiple tables. other documents.
Performance and Speed MySQL is quite slower in comparison to is its ability to handle large
MongoDB when it comes to dealing with unstructured data
large databases.
Security Model MySQL uses a privilege-based security MongoDB uses role-based access
model. This means it authenticates a user control. Its security features
privileges on a particular database such include authentication, auditing,
as CREATE, SELECT, INSERT, UPDATE and authorization. Possible TLS
and SSL
Diffrance
Who used mysql ?
Who Used MongoDb ?
Example

MongoDb

MySQL
Terminology and Concepts
A comprehensive list of statements
Conclusion

• To answer the question, “Why I should use MongoDb over MySql?” you need to take into consideration your
project goals and many other things.

• MySQL is highly organized for its flexibility, high performance, reliable data protection, and ease of managing
data. Proper data indexing can resolve your issue with performance, facilitate interaction and ensure
robustness.

• But if your data is not structured and complex to handle, or if predefining your schema is not coming easy
for you, you should better opt for MongoDB. What’s more, if you're required to handle a large volume of
data and store it as documents, MongoDB will help you a lot!

• The result of the faceoff: One isn’t necessarily better than the other. MongoDB and MySQL both serve in
different niches.
Resources
• https://www.mongodb.com/compare/mongodb-mysql
• https://hackernoon.com/mongodb-vs-mysql-comparison-which-
database-is-better-e714b699c38b
• https://blog.panoply.io/mongodb-and-mysql
• https://dzone.com/articles/comparing-mongodb-amp-mysql
• https://dzone.com/articles/mysql-vs-mongodb-the-pros-and-cons-
when-building-a
• https://www.mysql.com/customers/
• https://www.mongodb.com/who-uses-mongodb
• https://www.youtube.com/watch?v=ZS_kXvOeQ5Y

You might also like