ExpressJs & Mongo
ExpressJs & Mongo
Development
Nimra Idrees
What is Express.js?
2
Features of Express.js
Fast Server-
Side Middleware Routing
Development
Templating Debugging
3
Advantages & Limitations
Unopinionated and Customizable: Offers freedom in Lack of Structure: No default way to organize code,
structuring applications. which can lead to confusion.
Middleware for Request Handling: Modularizes logic Callback Hell: Heavy reliance on callbacks can lead to
for tasks like authentication and logging. deeply nested, hard-to-read code.
Single Language (JavaScript): Simplifies development Unclear Error Messages: Debugging can be time-
by using JavaScript for both frontend and backend. consuming due to vague error outputs.
Requires Additional Tools: Developers might need to
Fast Database Integration: Seamlessly connects to
install third-party tools for better debugging or
databases like MySQL and MongoDB.
structuring.
Dynamic HTML Rendering: Enables customized web
pages based on user data.
Lightweight and Fast: Efficient for building
scalable applications.
It stores each
It stores individual
unrelated data record as a
in JSON like table cell with
documents rows and
columns
MongoDB Vs.
MySQL
MySQL requires
MongoDB
a schema
doesn’t require
definition for
any prior
the tables in the
schema
database
6
Supports Supports
JSON Query Structured
Language to Query
work with Language
data (SQL)
MongoDB Vs.
MySQL
Doesn’t
Supports the
support the
usage of
usage of
Foreign keys
Foreign keys
7
Supports
Supports master-slave
sharding and replication and
replication master-master
replication
MongoDB Vs.
MySQL
MongoDB
database can SQL Database
be scaled both can be scaled
vertically and vertically
horizontally
8
Does not
Supports Join
support Join
operation
operation
MongoDB Vs.
MySQL
Optimized for
Optimized for high
write performance
performance joins across
multiple tables
9
Prone to
no schema,
SQL
lesser risks
injection
involved
attack
MongoDB Vs.
MySQL
177k 222k
repositories repositories
and 923k and 7Million
commits commits
10
Which One to Choose?