Hash map in MongoDb

Viewed 146

I'm a tad confused. I've been learning about data structures recently, and am aware that a hash map will allow for a best-case search of O(1) and worst-case will almost never be O(log n).

My most recent project happens to be dealing with MongoDb and Javascript, which is what got me thinking about how it's implemented in that world, and where I need some clarification:

Does Mongo itself implement a hash map through its use of key-value pairs, or do I need to make use of a hashed index see here (might be the same as hash map I but need to be sure) or is there something else i'm missing entirely? Various google searches have returned nothing concrete on the topic of Javascipt and hash maps. I can't even get answers as to whether Mongo uses a hash map internally for storage. If this is true for Mongo, does it apply to all noSql databases?

I understand hash map articles and videos seem to be more common in Java and C#, hence why i'm wondering if the differing architecture to Javascript and therefore Mongo, means it's handled internally by Mongo. Is the generated _id a pointer to the memory address?

0 Answers
Related