hey everyone welcome to the session by Initellipaat in today's world we
generate terabytes worth of data every single hour handling data especially
unstructured data like images videos and much more is a very challenging tasks
for the database technologies of today and in this session we're gonna compare
SQL head-on with MongoDB well before we begin with the session make sure to
subscribe to the intellipaat YouTube channel and hit that Bell icon so that
you never miss an update from us so here's the agenda for today we'll start
out by taking a quick introduction to databases followed by this we can take
an introduction to what SQL is as well and after this we will check out what
MongoDB is and where MongoDB is used and finally we're gonna compare SQL with
MongoDB head on to see what it has to offer to us and guys if you have any
queries make sure to head down to the comments section below and do let us
know there and we'll be happy to help you at the earliest and if you guys are
looking for end-to-end Co certification in the latest database technologies
Intellipaat provides the latest and the trending courses in the same so make
sure to check it out and on that note let's begin the class
so coming to the first item on the agenda we'll have a quick introduction
to SQL well what is SQL guys SQL stands for structured query language and it is
one of the standard languages which is used for accessing and manipulating
relational databases but then we have to talk about the overall scope or the
overall goal of the language such as SQL well it does it has a very simple goal
so the goal of SQL is actually very simple it is to make sure that it gives
the user a very easy way a simple way yet a powerful way to access the data
while storing it and working along with it at the same time so when we have to
talk about how SQL is used well you know SQL is basically used with a lot of data
sets to actually store and work with the data so all this data has to be
generated right so step one to working with any databases is to make sure that
it actually has the data so after the data has been generated it gets queried
using SQL so querying is the process where the programmer types in SQL
queries which basically you know is used to
a database create a table alter the table contents and in fact even delete
all of the contents as well so there are multiple queries out there but it has to
be known that everything from the most simplest query all the way till very
complex queries are actually very powerful in the world of SQL you know
data can eventually be stored in a very structured way and it can be accessed
very easily and very nicely or just because of SQL it ensures that you know
the data can be worked on at effective pace so when you have to talk about a
quick introduction to MongoDB well MongoDB is you know one of the world's
best no SQL databases what I have read so coming to a quick talk about no SQL
well no SQL is basically a non relational database management system so
here the data is not interrelated to each other it does not have a fixed
schema you know there are there are concepts as joins which doesn't work but
at the end of the day and no SQL database can be spread across multiple
systems and you know it can be scaled in a very rapid pace so this is one of the
reasons why in fact no SQL has gained so much traction in today's world it is
used by a variety of sources for any distributed data storage or needs and if
there is a need for any huge data storage requirement at the same time so
you know when we talk about no SQL it actually means not only SQL or not SQL
but then it has come to a stage where people start calling in no SQL and
pretty much that's the trend which has been set for the last couple of years
and we're gonna call it no SQL so coming to a quick introduction to MongoDB again
as we mentioned MongoDB is a general-purpose document based and in
fact distributed database which is actually built for all of the modern
developers to use and eventually it has been put together in such a nice way
that you know you can move your entire databases to the cloud and take your
entire business and scale it up as well so to come back to no SQL a little bit
you know no SQL databases it contains a wide variety of technologies which
basically can store any type of data that you or give it are in the variety
of data it can include or structured data for example tables
it can include semi structured data unstructured data for example you know
images videos music or even polymorphic data as
so you know when we talk about the companies which go on to use MongoDB
especially we have twitter via Facebook we have Google and there are multiple
other fortune 500 companies which make use of no SQL technologies on a day to
day basis but then the MongoDB usage are pretty
much this is what the people at MongoDB say they say it's been used by millions
of developers to power the world's most innovative products and services and in
fact what they say is actually true people at Facebook envision eBay adobe
Google's Squarespace Sega the gaming or the gaming company harmony UK's
government all the way till SAP so all of the big companies pretty much go on
to use MongoDB just a quick info in case you guys are looking for end-to-end core
certification in database technologies Intellipaat provides the latest and
the trending courses where you can learn all of these concepts thoroughly and
earn a certificate at the same time the link is given in the description box so
make sure to check it out and on that note let's get back to the class and in
fact coming to the quick comparison we're gonna have between SQL and MongoDB
which is gonna start right now with the first point which is the meaning well
with the meaning when you have to talk about it you know SQL databases actually
involve handling a lot of data by making use of a model what we call as a
relational model and this relational model make sure that the data is related
to one another and you know it can be accessed and worked along in a very
simple manner and this goes for the same and you have to talk about storing the
data and then you know processing the data at the same time but then you have
to talk about MongoDB MongoDB actually makes use of a non relational database
non relational databases usually document based data based where you know
the data is actually not interlinked to each other and this is how basically it
works when we have to talk about MongoDB versus SQL then come into the second
point it is the languages which are supported so you know SQL is actually
the primary language when we have to work with any relational databases you
know there are but there are multiple flavors of SQL that moves around there's
Microsoft's SQL Oracle's SQL and many many others so all of these are you know
varieties of the same base foundational concept of SQL but then when we come to
MongoDB you know MongoDB actually supports querying in JSON where all the
data is Stored that actually do formats in which it is
stored JSON and BSON and this is mostly used to work with the data
indirectly and directly as well so coming to the third point we have data
storage in data storage well as I told you SQL actually involves storing data
in databases by making use of tables by making use of interlinked storage
methodologies but then with respect to MongoDB since it's in no SQL database
it's gonna store the data as key value pairs and collection based databases so
this is one of the most important differences when we have to talk about
SQL and in fact MongoDB at the same time so coming to the next point which is
foreign key so you know SQL actually makes use of keys to map each table to
another or say for example or column to another column in another table so even
you have to map values from one table to another table we use something called as
keys you know we have primary keys we have candidate keys we have foreign keys
and much more so SQL actually supports making use of these foreign keys for
various database operations when if you talk about it well then you have to come
to talk about MongoDB well MongoDB does not support the use of foreign keys when
you have to talk about storing data in databases then point number five its
trigger support so SQL ensures that there is a valid support when we have to
make use of triggers because triggers again at the end of the day are you know
a special type of stored procedure which will automatically run whenever an event
occurs when we have to talk about the SQL server or wherever the database has
been stored so these triggers keep running and they run a procedure for us
which pretty much is already ready to execute and in fact it has already been
compiled but then when we have to talk about MongoDB the MongoDB actually does
not allow the users does not allow of the flexibility of making use of
procedures you know stored procedures and triggers and coming to number-6
schema well again SQL databases contains a
predefined schema which ensures the user can work with a fundamental structured
data but then MongoDB MongoDB actually does not contain a structured a
predefined schema it goes on with a dynamic schema and this our dynamic
schema has been the gold standard of working when we have to talk about all
of the big no SQL database is present today and then coming to point number seven
point number seven is the best fit you know sometimes SQL is not the best
fit when you have to talk about hierarchical data storage because again
storing data one after the other where it might become cumbersome and
inefficient to go on to work with it after some point of time but then
MongoDB MongoDB shines here because you know MongoDB in fact is one of the best
fit when you have to talk about hierarchical data storage methodologies
coming to number eight its scalability again SQL databases can be scaled
vertically on top of another just like a stack just by increasing the RAM of the
system but then when we talk about MongoDB Mongo databases can
actually be scaled horizontally by adding more servers in parallel to each
other again the outcome of this difference actually differs from what
your company wants because vertical scalability is something which is
required at one point of time in an organization while horizontal stability
and you know scalability is required by adding more servers to ensure in order
tendencies control data the data is there data backups and the data can be
accessed quicker than usual so again coming to a quick comparison in this
scalability point each of these has a stand but then we had to mention this
point because SQL is known for vertical scalability and MongoDB is known for
horizontal scalability coming to point nine it's the basic working well SQL
emphasizes on certain properties we call as the acid properties a stands for
atomicity C for consistency I for isolation and D for durability so the
entire basis of SQL is based on these properties to make sure that the
database is relevant and easy to work with and at the same time very low in
redundancy as well but then when we talk about MongoDB MongoDB you know goes on
to use something called as the cap theorem
C stands for consistency a stands for availability and P for partition
tolerance so all of these again are the driving force behind MongoDB and SQL
acid for SQL and cap theorem for MongoDB and each of these points when we have to
talk about it adds a certain uniqueness at certain value to the entirety of the
theorem and eventually the working of the database as a whole then coming to
point number 10 it's external support as we already know SQL has been there for a
while now and that it has excellent support because every time there is a
SQL provider out there there are many many menders out there who provide
support for this because at the end of the day SQL as I told you there are
multiple flavors which can be accessed through which can be worked with and at
the same time all of these flavors are about 70 to 80 percent the very same so
if you come to know one of the flavors of SQL it'll be very easy to adapt and
learn the other thing as well so it has excellent support when it comes to this
then coming to MongoDB MongoDB actually has good support too because when you
have to talk about it MongoDB entirely you know relies on the community support
and in fact it gets amazing community support and this is the entirety and
this is the center of universe when you have to depend on good support
structures with respect to MongoDB because at the end of the day the
Community Guidelines think of how the community grows out the product and
helps people out is what makes MongoDB What it is so to summarize this quick
comparison between SQL and MongoDB you know SQL has been a major player
throughout the world of IT right it has been very vital and some people call it
legacy as well in fact I would disagree with that statement because if it was
something if it was a legacy application then it will totally not been adopted
every single time there's a requirement for our relational database but then
when you have to talk about it the ground reality is that both SQL and no
SQL databases have been there alongside each other in many companies as well and
then coming to MongoDB you know MongoDB brings about a very different variety a
very different idea and perspective of storing the data and eventually letting
the user work with the data in a very simple manner in a very effective manner
without much querying and you know it makes it very intuitive to work with the
database at the same time as well so what's your take on this what do you
think about SQL and what do you think about MongoDB and with that thought
you've reached the end of this session just a quick info in case you guys are
looking for end-to-end course certification in database technologies
Intelluipaat provides the latest and the trending courses where you can learn
all of these concepts thoroughly and earn a certificate at the same time the
link is given in the description box and make sure to check it out I hope this
session was very informative for you all in case if you have any more points you
want to add to this SQL vs MongoDB video or if you have any queries in general
make sure to write down to the comment section and do let
No we'll be happy to help at the earliest and on that note have a nice
day