SQL vs NoSQL or MySQL vs MongoDB

Sdílet
Vložit
  • čas přidán 24. 07. 2018
  • SQL or NoSQL? MySQL vs MongoDB? Which database is better? Which one should you use?
    Get our complete SQL (MySQL & PostgreSQL) course: acad.link/sql
    Learn all about MongoDB: acad.link/mongodb
    Exclusive discount also available for our MEAN (Mongo, Express, Angular, Node) course: acad.link/mean
    Join our Academind Community on Discord for free: / discord
    Don't miss the article on this video: academind.com/learn/web-dev/s...
    Want to learn something totally different? Check out our other courses: academind.com/learn/our-courses
    ----------
    More on SQL Horizontal Scaling: stackoverflow.com/questions/2...
    ----------
    • You can follow Max on Twitter (@maxedapps).
    • And you should of course also follow @academind_real.
    • You can also find us on Facebook.( / academindchannel )
    • Or visit our Website (www.academind.com) and subscribe to our newsletter!
    See you in the videos!
    ----------
    Academind is your source for online education in the areas of web development, frontend web development, backend web development, programming, coding and data science! No matter if you are looking for a tutorial, a course, a crash course, an introduction, an online tutorial or any related video, we try our best to offer you the content you are looking for. Our topics include Angular, React, Vue, Html, CSS, JavaScript, TypeScript, Redux, Nuxt.js, RxJs, Bootstrap, Laravel, Node.js, Progressive Web Apps (PWA), Ionic, React Native, Regular Expressions (RegEx), Stencil, Power BI, Amazon Web Services (AWS), Firebase or other topics, make sure to have a look at this channel or at academind.com to find the learning resource of your choice!
  • Věda a technologie

Komentáře • 1,2K

  • @windar2390
    @windar2390 Před 5 lety +1121

    0:36 SQL
    9:00 NoSQL
    13:13 Differences

    • @annyrose4218
      @annyrose4218 Před 4 lety +10

      Thank you for this.

    • @mohamedjolti572
      @mohamedjolti572 Před 4 lety +1

      this course how to create the same web applcation using node js mongo db and php mysql:
      www.udemy.com/course/node-js-mongodb-vs-php-mysql-build-the-same-web-application/

    • @Wenutz
      @Wenutz Před 4 lety +14

      Not all heros wear capes!

    • @floatingsaint8493
      @floatingsaint8493 Před 4 lety +8

      U know this is the only useful🙂 comment in the whole comment section

    • @EduardoSDiaz
      @EduardoSDiaz Před 4 lety

      Thanks bro!

  • @aleksas_codebook
    @aleksas_codebook Před 3 lety +42

    I dont think I will ever be grateful enough for Maximilian. This man single-handedly taught me everything from HTML, CSS and basic JavaScript, all the way to Vue and React, Node.js, databases and REST API. Thanks to you I got a highly paying job, and can make anything that comes to my mind. Thank you sir from the bottom of my heart. :)

  • @rodrigo-xy2cg
    @rodrigo-xy2cg Před 4 lety +130

    A key concept in this comparative analysis is consistency of information.
    - SQL (Relational Databases): a good design (scheme and constraints defined correctly and transactions are used properly) allows the database engine to guarantee consistency based on that design.
    - NoSQL: lower consistency of information (it is a responsibility of the developer to ensure consistency... some time this could be very difficult).

  • @nicolasazoidis9064
    @nicolasazoidis9064 Před 4 lety +8

    Man you knowledge base is beyond human scope...really. When i first started learning programming there where many times i coulnd't get you, after learning programming there a lot of times i realize how many miles ahead you are. RESPECT.

  • @MrAnonimR
    @MrAnonimR Před 4 lety +29

    Hi,
    thank you for putting the effort and time to explain in such understandable way the differences between SQL and NoSQL. I appreciate your effort ! Good Luck!

  • @isaias4600
    @isaias4600 Před 5 lety +124

    God bless this "vs" videos they are so good.

    • @academind
      @academind  Před 5 lety +14

      I'm very happy to hear that, thank you so much!

  • @TheAkbar1000
    @TheAkbar1000 Před 4 lety +2

    Thanks for the quick overview... I really needed that!

  • @hahmadzai23
    @hahmadzai23 Před 4 lety +37

    Appreciate the breakdown!

  • @Relsig89
    @Relsig89 Před 4 lety +4

    Horizontally scaling SQL isn't very difficult but it requires a backend to do some extra work behind the scenes (which isn't terribly hard to program). Implemented properly and under certain conditions it can be slightly faster than NoSQL.
    You can use Schemas with NoSQL, see tools like Mongoose. Mongoose also makes relations very easy with the populate function. If the data isn't likely to change frequently it would still be better to just nest the data you need and update it as needed for speed though.
    So
    SQL horizontal scaling: possible but more difficult than NoSQL.
    NoSQL: Schema-optional with reverse-compatible changes via some well documented apis
    Aside from those excellent video

  • @scvscades
    @scvscades Před 3 lety +15

    Thank you for this! I've been tasked to build a DB, but wasn't sure which type to go with. I tried using MongoDB and I can see where it has it's advantages. After watching this though, an SQL DB is better for our needs.

    • @mikatu
      @mikatu Před rokem +4

      The rule is always, when in doubt go for SQL.

  • @guolunli1908
    @guolunli1908 Před rokem

    This is the best introduction to the difference between SQL v.s. NoSQL databases on CZcams. No wonder why this video gets near 2M views.

  • @saidheeraj1760
    @saidheeraj1760 Před 3 lety

    Didn't expect to get this with one video. You did it man. Keep going ✌️

  • @cancer10in
    @cancer10in Před 5 lety +45

    You have explained it very nicely Max. Cheers!

    • @academind
      @academind  Před 5 lety

      That's really great to read Soubhik, thank you very much!

  • @fabriziodutto7508
    @fabriziodutto7508 Před 3 lety +14

    There are special commands so called "choins" @8:31 :-) I really love this german accent! Thank you for this comparison, very interesting and complete.

  • @colinlee789
    @colinlee789 Před 3 lety +1

    This is the most clear explanation of SQL and NoSQL on CZcams.

  • @CodeSbyAniz
    @CodeSbyAniz Před 3 lety

    I have watched a BUNCH of videos on this subject and this was the best one by far. THANK YOU!

  • @shutterradio
    @shutterradio Před 4 lety +7

    Brilliant explanation! I have a feeling that I can learn anything by watching your courses!

  • @akmalatkhamov8760
    @akmalatkhamov8760 Před 5 lety +4

    Tremendous explanation. I have spent 3 days reading tons of information about differences between SQL and NoSQL, and have understood less than I expected, but this video made everything straightforward. Thanks to the author! Great work!

    • @academind
      @academind  Před 5 lety +2

      Happy to read that the video helped to make things clearer, thank you Akmal!

  • @grantharmer7110
    @grantharmer7110 Před 5 lety +2

    Great video. One of the other key things SQL databases tend to have over NoSQ databases are transactions. i.e. ACID (Atomicity, Consistency, Isolation, Durability) support. But, there is an argument that, if you structure your NoSQL documents well, ACID is not needed

  • @yunli1333
    @yunli1333 Před 5 lety +7

    19:00 summary is pretty solid.

  • @janina_1412_
    @janina_1412_ Před 4 lety +11

    Thank you for the great explanation! I've been looking up a lot of information about databases and this is by far the best and most helpful video!

    • @krook7943
      @krook7943 Před 3 lety

      More Mongo Db
      czcams.com/video/U2QUb0gDkKQ/video.html

  • @user-cv1pi1xq4w
    @user-cv1pi1xq4w Před 3 lety +5

    thank you man!!! You are the best in this theme!

  • @rbelatamas
    @rbelatamas Před 3 lety +1

    Really, really, good, clear description!!! Thank you so much!

  • @dust2dust61
    @dust2dust61 Před 3 lety

    Just amazing, the way you described both of those database system, really saved me a tons of time surfing through out the internet and reading tons of materials. Thank you so much.

  • @goodvibesonly926
    @goodvibesonly926 Před 4 lety +3

    Great video 👍 Could you maybe have a part 2 of this that provide practical examples, eg. Pointing out a few tech companies that are using different type of DBMS and how do they store or work with their current data. For a fresh graduate like me that do not have industry experience, it will give some insights when searching for job roles

  • @smanihwr
    @smanihwr Před 5 lety +8

    Thanks for this video Max!! Comparison slide was more helpful.

    • @academind
      @academind  Před 5 lety

      Thanks for your nice and helpful feedback!

  • @MaqsoodAlamShafiq
    @MaqsoodAlamShafiq Před 4 lety

    Thanks for sharing a very elaborated comparison of SQL vs NoSQL.
    At 19:46 of the video you mention we can face issues if DB becomes really really big. I have a some questions here:
    1- What are the issues and which DBMS is favored?
    2- Can you give an idea in terms of Gigabytes or number of records where we start thinking its becoming really really big?
    3- Which one is easier for writing code for CRUD ops ?

  • @bensmith6987
    @bensmith6987 Před 2 lety

    Quite clear and smooth explanations. Much appreciated. Looking into taking your MongoDB course in the near future.

  • @brunocarvalho5578
    @brunocarvalho5578 Před 5 lety +3

    Thank you! Helped me alot! I was struggling to decide which one I would use in my project because I don't knew these core differences and concepts.
    (I really enjoy and understand most of what you teach and that's the reason why I bought some of your courses, even that english it's not my first language)

    • @academind
      @academind  Před 5 lety +2

      Thanks a lot for your awesome feedback Bruno, happy to read that the video was helpful for you! Thanks a lot also for your support, great to have you on board here and on Udemy :)

  • @oubrioko
    @oubrioko Před 5 lety +8

    Horizontal scaling (also called _scaling-out_ ) is challenging and can be inherently inefficient with a _shared-nothing_ SQL database like MySQL, as mentioned in the video. However, there *are* indeed _shared-storage_ SQL databases that are designed to dynamically scale-out (horizontal scale) seamlessly. This is accomplished by replicating the database _structure_ on each server node, but with virtual programmatic pointers in each table, rather than the actual rows (records) of data themselves. These pointers point to corresponding table structures on distributed Storage Area Networks (SANs) that contain the actual rows of table data. Given this complexity, an enterprise-grade dynamically scalable shared-storage SQL database solution like Oracle 18c is very expensive to acquire, implement, administer and support. During the mid-2000s, Larry Ellison used to love to brag about the horizontal scaling capability of Oracle's shared-storage SQL offerings verses IBM's DB2 shared-nothing SQL database.

    • @communitycollegegenius9684
      @communitycollegegenius9684 Před rokem

      I learned a lot from this video. I am now prepared for the conference call and will drop some wertical scaling on them.

  • @Loppy2345
    @Loppy2345 Před 4 lety +1

    This is one of the few "VS" questions that really is useful, it comes up all the time in job interviews.

  • @mbramante
    @mbramante Před 3 lety +2

    I really like this video with one singular exception.
    When discussing relational databases at 1:48 minutes into this video the narrator says: "The database we typically use is a relational database that means we have a database which works with certain assumptions".
    No other mention or explanation is given for this.
    Also there is never a mention of NoSQL databases working "with certain assumptions".
    I've designed/modeled and built relational databases for 19 years.
    I base every relational database design on one thing: Rigorous due diligence in requirements discovery and analysis.
    This means:
    1) Requirements
    2) All the requirements
    3) Nothing but the requirements
    The one thing I NEVER base my relational designs on is "assumptions". No good relational database design should ever be based on assumptions.

    • @gregborbonus4122
      @gregborbonus4122 Před 3 lety

      The assumptions being made are within the database architecture. Such as assuming every user has a product id(for building out keys and references) so when you act on those relations, SQL engine expects corresponding data in other table(foreign keys as an example)

  • @PetarLuketina
    @PetarLuketina Před 5 lety +5

    Wow, this is a great information. As a beginning SQL learner, I got a good chunk of knowledge from your video. Thank you!

    • @academind
      @academind  Před 5 lety

      That's really cool to read Petar, thank you very much for your great feedback!

  • @mailtochung
    @mailtochung Před 4 lety +4

    This video explains the basic difference, there are few points I want to add:
    1. NoSQL is more intuitive in real life. Think about a patient filling up a form in a clinic. SQL needs to break the data down into few tables, set all the columns and check all the types to process it. but NOSQL just save the whole document into the collection. It can be a complicated structure with array and nested obj in the document. This is the idea of row based vs document based. I found that I have saved lots of time of dealing with the database structure in SQL. That makes my development more effective. But of course, you need to know what you are doing or you will mess it up.
    2. A major factor of choosing is what language you use in your service layer. If you use Node.JS (this is the most famouse one now), very high chance you will choose NoSQL becuase it just work so great together. The data you store and the object you process in Node is exactly the same (JSON)! This just save lots of conversion and mapping work.
    3. Most of the people using MongoDB will define a schema on top of it, so that schema-less selling points just go away. But it is still a lot easier to modify the schema. You don't need ALTER statement to alter the table. That's save lots of hassle in deploying a new version.
    4. The more experience I get with NoSQL, the more I realise how much it can replace SQL. It looks messy and you won't feel good in the beginning. But it's just the other way of organizing your data. You will have less relationship, and your relation join will be happening in the service layer. But if you are doing highly transaction application (Like a bank or payment stuff), you should still use SQL. The way you can open transaction, commit it, or roll back. You can never do this so well in NOSQL because of it's nature of lacking relationships across documents and collections.

  • @Eddy-ly2ml
    @Eddy-ly2ml Před 3 lety

    2 years later from this video update and its super nice to hear all this information!

  • @bnmvbn654
    @bnmvbn654 Před 5 lety +2

    This is hands down the most concise and relatable explanation of a SQL-like database vs a NoSQL-like database I have ever seen.
    Random tips:
    -A good intro to SQL is reading Chapter 2 of the official PostgreSql manual.
    -As a frontend dev, it's easier to "pick up" NoSQL. Since NoSQL is literally a folder of JSON files that you can search(query) through.
    -But, it's easy to dig yourself into a hole if you duplicate your data in several locations and then need to update that same piece of data.
    -You can also hurt yourself when your not consistent with your property names. For example "first name" can be found as "f_name" or "firstName" in your NoSQL database
    -Just be careful, and very consistent when using NoSQL.
    For total beginners, I recommend to go with SQL and then migrate to NoSQL if needed.
    Think of SQL-databases as a really powerful sportbike motorcycle with really good training wheels. It's safe and you probably won't outride the bike.

    • @academind
      @academind  Před 5 lety

      Thanks a lot for your wonderful feedback and for providing the additional resources, I really appreciate both :)

  • @mza1409
    @mza1409 Před 5 lety +1591

    Will this video get a sequel?😂

    • @academind
      @academind  Před 5 lety +253

      I see what you did there :D

    • @filcondrat
      @filcondrat Před 5 lety +21

      web witticism development

    • @6884
      @6884 Před 5 lety +18

      where is the NUCLEAR BAN button here??

    • @colinmaharaj
      @colinmaharaj Před 5 lety +83

      I will JOIN you there in that QUERY.

    • @jded1346
      @jded1346 Před 5 lety +49

      NoSequel :)

  • @vangxbg
    @vangxbg Před 5 lety +22

    amazing. I finally understand now.

  • @TheRFracer
    @TheRFracer Před 2 lety +1

    Your ability to teach, explain things is absolutly awesome. Im watching a lot of diffrent famous IT youtubers but your content is gold and definitly the best. You probably created more IT devs than any university of the world ;)

    • @academind
      @academind  Před 2 lety

      That's awesome to hear, really means a lot to me! Thank you so much! :)

  • @felipemedina2279
    @felipemedina2279 Před 3 lety +1

    Great! This content helped me a lot to decide wich db I have to learn now.
    Thank you bro, hugs from Brazil

  • @osvaldoguzman3115
    @osvaldoguzman3115 Před 5 lety +11

    Another important thing to consider for SQL databases is the amount of time conceptualizing a SQL database takes. For an effective SQL db you need a proper ERR Diagram and schema that takes into consideration a ton of user interactions. One wrong step at the conceptualization phase and your whole relational system breaks. Similarly, the modification anomalies that may come from NoSQL can break your db, but to a more manageable extent IMO. When agile development reigns king, quick development with short conceptualizing phases means your better off with NoSQL despite the downside to writing-heavy applications. What do you all think?

  • @gjermundification
    @gjermundification Před 5 lety +6

    9:16 mongoDB may be the nosql with most tutorials, then again if you run postgres, mongodb and couchdb in strace, mongodb spends like 6 times the amount of resources to achieve the same performance compared to postgres or couchdb.

  • @antonkarpovich4201
    @antonkarpovich4201 Před 3 lety +1

    Just an amazing explanation!
    Thank you for such a wide and comprehensive
    comparison.

  • @billsantamaria1
    @billsantamaria1 Před 3 lety

    I like most of the description here since I was trying to better understand the NoSQL standpoint. However, I do want to point out that not all SQL implementations are limited on horizontal scaling. Oracle DB since 10g (and better since 11g) has the ability to RAC scale horizontally and keep the data synched between nodes (servers). You do have to properly design the data distribution for such a setup, but when properly designed there is little to no limitations on scale.

  • @khalidelgazzar
    @khalidelgazzar Před 4 lety +3

    Thank you very much Max for explaining deep topics in simple and easy way

    • @mohamedjolti572
      @mohamedjolti572 Před 4 lety

      this course how to create the same web applcation using node js mongo db and php mysql:
      www.udemy.com/course/node-js-mongodb-vs-php-mysql-build-the-same-web-application/

  • @maxnaiir
    @maxnaiir Před 5 lety +4

    just was wondering about this topic and bam!!! the notification, sql vs nosql..
    .. thanx max

    • @academind
      @academind  Před 5 lety

      Guess that was kind of the right timing for you then, so cool to read that :)

  • @joe90kz
    @joe90kz Před 5 lety

    The best explanation.
    I remember the no-sql (database/aplication) format from Lotus Notes/Domino. Based in a colection of documents like a database with many referenses (Document ID, ID, DB ID, Field ID, etc) to link to another Lotus notes/Domino documentes from another "databases/aplications".

  • @raulbarriga7416
    @raulbarriga7416 Před 2 lety

    Good thing I found this video, and from a web developer/full stack CZcamsr. Needed to see which sql to choose to learn.

  • @nikitaantonenko3287
    @nikitaantonenko3287 Před 5 lety +3

    Thank you so much!) Great explanation))

  • @prajwal2005
    @prajwal2005 Před 4 lety +6

    Thank you! Just what I was searching for 🤸

  • @rprantoine
    @rprantoine Před 2 lety +2

    Great video! Thanks for it.
    I would change the colors on the slide about horizontal/vertical scaling though.
    They are the same as when comparing SQL and NoSQL, and could lead to confusion, letting people assume Horizontal Scaling = SQL and Vertical Scaling = NoSQL

  • @MrAt0g
    @MrAt0g Před 5 lety

    Good explanation. It's worth mentioning that retrieving the price of products within an order by a relation is not desirable - the product price can change, while the price in the of an existing order line item should not

  • @mysterria_com
    @mysterria_com Před 5 lety +5

    It's actually not about SQL vs NoSQL but relational vs non-relational. SQL databases come with a lot of constraint and behaviors (triggers) and if your data is highly relational, you will have an advantage using SQL databases maintaining your data structural integrity. On the other hand NoSQL databases are very restricted in relational integrity enforcement tools, but they are faster, easier to operate and learn and are very convenient for specific tasks.
    In general, use relational database if you're not sure which type of DB to go with. It might require some extra planning but won't lead you to data integrity issues and migration to NonSQL will be mush easier.
    At the point you face the need of sharding you will surely be well aware of what type of DB you need and how to shard your data well. So I'd not worry about scaling at this point.

    • @researchandbuild1751
      @researchandbuild1751 Před 4 lety +1

      NoSQL is just a serialized dictionary for lazy programmers that would rather write schema in code than come up with table structures and normalize them...

  • @JohnWeland
    @JohnWeland Před 5 lety +17

    We use an SQL database at work specifically PostgreSQL. Our "rules" for our schema all tables need a primary key as a sequence that is either called seq or id. If that tables p_key is not referenced in another table we call it seq if another table does use it, its called id so a user table would have a column id, then on the table referencing there would be a sequence and a column called user_id.
    All of out many to many tables we call tablename_xref (xref for cross-reference) so just looking at the database it makes a ton of sense. we also add control columns on every table prefixed with ctl we have an insert user, insert time, update user, update time the times are stored as dttm (time with timezone). any anytime a user inserts data or updates data its reflected in the control columns.

    • @mobassirshamim3947
      @mobassirshamim3947 Před 5 lety

      👍🏻

    • @tomazkoritnik4072
      @tomazkoritnik4072 Před 5 lety +3

      Namig them seq or id doesn't make any sense. First, you're using two names for the same thing: object identification. Second, when your table has seq and you have a need in the future to reference it, you need to change the code and schema. Third, goes together with first, you're mixing the concerns by putting higher structure information into entities and this is bad because it introduces coupling.

  • @markololic8967
    @markololic8967 Před rokem

    I've watched a handful of videos explaining this and this was by far the best, great video.

    • @whatsap6851
      @whatsap6851 Před rokem

      Helpline📲📥⬆️
      Questions can come in⬆️

  • @kstyik
    @kstyik Před 4 lety

    Great video, thank you. Another important point I think, is that if later in the future you might need to use your data for data analysis etc, the rigid structure of SQL might make it easier for the data to work with. At least from what I got from this video. Data can be very hard to clean.

  • @liquidpebbles
    @liquidpebbles Před 5 lety +6

    I tried to get into NoSQL and every time I did I basically ended up creating a system and imposing schemas and basically just making it a somewhat messy SQL style db.

  • @supalarry1009
    @supalarry1009 Před 4 lety +4

    wow, this was an amazing tutorial. Thank you very much sir!

  • @abdelrhmanshokr7546
    @abdelrhmanshokr7546 Před 2 lety

    I'm heading to a technical interview and your video really helped it made me more confident

  • @gjermundification
    @gjermundification Před 5 lety +1

    21:00 My personal preference is to combine the index of elasticsearch and postgres

  • @Nikolaik7777
    @Nikolaik7777 Před 4 lety +3

    In terms of RDBMS a "relation" actually means a table (because it stores rows of "related data" - that is structured records vs just a bunch of values). What he calls "relations" are properly called "foreign key constraints".

  • @Pukiub
    @Pukiub Před 3 lety +3

    thank you so much! this was very easy to understand and really well explained

  • @samislam2746
    @samislam2746 Před rokem

    13:00 you can save the user id in the user field of the orders collection, and when you query the orders collection, you populate the user field. this way the data does not get duplicated, it works just like a relation

  • @pinkdiscomosh2766
    @pinkdiscomosh2766 Před 4 lety

    This is an awesome break down between the two. I’ve always wondered what the big difference was between the two. Great video!

    • @academind
      @academind  Před 4 lety

      Thanks a lot for your great feedback!

  • @TheDragonlove1
    @TheDragonlove1 Před 5 lety +17

    Relations = Tables (Product Table)
    Relationship = Relationship (One to One)
    Relation != Relationship
    that's the db language as we learnt it from our teachers

    • @theopeterbroers819
      @theopeterbroers819 Před 4 lety

      This video disregards any and all relational theory.
      SQL is not the same language as Sequel.
      Both languages are interfaces to the database, not the thing itself.
      What do tables (correctly: relations) have to do with containers? Containers are like waste baskets.
      Tables are linked to each other through constraints, not "tables" through "relations".
      Rows or records are remnants from earlier database models, like Codasyl. We say tuples now.
      And I could only make it to 5:40.
      Better info here (I just googled this site):
      www.ntu.edu.sg/home/ehchua/programming/sql/Relational_Database_Design.html

  • @vinny142
    @vinny142 Před 5 lety +5

    "Which database is better? Which one should you use? "
    PostgreSQL. That has a JSONB type whic means you can store Json documents and query them, and it has all the required features of a database: transactions, replication etc.
    Plus it has a large number of free extensions that enable you to connect it to mysql or oracle or even an XML or CSV file as a data source.
    PostgreSQL exlipses the abilities of MySQL, really, and it's also free.

    • @bakatoroi
      @bakatoroi Před 5 lety

      What would you say are the major advantages of PostreSQL over MariaDB/MySQL? I'm just starting researching about them and just comparing their DATE fields makes me believe PostreSQL is much better but I'd love it if you could share more info.

    • @oida10000
      @oida10000 Před 5 lety +1

      @@bakatoroi postgresSQL supports recursive querys and nosql features.

    • @barronanderson382
      @barronanderson382 Před 5 lety +1

      PostgreSQL is a RDBMS and as such does not scale horizontal. If you require the performance of 10,000 concurrent servers you need a solution which scales horizontally. PostgreSQL is a nice RDBMS solution, I am not knocking it.

  • @enigma_mysterium
    @enigma_mysterium Před 4 lety +1

    Thanks a lot for the quick and informative overview.

  • @prodiptahalder5471
    @prodiptahalder5471 Před 4 lety

    This clarification was much needed. Thank you

  • @bartlomiej-bak
    @bartlomiej-bak Před 5 lety +45

    And one more comment about scaling.
    Horizontal scaling is possible in SQL world. Many servers offers 'replication', MS SQL Server offers also linked servers and so on. MySQL offers Clusters.
    So saying that in sql world only vertical scaling is possible is not 100% correct.
    Performance of the queries can be improved by indexes but also sql servers optimizes queries to be the most efficient.
    Also mysql offers few engines, eg. myisam with very limited functionality but very fast, and innodb which can be very strict and safe, but reduces performance.
    Additional question is which kind of database will require more hardware resources sooner, sql keeping just one entity of the data, or nosql storing same data multiple times ? ;)

    • @FrostSpike
      @FrostSpike Před 5 lety +5

      Massively Parallel Processing (MPP) databases too especially for OLAP/Data Warehousing use cases; Teradata, EMC/Greenplum, AWS RedShift, (the database formerly known as) Microsoft Parallel Data Warehouse, Exasol, and Oracle Exadata (at least to some extent with push down filter parallelism in the storage arrays).

    • @bartlomiej-bak
      @bartlomiej-bak Před 5 lety +2

      hehe, good answer, but I think we are talking about different level ;) You mentioned about very advanced solutions, which are very expensive as well. That video, imho, was more for beginners than for senior database architects :) but, you are 100% right, we can also mention about IBM DB2 which is/was, I don't know if that db is still maintain or not, object oriented database, RDBMS of course.

    • @hoaaahtube
      @hoaaahtube Před 5 lety +1

      I strongly agree with this. Horizontal scalling in SQL world is possible, and not too difficult to implement. This videos have said it, vertical scalling have limitations, so developer often use replication as a solution to boost performance. In some case horizontal scalling are cheaper than vertical scalling.

    • @BW022
      @BW022 Před 5 lety +1

      Horizontal scaling on a SQL database is also possible merely through switching databases or hardware. You can easily start off with housing it inside something like XML or dBase using ADO for a simply desktop or low-traffic web application. Then switch out the database to say MySQL. Then MS SQL Server. Then move it onto an 8 core monster with 64GB of RAM and RAID'd SSDs. All this before you need to look at clustering.

    • @johnmadsen37
      @johnmadsen37 Před 5 lety

      Bartłomiej Bąk yeah. I had just finished writing this guy is a fucking idiot.

  • @kbor8491
    @kbor8491 Před 5 lety +34

    It means "not only sql" (= noSql,)
    but not NO sql at all

  • @famalau1
    @famalau1 Před 2 lety

    Awesome explanation comparing the both technologies! Thanks a lot for sharing it!!

  • @simonsantama
    @simonsantama Před 3 lety

    Great video. Super clear, concise and useful. Well done!

  • @gregborbonus4122
    @gregborbonus4122 Před 3 lety +7

    Great video. I would add that with federated tables, json queries and so on, SQL is quite capable of doing everything you mentioned in a noSQL setup, but the cost is overhead. Ive never seen an instance where I couldn't horizontally scale an SQL database. Can you provide any examples of this?

  • @desertpillar5286
    @desertpillar5286 Před 4 lety +7

    Thanks for a great general comparison... I know this is old, but thought I'd mention one thing that I think is overlooked in this video although technically correct. Specifically regarding relations and schema consistency. While you are correct in saying that it is not directly supported in Mongo, this responsibility is instead handed over to the ORM layer. Typically, at least in Rails with Active Record, you add all the schema enforcements and relational requirements in that layer instead. By doing that you eliminate most of the downsides you mention regarding data consistency.
    One other key feature that I think should be mentioned too is that you can create much more advanced data structures in the documents themselves. This is a very simple example, but lets say you wanted to quickly wanted to know which users ordered a specific product. One way to solve that would be to have an array of user_ids on the product collection which essentially acts as a has_many relationship. When displaying products you could easily describe how many users bought this product and even show if friends of the user bought the product (provided you have a collection for that data too). Maybe a stupid example, but hopefully you get the idea.
    I would say that the biggest downside to using mongo is if you have a lot of requirements to run group by queries. Although it is possible in mongo with aggregations, it is not as straight forward.
    For me, unless I'm writing a banking application, I would select mongo for every web application I would build. :)

  • @alexandrei64
    @alexandrei64 Před 4 lety

    Thanks a lot for making this video! Really cleared up some things for me.

  • @stefersonpatake
    @stefersonpatake Před 5 lety +2

    Right on point! Thanks for the video, max!

    • @academind
      @academind  Před 5 lety

      Awesome to read that you like it Steferson, thank you for you support!

  • @shin202j
    @shin202j Před 5 lety +3

    like your clear pronunciation

  • @jeffersonribeiro1669
    @jeffersonribeiro1669 Před 5 lety +32

    Off topic: I did the Complete React Course from this amazing dude and its great!

    • @academind
      @academind  Před 5 lety +7

      Thank you for your support here and on Udemy Jefferson! It really makes me happy to read that you enjoyed the React course :)

    • @lardosian
      @lardosian Před 5 lety

      The burger builder course? I have to get around to that as well. The way packages change so much these days does this cause any issues. Im sure Max has this covered though.

    • @degraphe8824
      @degraphe8824 Před 3 lety

      That course started off my coding career and got me lots of jobs
      Thank you Academind!!!!!!!!

  • @viktorhabchak470
    @viktorhabchak470 Před 4 lety

    Love the way you explained the differences. Very helpful.

    • @academind
      @academind  Před 4 lety

      Happy to read that Viktor, thank you!

  • @yamigilgtz
    @yamigilgtz Před 4 lety

    Keep en mind there are appliances like: PDW, Exadata, Teradata that support horizontal scaling easily, also it is possible to scale in a smp db (cluster deployments)

  • @yasserbouanani2999
    @yasserbouanani2999 Před 4 lety +3

    thanks bro you're amazing teacher

  • @CaptainSuperX
    @CaptainSuperX Před 4 lety +57

    A very important difference that is not mentioned in this video is transaction.

    • @KeyhanHadjari
      @KeyhanHadjari Před 4 lety +3

      Mongo supports transactions from version 4.

    • @thabo5799
      @thabo5799 Před 4 lety +2

      @@KeyhanHadjari It does, but only for one object... still pretty bad.

    • @ritsukasa
      @ritsukasa Před 4 lety +6

      exactly, very important, omited completely.

    • @neilbradley100
      @neilbradley100 Před 4 lety

      @@thabo5799 MarkLogic has supported multi-document ACID transcations since version 1 (it is now at version 10), and this is indeed still very unusual in NoSQL databases

    • @arbdistress5592
      @arbdistress5592 Před 3 lety

      Yes
      To me single object transaction is simply no transaction.. it is just atomic document "save". Transaction is two or more changes they are either all done or nothing done.

  • @cruisniq
    @cruisniq Před 5 lety +2

    It really does depend on your line of work as to which type of database to use. In my line of work, 95% of the time you would use a no-SQL type such as Elasticsearch. But, as he mentioned, something like an order database, you would be better off using either SQL or an hybrid approach.

  • @fabiovandooren
    @fabiovandooren Před 3 lety

    Very clear explanation and visuals, thank you to point out the differences!

  • @MrDevianceh
    @MrDevianceh Před 5 lety +17

    Now do Graph databases like Neo4j or Multi-model databases like ArangoDB

  • @vionel3493
    @vionel3493 Před 5 lety +5

    Well people, just don't be confused with this incorrect description of SQL horizontal scaling possibilities, it explained here completely wrong. SQL scaling very good and not hard at all last several years, just use correct DB for your purpose.

    • @snnwstt
      @snnwstt Před 5 lety

      Indeed. And furthermore, the presenter forgot about VIEWS, in SQL, which can act like a collection (the data seems already merged, and it is quite fast since it is done through indexing) in addition to be eventually dynamic too (if a value change in a table implied by the view, refreshing the record will automatically update the view). I fail to see how a NoSQL approach can index your stuff. It looks to me like having to find "who" has the telephone number 123-4567 when all I have is a phone book on paper, where the phone numbers are listed in order of the owner (from A to Z). I would have to walk through all the entries, one by one?

    • @EqualConnectCoach
      @EqualConnectCoach Před 5 lety

      If u want add column in Deb then have to stop ur process then only can add but this doesn't applicable for nosql

    • @vionel3493
      @vionel3493 Před 5 lety +1

      This doesn't relate to what I said above about scaling.

  • @AlamKhan-yt9wd
    @AlamKhan-yt9wd Před 4 lety

    Thank you soooooooooooooooo much.
    Finally understand, it's not necessary to use MySql with PHP & MongoDB with NodeJS.
    Both the database has difference perspective depending on the scaling, reading/ writing, updating & relation factors.

  • @wcw07
    @wcw07 Před 3 lety

    Best video out there on this topic! Thanks a lot!

  • @mijmijrm
    @mijmijrm Před 5 lety +3

    how about comparison in terms of clarity, reliability, maintainability of code for the two types of db? (my gut says the flexibility of nosql implies more sophisticated/complex code implies reduced clarity, greater likelihood of bugs, etc .. but .. my gut is not a reliable source of info.)

    • @snnwstt
      @snnwstt Před 5 lety

      NoSQL sounds like a big unstructured Excel spreadsheet where anyone can dump anything into a new row, inserted anywhere.

  • @jonathanaina4940
    @jonathanaina4940 Před 5 lety +3

    Good video, but sounds like you are a pro NoSQL. However the disadvantages of SQL stated are not entirely true as scalable distributed framework becomes more developed. With the structure and reliability of MySQL and the high scalability of Hadoop and performance improvement offered by both worlds, what you get is a powerful Relational, very reliable, less messy database. NoSQL is great but I just hope the looseness doesn't over complicate an already complicated ecosystem. Some of the relatively poor designs of the Internet is still causing a lot of problem currently. Overall "All Models are wrong, but some are useful"

  • @dewinchy
    @dewinchy Před 4 lety +1

    Really thanks for sharing, now I finally understand the difference. Some hints: horizontal scaling for SQL is possible (at least for MySQL and Oracle), of course it's trickier than the vertical scaling. The use of the same colors for SQL/NoSQL and Horizontal/Vertical Scaling is a bit confusing.

    • @jamesduncanlinch6322
      @jamesduncanlinch6322 Před 2 lety

      Yes and more limited. For example oracle RAC depend on shared storage in some cases. Mongo is designed for clustering.

  • @julienwickramatunga7338

    Very nicely summarized, clear explanations as always!

  • @crengutar
    @crengutar Před 5 lety +3

    awsome explanation, thank you!

  • @i.maverick8053
    @i.maverick8053 Před 5 lety +10

    Simplified.. thanks

  • @waelchorfan9349
    @waelchorfan9349 Před 5 lety +2

    Thank you ,
    To make it short : if you want more data customization use sql , and if you will do an archive-ish data (read and write a lot with rare update )use no sql

    • @snnwstt
      @snnwstt Před 5 lety +1

      Well, even for archive, who forbid to use a different field name, or attribute key name and doing so, as example, miss the criminal records of a multi-recidivist because these records were archived under another field name? What good is such an "archive" ?

  • @prasannavenkatesh317
    @prasannavenkatesh317 Před 3 lety

    Its a great video.Well done. Absolutely liked the flow

  • @yaroslavkozatskyi9074
    @yaroslavkozatskyi9074 Před 5 lety +5

    Thanks for this explanation!

  • @RickoDeSea
    @RickoDeSea Před 4 lety +3

    I struggled to learn database until this tutorial. Thanks alot.

  • @krishnaswamychimakurthi7371

    Thanks for the high-level clear-cut boundaries explanations. It's an impressive explanation with an understandable accent.

  • @saagarsoni3
    @saagarsoni3 Před 4 lety

    Explaination is simply the best one.
    Keep it up brother.