mongodb

Is it possible to set up MongoDB in a shared hosting?

I'm using GoDaddy and would like to have MongoDB for my pet project.. but I don't really think its possible, since it has to be running the Daemon... but.. it doesn't hurt to ask, is there a way? ...

Child objects in MongoDB

I have been following along with Rob Conery's Linq for MongoDB and have come across a question. In the example he shows how you can easily nest a child object. For my current experiment I have the following structure. class Content { ... Profile Profile { get; set; } } class Profile { ... } This works great when looking a...

how can i update field with another field's value.

hi, i have a collection t1 _id, field1,field1 i want set field2's value field1 like sql: update t1 set field1=field2; how to do it? thanks. ...

PHP can't connect to Mongodb

Hi, I followed the windows installation instructions in mongodb's website but I still can't connect to MongoDB through PHP because of this error: Class 'Mongo' not found Why isn't the file containing the Mongo Class not being loaded? I've also found this error: PHP Warning: PHP Startup: mongo: Unable to initialize module Module com...

MongoDB - proper use of collections?

In Mongo my understanding is that you can have databases and collections. I'm working on a social-type app that will have blogs and comments (among other things) and had previously be using MySQL and pretty heavy partitioning in an attempt to limit possible concurrency issues. With MySQL I've stuffed all my user data into a _user databa...

How to stream image object in Sinatra

I had uploaded images to mongoDB using GridFS. I want to retrieve an image from the db and display it in the browser. How to do this with the help of Sinatra and HAML. ...

Advice on e-commerce logging strategy

I recently inherited an e-commerce app (Java/Struts) that I'm porting to Rails. The thing is, we frequently have to do forensics on orders by poring through the log files, and with the old app's logs (log4j wall of text) it's pretty hard to make sense of the individual orders when several people are placing orders simultaneously. So I...

MongoDB RSS Feed Entries, Embed the Entries in the Feed Object?

I am saving a reference to an RSS Feed in MongoDB, each Feed has an ever growing list of Entries. As I'm designing my schema, I'm concerned about this statement from the MongoDB Schema Design - Embed vs. Reference Documentation: If the amount of data to embed is huge (many megabytes), you may read the limit on size of a single o...

Are default _id fields for MongoDB documents always 24 hex characters?

As part of my application requirements, I have a limit of 30 characters for an ID field. This is out of my control and I am wondering if the MongoDB default _id fields will work for me. It appears as though the default _id field is 24 characters long. That works for me, but I am wondering if this is likely to change in the future. I am w...

Is there is something like stored procedures in NOSQL databases?

I am new to NOSQL world and still comparing between nosql and sql databases, I Just tried making few samples using mongodb. I am asking about stored procedures when we send few parameters to one stored procedure and this procedure execute number of other stored procedures in the database, will get data from stored procedures and send ...

MongoDB transactions?

Playing around with MongoDB and NoRM in .NET. Thing that confused me - there are no transactions (can't just tell MongoConnection.Begin/EndTransaction or something like that). I want to use Unit of work pattern and rollback changes in case something fails. Is there still a clean way how to enrich my repository with ITransaction? ...

Linq causes collection to disappear when trying to use OrderByDescending

For background, I am using MongoDB and Rob Conery's linq driver. The code I am attempting is thus: using (var session = new Session<ContentItem>()) { var contentCollection = session.QueryCollection.Where(x => x.CreatedOn < DateTime.Now).OrderByDescending(y => y.CreatedOn).ToList(); ViewData.Model = contentCollection; } this wi...

MongoDB ruby dates

I have a collection with an index on :created_at (which in this particular case should be a date) From rails what is the proper way to save an entry and then retrieve it by the date? I'm trying something like: Model: field :created_at, :type => Time script: Col.create(:created_at => Time.parse(another_model.created_at).to_s and Co...

Working with mongodb from Java

I have launch mongodb server: [[email protected]][~]% mongod --dbpatmongod --dbpath /home/demas/temp/ Mon Apr 19 09:44:18 Mongo DB : starting : pid = 4538 port = 27017 dbpath = /home/demas/temp/ master = 0 slave = 0 32-bit ** NOTE: when using MongoDB 32 bit, you are limited to about 2 gigabytes of data ** see http://blog.m...

NoSQL DB for .Net document-based database (ECM)

I'm halfway through coding a basic multi-tenant SaaS ECM solution. Each client has it's own instance of the database / datastore, but the .Net app is single instance. The documents are pretty much read only (i.e. an image archive of tiffs or PDFs) I've used MSSQL so far, but then started thinking this might be viable in a NoSQL DB (e.g....

How to keep track of a private messaging system using MongoDB?

Take facebook's private messaging system where you have to keep track of sender and receiver along w/ the message content. If I were using MySQL I would have multiple tables, but with MongoDB I'll try to avoid all that. I'm trying to come up with a "good" schema that can scale and is easy to maintain. If I were using mysql, I would have ...

MongoDB-PHP: JOIN-like query

Here are the objects: courses { "name" : "Biology", "_id" : ObjectId("4b0552b0f0da7d1eb6f126a1") } students { "name" : "Joe", "classes" : [ { "$ref" : "courses", "$id" : ObjectId("4b0552b0f0da7d1eb6f126a1") } ], "_id" : Object...

Simplifying wide, unnormalized tables in Rails

Background I'm designing a Rails app to record research data. Most of it can be conceptualized as being "survey" (or "questionnaire") data. We already have several Access databases and CSV files that hold this data. The existing design is that each survey has its own table with one column per question. Many of these tables have 100+...

Mongodb and PHP: how to query nested arrays without using the key name

I'm probably missing something simple here but I can't seem to find a way to build a query that will allow me to update a match in a group of nested values. I have a document like this for a blog app I've been working on (currently uses MySQL): array ( '_id' => new MongoId("4bc8dcee8ba936a8101a0000"), 'created' => '20100418-201312 ...

mongodb mongo shell utf8 errors

when using the mongodb 1.4.1 version and connect from the shell I have observed this (all running win64) db.foo.save({_id: "5" , "sub": "\u00f6"}) this seems like the ONLY way to insert a ö http://www.fileformat.info/info/unicode/char/00f6/index.htm and quite a long way from UTF-8 (hex) 0xC3 0xB6 (c3b6) so what is the best app...