So I have an embedded document that tracks group memberships. Each embedded document has an ID pointing to the group in another collection, a start date, and an optional expire date.
I want to query for current members of a group. "Current" means the start time is less than the current time, and the expire time is greater than the cur...
Do you think that using a MongoDB Json Database to store log files from application is a good idea and why ?
The only advantage for me is the schema abstraction, but i think it's also a weakness we cannot ensure the integrity of a log file.
...
I found out that RCS for models is an interesting problem to solve in the context of data persistence. They are several solution using the django ORM to achieve this django-reversion and AuditTrail each of which propose their own way to do it.
Here is the model (in django-model-like format) which I would like to have revisions :
class ...
I have problem with mongomapper associations. I have one class names User and other named Model. User has many models but...
user = User.first
=> <User ...
user.models
=> []
Model.find_by_user_id(user.id.to_s)
=> <Model ...
Model.find_by_user_id(user.id.to_s).user == user
=> true
Class code (simplified):
class User
include MongoMap...
I'm not sure, if it fits exactly stackoverflow, however as i'm seeking for some code rather than a tool, i think it does.
I'm looking for a way of how to replicate / synchronize different database systems -- in this case: mysql and mongodb. We are running both for different purpose. We started with a mysql database and added mongodb lat...
This question is related to an older question: http://stackoverflow.com/questions/2019096/mysql-tracking-system. In short: I have to implement a tracking system that will have high loads using Python. For the database part I've settled on mongoDB (which sounds like the right tool for this job). The development language will be Python.
...
Hey,
I have been using MongoDB and RoR to store logging data. I am pulling out the data and looking to page the results. Has anyone done paging with MongoDB or know of any resources online that might help get me started?
Cheers
Eef
...
Is there any tool to query MongoDB using SPARQL ?
I store object using an RDF schema (boo Mongo no schema ^^), and now i looking for a tool/server to query the datastore using SPARQL.
I started to write a SPARQL parser, but if such as tool exists, i think i would use it.
Thanks in advance.
...
When I define the User has_many meetings, it automatically creates a "user_id"
key/value pair to relate to the User collections. Except I can't run any
mongo_mapper finds using this value, without it returning nil or [].
Meeting.first(:user_id => "1234")
Meeting.all(:user_id => "1234")
Meeting.find(:user_id => "1234")
All return nil....
Hi there,
I'm considering using mongodb on a new project, but before delving in, I'd like to know if it supports some key features. I know you don't need migrations, and you can add embedded objects,...but does all that mean it also behaves as if the 'accepts_nested_attributes_for' method is always there?
Do you know of any other killer...
I have the basics of a REST service done, with "standard" list and GET/POST/PUT/DELETE verbs implemented around my nouns.
However, the client base I'm working with also wants to have more powerful operations. I'm using Mongo DB on the back-end, and it'd be easy to expose an "update" operation. This page describes how Mongo can do upda...
i just stumbled across a posing on the mongodb-user list where there was a discussion about passenger and forking when using mongoDB with MongoMapper.
I just wanted to remind that Rails developers need to tweak their
'environment.rb' if they use MongoDB with Passenger.
By default, Passenger spawns Ruby processes with fork(). A...
does it make sense to save the class name in a field when using inheritance with mongomapper/rails?
class Item
include MongoMapper::Document
timestamps!
key :class, String # does this actually make sense?
key :title, String
end
class Post < Item
key :body1, String
end
class Page < Item
key :body2, String
end
if a sear...
I have a pretty simple setup. To sum it up here's what I'm doing:
class Movie
include MongoMapper::Document
has_one :setting
end
class Setting
include MongoMapper::EmbeddedDocument
belongs_to :movie
end
What I want to do is to update the setting of a movie in the same form as the movie other information. Therefor I do that :
...
We're setting out to build an online platform (API, Servers, Data, Wahoo!). For context, imagine that we need to build something like twitter, but with the comments (tweets) organized around a live event. Information about the live event itself must be delivered to clients as fast and consistently as possible, while comments about the ev...
I'm used to using relational databases like MySQL or PostgreSQL, and combined with MVC frameworks such as Symfony, RoR or Django, and I think it works great.
But lately I've heard a lot about MongoDB which is a non-relational database, or, to quote the official definition,
a scalable, high-performance, open
source, schema-free, do...
I'm trying to figure out how to sort a collection of documents server side by telling the C# driver what the sort order is, but it appears not to support that construct yet.
Is it possible to do this any other way?
...
I'm starting a hobby (non-revenue) project using Ruby on Rails. I've done a fair amount of development in Rails using Postgresql, and I can make a pretty good imitation of normalized schema. However, Mongrodb looks shiny and new. What better for trying out something new than a hobby project?
Think back to when you started using Mongo...
I'd like to select a collection of items ordered based on the number of items within an array. Hopefully the following example will clarify my rather poor explanation:
class Thing
include MongoMapper::Document
key :name, String
key :tags, Array
end
I'd like to retrieve all Things ordered from those with the most tags to those w...
I'm trying to bring back a list of year/month combinations with counts for describing blog posts. The idea is that they will be displayed like so:
January 2010 (1 post)
December 2009 (2 posts)
...
I have managed to get this to work using the MongoDB JS shell, and it returns results in a useful format:
db.posts.group({
keyf: fun...