True. If you are developing a system for social media, then yes, MongoDB may be a good choice. But for a different industry, say banking, financial services, PostgreSQL may be a better choice because of the consistency and data integrity it offers. Even if the price we pay is performance. Also, MongoDB is an excellent choice if you design your system as 'microservices'. Here, no need to be ACID-compliant.
@stenerikbjorling
6 жыл бұрын
One problem with the comparison - you can use document database approaches also in Postgres - the likes can in Postgres be stored in a "document" field using JSON B - indexing etc. is supported. Maybe you should re-do the tests?
@TheLeo328
6 жыл бұрын
Agree. I noticed that this is a slightly inconsistent way of comparing the two as the methodology is not the same for both.
@LorenzStadler
6 жыл бұрын
Hey Sten-Erik. Yes, that would be interesting to compare these.
@VivekSingh06
6 жыл бұрын
Postgres support Hstore datatype too.
@mohammadalhashash7750
6 жыл бұрын
Also, the "like" relationship could be implemented using Array (Like Django's "Array Many To Many" field type) which can be still indexed using GIN.
@matheus-kirchesch
2 жыл бұрын
Another problem with the comparison - you can have 3 collections for mongo replicating the same schema, users / posts / likes, that would be a better way to compare performances
@Higoki1
6 жыл бұрын
Very clear methodical and concise as well. This is one of the best comparisons of two technologies have seen. Well done.
@enteundbaum
4 жыл бұрын
Very informative, but I'll return to this voice the next time I have problems sleeping :|
@jamesmurphy8676
5 жыл бұрын
A huge positive on Mongos part is the syntax/language is Javascript. Makes integrating with nodejs an absolute dream. Having to work with Knex/Postgres and Nodejs is painful compared to just Nodejs/Mongo and the mongodb driver.
@Elite7555
5 жыл бұрын
The node.js mongodb driver is just a wrapper over the mongoc-driver like most other drivers as well. There is nothing special about it. And agreed: Using an ORM can be painful for complex queries. That is what SQL is for. Furthermore mongo queries can be a pain as well.
@datoubi
3 жыл бұрын
I like sql more because I think having a language instead of findByIDAndThenDoThisAndThat is simply nicer
@esra_erimez
4 жыл бұрын
Postgres has both. You can do relational and documents in Postgres. Postgres support a JSON type.
@baumstamp5989
2 жыл бұрын
this!
@YoloMonstaaa
3 жыл бұрын
Sorting 10k documents by date shouldn't take anywhere near a second and somehow took mongodb that long. And why does the "view latest post" query take longer than "view latest posts with likes"? The second one is clearly more work but is significantly faster (almost 2x) for some reason. That makes no sense. I'd love to the queries they used. This benchmark shouldn't be taken seriously.
@israel5450
Жыл бұрын
Very good video, detailed breakdown of all involving pros and cons
@mokshchadha9151
4 жыл бұрын
very clear from the tutorial that you are a star wars fan MAY THE FORCE BE WITH YOU, ALWAYS.
@onehtw1974
3 жыл бұрын
Sooo, you are in essence a rockstar on cocaine. You made one great video! aaaand are gone :P It was awesome to see use case based comparison with benchmarks. Appreciate it, this increased my understanding by lots! Would love to see more such contents. Perhaps even PGSQL vs MSSQL. And yes, as others have pointed out, the audio needs to be filtered with bass reduction to make the voice clear. Cheers mate!
@ericxiaoxiaoliu2173
6 жыл бұрын
Very technically deep elaboration and vivid use case! Like it!
@robertklemme1372
5 жыл бұрын
No, it is actually quite shallow. For example: concluding from outcome of one test that MongoDB is faster with joins is complete nonsense - especially since they did not bother to create indexes beyond PKs.
@mitchel3392
4 жыл бұрын
0:10 Devs 'coding' when the boss comes in (dude in Black jacket)
@shaahin6818
6 жыл бұрын
That fake typing tho
@LorenzStadler
6 жыл бұрын
Yeah, not the best audio effect. 😄
@andreasv9472
4 жыл бұрын
Is Luke in SW E III? Either way. great tutorial, I finally get NoSQL vs SQL - awesome! How did your revolutionized social network go?
@abdulhannan1889
5 жыл бұрын
Great vid guys, I am just exploring the NO SQL after spending much of the time working on MS SQL it seems pretty interesting. Seems Like I must add MongoDB to my skill set if I am aiming to build web apps using ReactJS and other modern JS Frameworks
@ajsim
5 жыл бұрын
Much informative. Very learning. Thank you!
@aknaiotto
4 жыл бұрын
MongoDB does not rock in joining, it avoids it!!! Personally I think that the data in a database is as good as it is reliable and in document-oriented databases you cannot guarantee that or at least it is very difficult and error prone. Also if you create a new page in your application and the data you need is not easily available from one of the collections you already have you can do two things: 1. Create another collection to represent that data. So you spend time to regroup the data you have for the new collection. 2. You create a complex query that might not even be possible in a document-oriented database Also when you hit something like GDPR, good luck in finding all the references to personal data in a large document-oriented database, you might have a comments collection for example that has name and surname stored (so you don't have to query multiple collection, to avoid joins basically) and you might not remember that. To do this in a relational database is much simpler. For new page in your application, you simply query the data differently The data in the database is not replicated in multiple places so it is easy to find that name and surname are in the Users table rather than in multiple places to find
@felipelpr
4 жыл бұрын
Good video, but could you clarify what you meant by “inconsistent data” in MongoDB?
@sndarkable
4 жыл бұрын
NoSQL store data without a schema so it's consistent by nature of the NoSQL
@arvi8843
4 жыл бұрын
@@sndarkable I'm using Mongoose ODM to still have schema in MongoDB. 💯
@sndarkable
4 жыл бұрын
Arvi yes this is why I use SQL I don’t want to reinvent the wheel with mongoose
@anhquocnguyen1578
2 жыл бұрын
amazing comparison. thank you
@rajsaraogi
4 жыл бұрын
You should have added use case with transactions, that would have been a defining factor
@mohamedkhodary7831
6 жыл бұрын
clear and simple , thank you
@EzequielRegaldo
Жыл бұрын
Dont forget new features like Clustered Collections
@komputer_korsan2222
2 жыл бұрын
thank you for the best video
@vinothshepard7451
4 жыл бұрын
can you please do a benchmark for username and password storage for openLDP, mongodb, postgresql and other databases
@bakiryunusov9545
5 жыл бұрын
Very clear and simple explanation! Thanks a lot.
@xybersurfer
2 жыл бұрын
performance wouldn't be my initial criteria (premature optimization). this sounds eerily familiar. have you read the story "Why You Should Never Use MongoDB" by Sarah Mei? maybe you should start by creating a proper data model. also, you can't predict whether you will get future requirements, that make your data relational. your performance comparisons are vague, by not showing the numbers and only showing the winner
@BestVineCompilation-nr8px
6 жыл бұрын
Which would be best for storing stock or crypto trading data (candle highs and lows) for back-tests with trading algorithms?
@LorenzStadler
6 жыл бұрын
Hey! This really depends on the application you have in mind. There are also specialized database systems that are optimized for time-series data. Maybe that could be something you are looking for depending on the amount of data that you want to analyze. Check out www.timescale.com/ for example.
@BestVineCompilation-nr8px
6 жыл бұрын
went with postgresql cuz free :D
@clintoncalhoun9838
5 жыл бұрын
you could use Redis (redis server) db. as that's what we used in mining farms for digital currencies.
@FredoCorleone
Жыл бұрын
You should retry with 10-100M documents. I'm sure MongoDB can do it, not sure about the rest
@brownsugar2549
2 жыл бұрын
You could create a Index in Mongodb to make it faster !
@eniodefarias
4 жыл бұрын
o postgres tá lento pra caramba. já fiz todos os tutoriais de tunning pra melhorar a velocidade e continua lento. pra comparar: uma tabela com 60 milhos de linhas e 7 colunas, um select que resulta em 10 linhas leva dois minutos. se eu fizer a mesma pesquisa usando grep em um csv retorna o resultado em 40 segundos. alguém tem alguma sugestão de melhorias e ajustes para o postgres?
@srinivasreddydanda1777
4 жыл бұрын
Good and clear explanation with a practical example.
@CommonOnFire
6 жыл бұрын
This is very useful. Thanks!
@donwald3436
6 жыл бұрын
IT'S WEB SCALE
@robertklemme1372
5 жыл бұрын
You forgot the exclamation marks. :-)
@thalibmuhammad9519
2 жыл бұрын
hold up, you just consider database based on performance, you totally ignored the consistency of relational database, (could save you lots of headache when changing schema, or prevent wrong insertion)
@nccamsc
3 жыл бұрын
That dude in black at the beginning of the video is totally faking it. At least he is touching the keyboard though. I once sat to a German IT contractor who did not even bother touching the keyboard all day long despite getting paid more than 100 UK pounds per hour.
@hackaholic01
Жыл бұрын
Guy in black jacket, no need to fake typing lol :)
@SurajKumar-vi3ll
4 жыл бұрын
Nicely explained with a real example.
@Felipedotcom
6 жыл бұрын
Thanks!!!, great video!
@reilwaystation9511
2 жыл бұрын
postgres all the way
@RU-qv3jl
2 жыл бұрын
So you think that NoSQL is new? So what existed before relational databases then? You do know that, for instance, graph databases predate relational databases right? You also decided to try and use a schema that favoured document storage to compare the two, there are many patterns to solve all of the performance issues that you “Identified” with Postgres, which would have lead to a hands down thrashing of MongoDB. Not to mention that MongoDB Inc. have for years now said that you should, in effect, normalise or denormalise your data for performance in MongoDB. They just call it something else to make a distinction between themselves and the relational world. You also do not have enforce relational integrity if you don’t want to, what happens to performance then? Oh, it might bear pointing out that Postgres has many ways to store the same data on disk, there are many extensions. To claim that Postgres stores data in tables is a massive oversimplification at best. Postgres represents your data as a table, but it might store KV pairs, column format storage, JSON, row format storage, compressed data, etc. I was looking for something to compare the two and learn a bit, not be mislead.
@ІринаМикитин-ж8з
5 жыл бұрын
A lack of pitching in the voice destroyed a great tut
@pankaj_9998
5 жыл бұрын
great explanation. very useful. thanks
@JulienMurray
3 жыл бұрын
lol. You Rock Guys!
@shaahin6818
6 жыл бұрын
Thanks for the video
@PierreLaBaguette
6 жыл бұрын
i wish your pronounciation / articulation / mic were better. otherwise thanks for the video, i learned a lot!
@sellingyolk
5 жыл бұрын
This video could use some proper subtitles. You guys have accents that are hard to understand on top of the audio quality changes, its just a bit frustrating.
@michaelkohlhaas4427
5 жыл бұрын
*Very bad decision. You'll regret it one day!!!*
@LorenzStadler
5 жыл бұрын
Hello Michael. What do you mean?
@mohammedalsiddeeq3327
5 жыл бұрын
Would you elaborate, please?
@AnimeshSinghweb
6 жыл бұрын
Its hard to understand what you are trying to say in the whole video. You may need to work on it.
Пікірлер: 71