MongoDB is a scalable, high-performance, open source, document-oriented database. It supports a large number of languages and application development platforms.

learn more… | top users | synonyms

2
votes
0answers
41 views

Python app-level document/record locking (eg. for MongoDB)

Introduction MongoDB does not provide means to lock a document (like SELECT FOR UPDATE in RDBMS). There is recommended approach to Isolate Sequence of Operations, which is sometimes called ...
1
vote
0answers
138 views

Recursive JSON walk in Python

I wrote this JSON walker to help with moving objects around while updating Legacy JSONs to match a new schema. Please let me know how I could further optimize it, or more importantly, make it easier ...
1
vote
0answers
149 views

Handling multiple Mongodb connections in Node.js (using Mongolia)

I have a situation where I have multiple objects that each needs to connect to a different mongodb uri. I am currently testing this using mongolia but the concept should be the same if I were to use ...
0
votes
0answers
55 views

Cross collection efficiency

I've got a bit of code that I feel code be improved and I'm just throwing it out there for others to browse. Background I have two collections, Blocks and Items. Blocks can contain any number of ...
2
votes
0answers
236 views

Test mongoose model

I have mongoose model: var mongoose = require('mongoose'), Schema = mongoose.Schema, Imager = require('imager'), env = process.env.NODE_ENV || 'development', config = ...
0
votes
0answers
157 views

Error-handling in Mongoose / ExpressJS

I have this ExpressJS route for saving and listing Category model. exports.save = function(req, res, next){ //validate here>>> var name = req.body.name; var description = ...
1
vote
0answers
336 views

Is there a better way to convert a MongoDB BsonDocument to XML using C#?

Leaving aside the slightly dubious nature of the request (it's a feature I have to honour, regardless of whether I agree with it, and I'll never be reversing the conversion process), I have devised ...
1
vote
1answer
102 views

Python flask web app, simplification

I am writing web application using flask framework + mongodb. I have an issue, should I use classes for my mongo entities or just use dictionaries for them. class School: def __init__(self, num, ...
6
votes
2answers
340 views

learning java is this code correct

I am new to java programming and to help me learn I created a simple telephone address book. the code runs as expected but I would be interested to here from more advanced programmers if they think I ...
2
votes
1answer
62 views

Can this MongoDB query be optimized further?

Most of my slow queries on my server are due to a single "find" query. I have a collection that represents website pages. I want to be able to look up a page in the collection by URL. The caveat is ...
1
vote
1answer
77 views

SQL vs MongoDB (TCG collection managment) [closed]

I'm designing a web application to help some friends and I manage our card collection. A relational database makes sense to me, so that was my first instinct. The basic schema would like something ...
2
votes
2answers
90 views

Using Types to Designing Domain

I am trying to model a domain of metrics for use in a BI application. I recently read the Designing with Types series, and felt that it could be useful, so I wanted to give it a try. What I'm not ...
1
vote
0answers
59 views

Python MongoDB Schema feedback

I would dearly love some feedback on the model below. Its a basic commenting structure where Users can comment on a variety of objects in the model. I have denormalised to make querying simpler, but ...