mongodb

do any source-control systems use a document database for storage?

One of those questions that's difficult to google. We were running into issues the other day with speed of our svn repository. The standard solution to this seems to be "more RAM! more CPU!" etc. Which got me to wondering, are there any source-control systems that use a document/nosql database (mongodb, couchdb etc) for database? It se...

How to find value in a mongoDB collection, independently from the field name?

Assuming a collection like this: People { "name": "John Doe", "email": "John Doe <[email protected]>", "stuff": "foo" "morestuff": "bar" }, { "name": "Homer Simpson", "email": "Homer Simpson <[email protected]>", "stuff": "bar" "morestuff": "foo" }, { "name": "Bart Simpson", "email": "Bart Simpson <bart...

MongoDB backup plan

I want to switch from MySQL to MongoDB but great data losses (more than 1 hour) are not acceptable for me. I need to have 3 backup plans: Hourly backup plan. Data is flushed to disk every X minutes and if something wrong with the server I shall be sure that after reboot it will have all data at least for an hour ago. Can I configure i...

Mongo DB Design, embedding vs relationships

I'm building a simple accounting system where a user has many bills. Now I'm trying to decide if bills should be its own collection, or nested within the user. I'm leaning towards the former but I've NEVER done any noSQL stuff so I'm just going by trial and error and what I think makes sense to me. I understand that Mongo has a 4mb ...

money representation in mongoid

How should I work with Money with MongoID? Should I configure it as BigDecimal? And at rails level? For ActiveRecord we have something called Money, but AFAIK it just supports AR ...

pymongo: a more efficient update

I am trying to push some big files (around 4 million records) into a mongo instance. What I am basically trying to achieve is to update the existent data with the one from the files. The algorithm would look something like: rowHeaders = ('orderId', 'manufacturer', 'itemWeight') for row in dataFile: row = row.strip('\n').split('\t') ...

Besides "pebongo" is there another MongoDB component for FreePascal?

I'm aware of pebongo. It looks like a splendid effort. My issue with it is that it's in a very early stage and the only thing I can see the guy implemented was the BSON I/O lib. MongoDB over the wire is still in progress, according to the info of the project. I haven't tried it myself, but I need a bit more than this. ...

On MongoDB, how do I filter out documents where a field with an array of strings includes a certain string?

For example, I can have documents like: doc1 = { title: "First blog post", tags: ["family", "sensitive", "private"] } doc2 = { title: "Second blog post", tags: ["travel", "photos"] } And I would like to list all posts that don't contain the "private" tag (in the se above, that would return only doc2). I've tried doing this: ...

general questions about using mongodb

Hello, I'm thinking about trying MongoDB to use for storing our stats but have some general questions about whether I'm understanding it correctly before I actually start learning it. I understand the concept of using documents, what I'm not too clear about is how much data can be stored inside each document. The following diagram expl...

How MongoDB manage secondary indexes scans?

By default MongoDB creates index on _id key in document. But when I ensure additional index (secondary like in InnoDB from MySQL?) and query it after, engine scans it and then selective scan _id index to get documments offsets? I'm confused because when sharding comes it I'm right every chunk have own indexes and there will be many rand...

In MongoDB how do you use $set to update a nested value?

In MongoDB how do you use $set to update a nested value? ...

mongodb php - how to do "INNER JOIN"-like query

I'm using the Mongo PHP extension. My data looks like: users { "_id": "4ca30369fd0e910ecc000006", "login": "user11", "pass": "example_pass", "date": "2010-09-29" }, { "_id": "4ca30373fd0e910ecc000007", "login": "user22", "pass": "example_pass", "date": "2010-09-29" } news { "_id": "4ca305c2fd0e910ecc000003", "name"...

ASP.NET with NoSQL

Had gone through some NoSQL concepts and MongoDB & CouchDB articles. It seems they will give more scope to build scalable web applications. But need some clarity whether they will support the following features as SQL Server does? Whether it supports database mirroring? Is there any size limitation of NoSQL database? Is it better to ig...

Does any RDBMS do auto scaling, sharding, re-balancing?

I think one of the advantages of no-sql such as MongoDB is that it can scale horizontally automatically: just add a cheap machine and the data can "spread over" to the new machine. How about for RDBMS, does any RDBMS do that automatically too? ...

MongoDB map/reduce over multiple collections?

First, the background. I used to have a collection logs and used map/reduce to generate various reports. Most of these reports were based on data from within a single day, so I always had a condition d: SOME_DATE. When the logs collection grew extremely big, inserting became extremely slow (slower than the app we were monitoring was gene...

Making a Twitter-like timeline with MongoDB

What I need: Suppose you're using MongoDB and you have a collection called users, and each user has a "following" array with user _ids of the people he's following. Then you have another collection statuses, with each status containing the _id of its author. How do you display to a certain user all the statuses added by people he's foll...

Search engine for web app - multi lingual and multibase

I am working on a website project. We have a MySql and a MongoDb base. We want to add a full-text search-engine over these bases (and if it can be linked with PostgreSql it's better). These databases contain multilingual texts but we cannot determine the language. I saw Solr, ElasticSearch and Sphinx, but what is your advice on this ...

hot plug a node w/ MongoDB

We are evaluating MongoDB with my team and I have a couple questions that I'm sure are answered somewhere on the web but I couldn't find the answers... 1) Can we hot plug a data node in the MongoDB cluster? If we can how difficult is it? 2) It seems like MongoDB works from the HDD, but does it have a caching strategy to avoid hitting t...

PyMongo: group with 2d geospatial index in conditions returns an error

The error returned is: exception: manual matcher config not allowed Here's my code: cond = {'id': id, 'date': {'$gte': start_date}, 'date': {'$lte': end_date}, 'location': {'$within': {'$box': box }}} reduce = 'function(obj, prev) { prev.count++; }' rows = collection.group({'location': True}, cond, {'count': 0}, reduce) When I remove...

MongoDB GridFS for HA file storage

I am working on a project where I need to store many user uploaded files and provide redundancy. For file uploads, I was first considering to place user uploaded files in a NFS "uploads" directory and use Gearman to grab the file, move it to it's permanent storage locations, then update MySQL with the files info (filesize, date...etc). ...