MongoDB extracting values from BasicDBObject (Java)

There’s no way to chain a property name like you’re doing using the Java driver (gets for sure, and according to the this, put isn’t supposed to work either). You’ll need to get the objects one at a time like you suggested. ((DBObject)obj.get(“response”)).get(“resData”) See here for a potential future feature that would allow your syntax … Read more

Unique IDs with mongodb

As long as you can guarantee uniqueness, you’re not constrained to using the default “_id” MongoDB supplies. Therefore, it’s down to you how you generate this number. If you’d like to store this number inside MongoDB, then you could store it in a separate collection and increment it for every new URL required. Incrementing a … Read more

Best Model for Representing Many to Many relationships with attributes in MongoDB

In many ways meteor’s API encourages flat relational documents, however MongoDB is a non-relational data store. This conflict is, unfortunately, left as an exercise for the developer to solve. The notion of schema structure and joins is an enormous topic to cover within a single answer, so I will attempt to be as succinct as … Read more