I've encountered several situations when using MongoDB that require the use of DBRefs. However, I'd also like to cache some fields from the referenced document in the DBRef itself.
{$ref:'user', $id:'10285102912A', username:'Soviut'}
For example, I may want to have the username available even though the user document is referenced. ...
Hi everyone
I am new to mongo, this is my db design:
product := {
name: str
group: ref,
comments: [ ref, ref, ref, ref ]
}
comments := {
... a bunch of comments stuff
}
tag := {
_id: int, #Need this for online requests
tag: str,
products: [ {product: ref, score: float}, ... ],
comments: ...
In MongoDB, I have a document with a field called "ClockInTime" that was imported from CSV as a string.
What does an appropriate db.ClockTime.update() statement look like to convert these text based values to a date datatype?
...
Does anyone have a sample of how to query for nested/inner objects in MongoDB using NORM (C#)? For example, if a typical document in a collection looks like Order/OrderItems, how can I look up a specific OrderItem by OrderItem.Quantity > 10.
...
I am new to MongoDB and have a perfect place in mind to use it. However, it's only worth it if I can make the queries from JavaScript and return JSON. I read another post on here of someone asking a similar question, but not specific to C#.
What's the easiest way I can implement a generic service/handler in asp.net/c# that would allow ...
I'm a RDBMS guy that has a project that I believe will work really well in a MongoDB system. For different reasons that I think is irrelevant for the questions at hand.
Anyway, my system will be something like the following:
Properties Available
Houses
House A
123 Pine Street
House B
456 Main Street
Realtors
...
I'm looking for a flexible event logging platform to store both pre-defined (username, ip address) and non-pre-defined (can be generated as needed by any piece of code) events for Django. I'm currently doing some of this with log files, but it ends up requiring various analysis scripts and ends up in a DB anyway, so I'm considering throw...
We are just giving MongoDB a test run and have set up a Rails 3 app with Mongoid. What are the best practices for inserting large datasets into MongoDB? To flesh out a scenario: Say, I have a book model and want to import several million records from a CSV file.
I suppose this needs to be done in the console, so this may possibly not be...
Hi,
I want to regex search an integer value in MongoDB. Is this possible?
I'm building a CRUD type interface that allows * for wildcards on the various fields. I'm trying to keep the UI consistent for a few fields that are integers.
Consider:
> db.seDemo.insert({ "example" : 1234 });
> db.seDemo.find({ "example" : 1234 });
{ "_id" : ...
in mysql i use JOIN and one query is no problem. what about mongo?
imagine categories and products.
products may have more categories.
categories may have more product.
(many to many structure)
and administrator may edit categories in administration (categories must be separated)
its possible write product with categories names in o...
The output from MongoDB's map/reduce includes something like 'counts': {'input': I, 'emit': E, 'output': O}. I thought I clearly understand what those mean, until I hit a weird case which I can't explain.
According to my understanding, counts.input is the number of rows that match the condition (as specified in query). If so, how is it ...
Hi -
I'm working on a project that is quite search-oriented. Basically, users will add content to the site, and this content should be immediately available in the search results. The project is still in development.
Up until now, I've been using Haystack with Xapian. One thing I'm worried about is the performance of the website once ...
I was following this tutorial : http://pronewb.com/mongodb-as-in-humongous-not-retarded. All was well until the "I feel the vibe" section. I do not know where to begin this section. Do i have to create a new php file or type it in some command line?
...
If you had a webshop solution based on SQL Server relational DB what would be the reasons, if any, to move to NoSQL storage ? Does it even make sense to migrate datastores that rely on relations heavily to NoSQL? If starting from scratch, would you choose NoSQL solution over relational one for a webshop project, which will, after a while...
How to build a folder structure using morphia or the mongodb API? I am looking for something like this.
folderA
--->folderB
--->folderC
------>fileC
------>folderCA
---------->fileCA
...
Hello,
I want to do something like this:
List<int> fff = new List<int>();
fff.Add(1);
fff.Add(2);
fff.Add(5);
Mongo m = new Mongo();
m.Connect();
var dataBase = m.GetDatabase("database");
var collection = dataBase.GetCollection("coll");
IMongoQuery queryable = collection.AsQueryable();
MongoQueryProvider prov = new M...
I am running some unit test that persist documents into the MongoDb database. For this unit test to succeed the MongoDb server must be started. I perform this by using Process.Start("mongod.exe").
It works but sometimes it takes time to start and before it even starts the unit test tries to run and FAILS. Unit test fails and complains ...
I'm starting a project which I think will be particularly suited to MongoDB due to the speed and scalability it affords.
The module I'm currently interested in is to do with real-time chat. If I was to do this in a traditional RDBMS I'd split it out into:
Channel (A channel has many users)
User (A user has one channel but many messag...
I am using MongoDB for storage but the initial db size is around 50MB (even with --smallfiles given to the server at startup).
How can I start off with a much smaller db size (1MB max)?
...
I am trying to make a web service using Ruby Sinatra and MongoDB. It will return JSON objects. I decided to use MongoDB, in part, because it stores documents internally in a "JSON-like" structure. I thought this would make it easy to me to run a query and send a JSON result to the client. However, I have run into problems converting the ...