Relational database index vs. NoSQL index

preview_player
Показать описание
How is indexing done in NoSQL databases? We talk about choosing good partition keys and appropriate sort keys to optimise query times.

The general idea is centred around denormalisation and global secondary indexes. Sort key is based on query access patterns and chosen to optimise their read times.

References:

Become a channel member!

You can follow me on:
Рекомендации по теме
Комментарии
Автор

Now you are looking like a prefect indian teacher bro❤

prabhatkumarkaushik
Автор

"its going to work out! Just hang in there and stay patient"

alexmercer
Автор

Screwed up an interview today, that last bit about interviews was all I needed to hear to get back on track.

akshayakumart
Автор

Another excellent, fun, and engaging lesson. Thank you again. I laughed several times and to enjoy the learning is a bonus.

paperguns
Автор

That's exactly what Java 8 has done with HashMap implementation which now converts the bucket into a Red Black Tree after reaching the threshold of 8 elements and converts it back to a linked list after reaching 6 elements with better performance.

raghvendramishra
Автор

Thanks a lot for the motivation at the end - "Hang in there and stay patient". Made my day. ( wrt to my current job hunting situation)

tridipchakraborty
Автор

Hi Gaurav - thanks for reviewing the hashmaps again in the context of quick memory retrieval; I've seen a lot of emphasis across places on coding a good hash function, but not making sure your keys are randomly uniformly-distributed!

harisridhar
Автор

Amazing video Gaurav! The part about augmenting it with a red-black tree was amazing! Really it gave me food for thought on other similar augmentations! Good Work man!

AkhileshPandey-bvni
Автор

Your videos are awesome as always! Hitting "like" specifically since I am a big fan of Pink Floyd! Great reference dude! I really admire the effort you put in for content creation and editing as well!

vjar
Автор

You can use a trie instead of a hashmap and red black tree combination. The value stored in the trie node can be a red black tree. In this way you need not blame the dev who selected the sorting key.

ohileshwaritagi
Автор

Great work Gaurav, Can you try to cover following design pattern topics (not able to find materials on internet like the way you explain):
- Chess
- Ludo
- Elevator design
- Playstore/App Store
- Parking Lot etc.

reallifegambits
Автор

He's right about hanging in there. I knew a lot of people in college who basically didn't know anything about software development. I mean, they didn't know what a pointer was and all the classes were in c++. They didn't know what a dot did in C++ or Java in " value".trim(). I asked how they were going to get a job and they said if they apply 100 places, someone will take them. Sure enough, they were right.

RisingDad
Автор

We can use BTree as well. That would be faster though. Indexing also internally uses that.

mayank.ranjan
Автор

Ah! Something similar i have been asked in GoldMan Sachs interview and i could come up with the same solution but i didn't know that java internally uses Self binary search tree.

So interviewer told me this at the end.

gomzysharma
Автор

Hey gaurav can you mention few resources to learn system design apart from your playlist. It would be really helpful and thanks

rakshithyadhav
Автор

OMG I've been asked the hashtable implementation question in one of my interview. If I've encountered this video earlier last week, I would have a better solution for that question :/

a-h
Автор

There is list of offers and it's criteria, which looks like this.
Each offer will have list of product ids, if a cart has all these products, then the corresponding discount would be applicable.
Now for a given cart, multiple offers may be applicable. In that case, offer which returns the max discount should be returned.
Example
Lets say the Cart contains these products [1, 2, 3, 5, 7, 6, 9]
List of offers are:
Offer 1- Product I'd [1, 3, 8] 10%
Offer 2 product ids [1, 2, 5, 9] 15%
Offer 3 product ids [2, 5, 6] 25%
Offer 4 product ids [1, 2, 3, 4] 30%

Output : 25%
For the cart, offer1 is not applicable as product I'd 8 is not there in the cart.
Offer2 is applicable as product I'd 1, 25, 9 all are available in the cart.
Offer3 is also applicable
Offer 4 is not applicable as product I'd 4 is not present in the cart.
Thus output would max discount from offer 2 and offer 3.
Which is 25%

Question is how should we store these offers so that we should get the offer amount with minimum time.
Assume this is for a big retail company, where the request comes in large number.

Can anyone please let me know the right data structures for this?

priyankasahoo
Автор

In a SQL database, s you can combined index of India, gender, city like so:

CREATE INDEX index_name
ON table_name(India, gender, city);

Then you have the index you will be looking for and your statemen is no longer true.

MO-hqiz
Автор

Please enable CC button for auto-generated subtitle so that I can understand more.

박종선-vi
Автор

Hi Gaurav, if you are taking request for new topics, it will be very helpful to cover Concurrency issues. Also Reddit System Design!

ameetmonty