mongodb

How to install mongoDB on windows?

Hi! I am trying to test out mongoDB and see if it is anything for me. I downloaded the 32bit windows version, but have no idea on how to continue from now on. I normally use the WAMP services for developing on my local computer. Can i run mongoDB on Wamp? However, what's the best (easiest!) way to make it work on windows? Thanks! ...

Is there a MongoDB viewer?

I've googled around but couldn't find a working MongoDB viewer or data browser. An ideal (for my needs) would be a web based viewer with dead simple features (browsing and doing queries). Thanks for your answers. ...

MongoMapper find EmbeddedDocument

Hi, I'm a little stuck with the concept of EmbeddedDocuments in MongoMapper. My Models look like this: class Post include MongoMapper::Document many :categories many :qualities end class Category include MongoMapper::EmbeddedDocument belongs_to :post many :qualities end class Quality include MongoMapper::EmbeddedDocume...

What is your prefered ODM in Ruby ? MongoMapper, MongoID or MongoDoc ?

In ruby, there are currently 3 ODM maintained: MongoMapper MongoID MongoDoc What is your prefered and why ? ...

Getting an error "bad recv() len: 53888928" from mongodb when trying to bulk insert around 300,000 items

I tried to bulk insert more than 250,000 items I got an error from the server saying: "Wed Mar 10 21:37:34 bad recv() len: 53888928 Wed Mar 10 21:37:34 end connection 127.0.0.1:2795" I did not find any data on that issue on google that is useful to me. These are the results for my machine using single threaded approach with one open co...

MongoDB architectural question

I am using Rails and have to store 4 Models. Let's say a Post that has many and belongs to many Categories. Category on the other hand has many Qualities. At the moment I'm of the opinion, that Post and Categories are Documents. Qualities becomes an embedded Document of Categories. We're coming to the root problem: There are a lot of Vo...

Connect xampp to MongoDB

Hello I have a xampp 1.7.3 instance running and a MongoDB 1.2.4 server on the same machine. I want to connect them, so I basically have been following this tutorial on php.net, it seems to connect but the cursors are always empty. I don't know what am I missing. Here is the code I am trying. The cursor->valid always says false. thanks...

How to run MongoDB as windows service?

How to setup MongoDB so it can run as windows service? Thanks ...

Difference between Document-oriented-DB and Bigtable clones

Can someone give a head-to-head comparison between them? We are looking for a suitable storage engine for our weblog history data. We looked at Bigtable's paper and understand it is suitable to us well. However, I also understand that Document-oriented-DB such as MongoDB seems to provide a little more powerful schema power -- i.e, it c...

Is it better to use a relational database or document-based database for an app like Wufoo?

I'm working on an application that's similar to Wufoo in that it allows our users to create their own databases and collect/present records with auto generated forms and views. Since every user is creating a different schema (one user might have a database of their baseball card collection, another might have a database of their recipes...

How know when my mongoDB database overhead ?

I installed a MongoDB database on my server. My server is in 32Bit and I can't change it soon. When you use MongoDB in a 32Bit architecture you have a limit of 2,5Go of data, as mentionned in this MongoDB blog post. The thing is that I have several database. So how can I know if I am close or not to this limit ? ...

mongo mapper with STI with more than one type?

I have a series of models all which inherit from a base model Properties For example Bars, Restaurants, Cafes, etc. class Property include MongoMapper::Document key :name, String key :_type, String end class Bar < Property What I'm wondering is what to do with the case when a record happens to be both a Bar & a Restaurant? I...

MongoDB C# Driver Unable to Find by Object ID?

Using MongoDB C# driver (http://github.com/samus/mongodb-csharp), seems that I'm unable to get the data by ObjectId. Below the command that I'm using: var spec = new Document { { "_id", id } }; var doc = mc.FindOne(spec); I also tried this: var spec = new Document { { "_id", "ObjectId(\"" + id + "\")" } }; var doc = mc.FindOne(spec)...

Mongodb performance on Windows

I've been researching nosql options available for .NET lately and MongoDB is emerging as a clear winner in terms of availability and support, so tonight I decided to give it a go. I downloaded version 1.2.4 (Windows x64 binary) from the mongodb site and ran it with the following options: C:\mongodb\bin>mkdir data C:\mongodb\bin>mongod -...

Building Web Apps using MongoDB and ASP.NET MVC, Should I Use C# Drivers or Javascript Driver

I am developing asp.net mvc web app with MongoDB as the data storage. I want to know others opinion about what drivers to use. Should I use C# drivers which is supported by community? Or, should I go to use Javascript driver which is supported by Mongo. How stable is javascript driver? Thanks in advanced.. ...

Does it make sense to use BOTH mongodb and mysql in the same rails application?

I have a good reason to use mongodb for part of my app. But people generally describe it as not a good fit for "transactional" applications like a bank where transactions have to be exact/consistent, etc. Does it make sense to split the models up in Rails and have some of them use MySql and others mongo? Or will this generally cause...

Update a value in MongoDB based on its current value

I want to do something like this, but the this keyword doesn't seem to be set inside the update statement. db.items.update({foo:…}, {$set: {bar: this.foo}}, false, true) Do I have to use eval to accomplish this? ...

Creating a form for editing embedded documents with MongoMapper

I'm playing around with MongoMapper but I'm having trouble figuring out how to create a form for an object that has embedded documents. With ActiveRecord, I'd use fields_for but when asked if this would be supported a few months ago, MongoMapper author John Nunemaker wrote: "Nope and nope. It is really [not] that hard with attr_accessor...

How can I optimize this code?

Hi, I'm developing a logger daemon to squid to grab the logs on a mongodb database. But I'm experiencing too much cpu utilization. How can I optimize this code? from sys import stdin from pymongo import Connection connection = Connection() db = connection.squid logs = db.logs buffer = [] a = 'timestamp' b = 'resp_time' c = 'src_ip' d...

Is it bad practice to extend the MongoEngine User document?

I'm integrating MongoDB using MongoEngine. It provides auth and session support that a standard pymongo setup would lack. In regular django auth, it's considered bad practice to extend the User model since there's no guarantee it will be used correctly everywhere. Is this the case with mongoengine.django.auth? If it is considered bad...