All Questions
18 questions
1
vote
1
answer
54
views
Search for a record that has a relationship to objects with specific value using Mongoid
Consider the following model diagram representing two models of my Rails project.
The Implement model represents an "object" that a person has, for example a person can have a helmet, bag, shield, etc....
-2
votes
1
answer
167
views
Create related tables in mongodb
I'm developing a simple forum app in Ruby on Rails, with MongoDB.
It's supposed to have these basic things:
Topics
-Author name
-Topic name
-Topic text (content)
and
Comments
-Name of commentator
...
0
votes
2
answers
1k
views
How to store football teams, games and scores in MongoDB
I'm design football statistic application. I stuck with storing game (match) result.
I have Team object and Game object. First I make Game model look like
class Game
include Mongoid::Document
...
0
votes
2
answers
550
views
has_many relation via IDs list in parent
I got in trouble while designing data model.
I have master object "A" with its children "B", and "B" has many "C", but some "C" can also be free (not belong to any "B").
By standard mas_many/...
6
votes
1
answer
2k
views
MongoDB Conversation / Private Message Schema using Mongoid
I'm building a forum system in Rails in order to become more acquainted with Rails and Mongoid. A feature I'd like to add is a private message system forum users can use to message each other.
In ...
2
votes
3
answers
507
views
Should I move to MongoDB to avoid SQL injection vulnerability in Rails? [closed]
There is a big concern regarding a recently-disclosed Rails SQL injection vulnerability. I am not well-versed in dealing with security, so I am unnerved. I hear that MongoDB is not susceptible to this ...
1
vote
2
answers
187
views
Mongoid embeddable comments and user info that can change
I have an List document with embedded Comments. Along with the user's comment in the view, I'd like to display their screen name and profile picture. The profile picture could change and so could ...
2
votes
1
answer
254
views
Rails: How to model objects with a mix of both fixed and dynamic data
I am building a site with a database of users. I am using arbor.js to build a graph for each user. The graph is a tree-like structure with edges and nodes that looks something like this (I had an ...
1
vote
1
answer
620
views
How to model a many self-referential relationship with many parents?
I want to model out the following in the easiest way:
A skill has many dependent skills.
Each skill should exist on their own, and a skill may have other skills that are prerequisite skills.
For ...
1
vote
2
answers
1k
views
MongoDB: Modeling likes, mutual friends etc
I'm building a streaming music service that will have features like:
Follow users
Like songs
Create and manage playlists
...etc.
I'm using Rails 3.1, Mongoid and MongoDB. I'm unsure how I should model ...
3
votes
2
answers
5k
views
CQRS in a Rails environment?
I'm trying to wrap my head around CQRS (Command Query Response Separation) per Martin Fowlers recent post at:
http://martinfowler.com/bliki/CQRS.html
Given a project:
Main Database (Postgres):
...
2
votes
2
answers
800
views
How to structure data model for an advertising tool in MongoDB
I am building an ad analytics tool which assumes a data structure like this:
Account
Campaign
Keyword
Conversion
I have a lot of information about individual conversion events, which can be tied back ...
2
votes
1
answer
342
views
Schemaless DBs: Indexing dynamically-typed things by their properties?
In a RDBMS you can declare types (tables) and subtypes (subtype tables with supertype FKs). In Rails this would be Class Table Inheritance. For example, you could have Person table and a Friend ...
4
votes
3
answers
655
views
Advice on Simple MongoDB Database Structure
I'm just getting started with MongoDB and Mongoid for Rails and in need of some advice on the right way to design a simple blog database.
I'm currently using the structure below, but I need a way to ...
-1
votes
1
answer
2k
views
Need suggestions on designing artist recommendation
I have the following scenario.I need to recommend artists to users. How should this be modeled? I am looking for suggestions on this.
I was thinking. Based on following criterias:
When a user listens ...