Introduction to NoSQL databases
NoSQL is a popular database storage method. It keeps data as key-value pairs. The advantages and disadvantages of NoSQL compared with RDBMS (which uses SQL) are discussed here, using the Cassandra architecture as an example.
We talk about sharding, redundancy, load balancing, compaction and other features in NoSQL databases. This allows them to scale efficiently.
Looking to ace your next interview? Try this System Design video course! 🔥
interviewready.io
With video lectures, architecture diagrams, capacity planning, API contracts, and evaluation tests. It's a complete package.
References:
Sharding: • What is DATABASE SHARD...
Load Balancing: • What is LOAD BALANCING...
Efficient merge sort: • The FASTEST sorting al...
highscalability.com/blog
Cassandra Architecture: docs.datastax.com/en/cassandr...
Compaction: github.com/scylladb/scylla/wi...
Become a channel member!
/ @gkcs
0:00 Intro
1:08 NoSQL explanation and comparison
10:27 Cassandra Architecture
18:00 Quorum
21:30 Compaction of SST tables
You can follow me on:
LinkedIn: / gaurav-sen-56b6a941
Twitter: / gkcs_
#NoSQL #Database #Cassandra
Great Teaching Skills. As a 63 year old, I found learning from a youngster, really cool!
Thank you!
I m 44 but wanted to say the same.Now no need.
i m 30+ and fan of them too
You're 64 and still leaning. I got to learn from you. Take care, stay safe.
Me too; learning at 55:-) from GKCS
Gaurav, you have tremendous ability to articulate modern day computer science concepts. Its great to see someone so young having this charisma and tech flair which is a rare combo. I have been in software for 20 years and sadly i was never taught like this or then around early 2000's there were no youtube channels like yours. You are redefining online learning with your videos. Keep it up mate.
Thank you Suraj!
Great Video! A small point to add, Most of the NoSQL offerings also offer, Consistency levels for users to choose. So, If I want to make sure my users read always consistent data I can have strong consistency which means a write is acknowledged only when a quorum of replicas have also acknowledged it. This makes sure, consistency is present even when one of the replicas go down. But obviously the tradeoff is the writes are slow. If availability is preferred over consistency, then Eventual consistency can be choosen in which the writes are acknowledged when the present replica writes it in memory, hoping that all other replicas catch up with the write "eventually" .
Agree! This is what allows us to aggregate and read fast on NoSQL. I made a mistake in the video by stating that reads are slow. Reads are in fact faster in NoSQL than standard RDBMS as long as consistency requirements are relaxed.
a great summary of cap ❤️✔️
Writes are fast in Cassandra if replication factor is local_One. Although if you change it to quorum then obviously it adds to the throughput of the transaction. It’s all about the system requirement at the end of the day. 😃
@@gkcs Has anything changed with MongoDB 4.2, are the writes any faster considering we get to keep our consistency? Also, We know that NoSQLs go for Availability over Consistency but with MongoDB 4.2, you can guarantee the consistency and also I get to keep my availability by scaling across many shards. MongoDB 4.2 (FULLY ACID kzhead.info/sun/nNmjZKygbHeHqac/bejne.html) They claim that they're "the only database to fully combine the ACID guarantees of traditional relational databases with the speed, flexibility, and power of the document model, and an intelligent distributed systems design to scale-out and place data where you need it." (www.mongodb.com/collateral/mongodb-multi-document-acid-transactions) Which also puts me to a question that why should I use RDBMS over MongoDB when with horizontal scaling I will have a hard time but with MongoDB 4.2 it's built-in with all it brings. Does MongoDB > RDBMS in 2020 after the 4.2?
@@ananyasharma1201 "why should I use RDBMS over MongoDB " -> because MongoDB is buggy as fuck. It's not reliable.
It is a difficult skill to be able to understand/comprehend the lower layers of a given technology AND also be able to present it in a clear, concise manner that many can grasp. You have this skill and are able to present the data in a way that is simple with stacks that are complex. This is why being an "instructor" or "presenter" requires skills beyond just knowing the technology really well. Anyway, I appreciate the videos as its a wealth of valuable information!
Thank you!
the great thing in your video is that you give practical examples. THANK YOU. I will continue watching your videos.
Truly amazing video. So perfectly described NoSql and RDBMS. Thank you so much.
Greetings from Munich, Germany. Great video Gaurav. It needs a lot of preparation behind such great content. Kudos man!
Great video as always :D, Just one correction , data is kept in self sorted structures like (AVL/ Red-Black Trees) in memory, and once the memory is past some threshold value (say ~50kb), then the entire memtable(the self sorted trees) are dumped into a SSTable (on disk) which is efficient as the data is already sorted.
In Cassandra, “strong consistency” is typically expressed as W + R > RF, where W is the write consistency level, R is the read consistency level, and RF is the replication factor.
Great video Gaurav. You have simplified it so much. I have one doubt though... At 6.20 when you are mentioning the 4th point, you say NoSQL are good for metrics/analysis, etc. because it easier to perform operations like average age, total salary, etc. At 7.30 you are saying these are not read optimized because data will have to be read from each blob of data and then perform some operation like sum or average. I am confused about this part.
Was just randomly browsing to know about NOSQL and I must say i couldn't move forward without watching full video and I feel confident with the concept. Thank you Gaurav
Every time I am preparing for Interview, I will revise all the topics by watching your videos. Thanks for the awesome content.
This is the first video of yours that I saw but amazing way of explaining bro. This video is great for someone like me who had absolutely zero idea about NoSQL Databases since I have always worked with Relational Databases only. Subscribed!
This is by far the best explanation for SQL vs No SQL DBs. Kudos.
When a Non DB guy can understand this.... there is nothing else as better ! Thanks a Ton for you Videos. Your Videos are one of the things that helped me through 2020 Lockdown.
Truth has been spoken at 9:26 "inner join,outer join,left join the things that we didn't read in college"
very true bro...after working in a job only we start to get to understand the real use of join and group by😜
College mai toh kuch bhi nhi batate hume khud hi krna padta h..😅😅😅 gfg h na
this is the first IT explanation video made by Indian guy, that I enjoyed watching
I hope you find many more in future 😁
Maybe start looking at people as the person instead of viewing them in terms of race, nationality, gender. etc.
if your are in java u should watch tutorial from java brains .. ur perception will change.
Amazing video. Can't wait for the quorum and consensus video. Thank you for sharing your knowledge.
wow, I am understanding now many things which I had already worked on and faced the technical issues and never used to get the "why" part from my architect's talks. Thank you Gaurav.
Then you were never an actual architect. Most people think they are architects, it takes time... Unless you got 20 years in multiple industries, companies, environments you can't be truly an architect. Working in MS, JAVA, WEB, Service, Networking, Infrastructure, CICD, UX, Security from every possible way I think I have a better understanding. This video is your novices or juniors not architects
@@paulkersey2424 I'm not.. I was a developer. I mean to say.. my project's architect - my boss. 😳
This boy is really good.Great content
In a strange way, I watched this Video like a proud father lol You are amazing and it shows how much you care to explain rather than show off.
Thanks Ramzi!
Very crisp, clear and simple explanation Gaurav Sen ...Thanks a lot...
Guarav, thank you for the awesome videos. I am applying for entry-level software engineering jobs and this is helping me a lot for companies which test system design skill of their candidates.
Great to hear that 😁
Hey this is great refresher. Not only is it well explained but you make it entertaining :) Keep it up!
Bro! I just found your channel, new sub! This was funny and very informative. You're a rare gem!
About Cassandra, you are explaining the concept of Consistency Hashing, is used in Cassandra but also in many other systems!
Another awesome video. I've been using mongodb successfully for 6+ years but never got into the weeds about how it compared to MySQL.
The cute double role in the beginning gets me in his videos!
7:35 - usually most NoSQL databases have secondary indexes that make that kind of querying faster. Great video, thanks
Thanks dude for explaining Cassandra in such a simple manner.. kudos
THANK YOU SO MUCH!! Read my reading assignment for my NoSQL class and understood most of the things but needed to see all these new concepts in action! Thank you for providing an excellent run through and example! LIKED AND SUBSCRIBED!!!
Glad to hear that!
Sir, you are truly a great teacher. Thanks for sharing your knowledge so wisely.
Thank you!
21:50 Two corrections 1) Cassandra do not store log file in-memory. Rather it stores on disk. That's how it can recover from during failures 2) Cassandra do not append in-memory it rather appends to commit log on disk. So, in-memory the data is sorted Memtable. When it reaches certain limit then it flushes to the disk on SSTable
You've made System design a real fun concept to read about! Thanks a lot
Thanks Pallavi!
Great video. Very informative and well organized! I'd like to update that RavenDB is a noSQL database that offers ACID certification for transactions.
Great video as always! Really enjoyed the bit where you talk about major applications using RDBMS (the intro). Thank you for this - I learnt a lot!
Thank you 😁
Just to put an example, Royal Bank of Scotland uses MongoDB, a No-SQL database. So both SQL and No-SQL are in present day screnario, equally lucrative
Wow. The first intuitive video tutorial on NoSQL ... Finally
Great video , it’s like going back to college after 14 years in the industry .. Thanks and keep it up
Thats the first introduction that was acctualy an introduction. Great Video.
Superb teaching! Very intuitive, practical and actionable. I'm glad I found this channel & everyone who finds this is lucky. I wish our high school or college teachers would be this adept at teaching. Kudos!
How I look RDBMS and NoSQL databases are used based on the requirements or use cases. So, while designing any application we need to understand them first which @GS has done very well. I love your presentation skills @GS and I won't mind mentioning the same in your videos. Keep it up👍
"Why don't we become optimists as engineers?" 🤣🤣 Yea right I wish. Thanks for the upload !
Hahaha 😛
Very Good explanations and correlations . Thank you very much for the knowledge shared !
Great video, Gaurav! I wanted to add a point. In the video you mentioned a disadvantage that Joins are hard in NoSQL. When you're dealing with extremely large data-sets, you probably would want to avoid joins. If you -use a NoSQL database in a relational manner, i think its probably not worth it. In that case, you're better off using an RDBMS..
Great little bro..you looks so young but good skill on explanation..
Thanks!
Hey, Gaurav. I appreciate all of the work you put into this series. I had no prior knowledge of system design, but after watching these videos in 3 days, I was able to pass the system design round at a reputable company. I can't thank you enough for this.
That's amazing, congratulations!
One of the best explanation for nosql over youtube...so far... Keep up the good work
Thanks!
Hi Gaurav, Thanks for this great video and all other videos. I'm extremely benefiting by your videos. Basically, I'm a Mechanical Engineering graduate, with zero CS/dev background but currently work as a Technical Writer with one of top technology Giant in the world. I want to transition to product management and one of areas I lack is technical design. Yours videos are helping me in those aspects. Kudos your great effort. Appreciate every bit of it.
Thanks Karthik!
Thank you Gaurav. A very impressive educational video! Keep up the great work!
dude this format is awesome i just love your channel man may you get all success in life
Thank you!
Nice. You could add below - 1. NoSql might have a upper limit on amount of data you can store. 2. If you have to write to multiple tables/rows at the same time and do like a group commit, this might get limited in noSql.
The way you represent your knowledge is just amazing. Many people on youtube have good knowledge but don't know how to represent their knowledge to others and explain them. Your way of explaining is just fabulous. Enjoying system design series as a Netflix series. haha.
Haha 😁
I am wondering how much time it took you to grasp this much knowledge. Recently followed your channel and it feels like I found a treasure of knowledge. I love to learn and this is a delight.
Thank you!
the editing in the first 2 mins was on point!
Lucid explanation. Thank you!
vow are your videos always so fun.Dont know how I got to know this channel to late
You guys rock! I loved the way you have explained things here.....AND, humor always helps :)
Thank you!
Hey Gaurav, Great video and kudos to your teaching skills. As always very easy to understand 😊
Introduction is hilarious, so cool 🤣🤣🤣 The video is elaborate and educative, thank you! 🤩
You seems so knowledgeable and professional ❤️
Hey Gaurav, I love your videos on dB. Have you started covering the content on cloud databases, and how it changes the architecture per se when it the same architectures is hosted in the public cloud environments? Cosmos dB for that matter with gro-redundant scalable architectures ?
Awesome! Thank you for the content!
Omg! First vid I watched from your channel and I’m like I’m gotta subscribe:)
Great Job bro! your videos are both fun and informative.
Thank you so much for the explanation. I really envy your knowledge. May I know how long you have been programming
The plot of this video is dope 🔥🔥🔥
Damn!! why does liking something complex gives me a vicarious feel of being intelligent?
You are doing a super work in a super excellent way.Best wishes.
Yaar itna kaha se pata chal gya tum logo ko :-D Great knowledge & presentation 👍
Very Precise, Keep it up Gaurav. Excellent Job!
the beginning was some ninja editing skills..!! the video as always very informative.. Thank you..!
Thank you!
Gaurav....you are just awesome. What a great skill you have. Thank you.
Love your videos dude! Just watched about 8 of them and I now use them in the gym because you can pretty much follow along just listening to you :-) Quick Tip: Set your camera to manual focus and increase the aperture (will keep everything in focus) a little as your camera 'hunt's for focus and is a bit distracting on the eye. Love the quality your producing so please keep them coming!
Thanks! I'll make sure to apply these tips 😁
You're really awesome gaurav... Really appreciate taking your time to teach these concepts... Hoping for more eye opening contents!!
Thanks 😁
Great content. Nice work. Thanks for the video.
This video is so dope. Thank you!
@gaurav Man u r getting better at this thanks for sharing this video , I would really love if u can make a video specifically on consensus using some live examples
Sure 😁
Excellent presentation on NoSQL DBs.
You're a great teacher! Thanks so much for these resources.
Thanks man! I was asked sharding and sql vs no sql in my interview and was able to answer them perfectly and crack the interview as well. Thanyou Again.
Yey, congratulations 😁
@@gkcs keep making such videos to help students like us! Thankyou!
Superb! Very clearly explained...and the beginning was hilarious😃
Excellent presentation, thank you
Awesome explanations !!! Thank yoy
Saturday morning breakfast while watching your video 😁
Super clear, thank you so much.
Very compact and informative, thanks
thank you. i finally understand 'schema'. i'm only 4:44 in, paused the video to post this.
Really good work man... Thank you so much.
omg bhai..u jus like my frnd who teaches me one day b4 exam and i get salvation enlightened whole universe gets cleared which i try to understand and learn whole 6 months with teachers faculty staff and didn't understand :)
Great Job Gaurav! Your example is one of the best and very easy to understand. Keep up the good work! Hope to see more tutorials like this
Thanks!
11 seconds passed and I gave a like to the video. Great job!
😁
Tomorrow is my Big data and data analytics exam and You uploaded this...........what a coincidence!
Yey!
kaisa hua exam XD
Great teacher I ever saw. I was really confused about the system design concept but after watching your videos it is very clear. Really thanks for such amazing content. Keep doing good work.
Thank you!
Thank you Gaurav. Very good content As usual youu are amazing☺
The intro was extra fun😀 and educative I LOVE IT❤😂
nice explanation. now a days very few teachers teaches on the board which is easy to grab a concept at 1st pace
I feel like watching a movie...Your videos are entertainment+enjoyment+knowledgeable uniqueness awesomeness
The term "relation" in RDBMSs does not refer to the referential integrity achieved with foreign keys, but to the structure we more commonly refer to as "table" - a set of rows / tuples.