In an effort to move into the unknown and learn something new, I have decided to use riak with my Rails 3 investigations. I am having a little trouble wrapping my head around some stuff and so here I am.
I have just started playing with it and have a very trivial data model at the moment consisting of: class Project include Ripple::Document property :name, String, :presence => true property :created_at, Time property :updated_at, Time many :issues end class Issue include Ripple::Document property :name, String, :presence => true property :description, String, :presence => true property :project_key, String end In Riak I have one project represented by: <Project:JqqS2Jq6lr2AdDxCjdEffZvnPWe name="Issues"> The questions I have are: The relationship I am looking to implement is a simple has_many => belongs_to kind of arrangement, is project_key the field I would need on my Issue model, project_id? Should my Issue class have: one :project as well? Also with the Map Reduce functionality does a field need to be a key in order to do a lookup on it? If it is not a key how complex is the query that you could use to look up, by name for example, can you have more than one key on class and how would I represent this in Ripple. I am fairly comfortable in Ruby .... but feel a little out of my element here and any pointers on where to start with this stuff would be hugely appreciated. Thanks, Chris Herring.
_______________________________________________ riak-users mailing list [email protected] http://lists.basho.com/mailman/listinfo/riak-users_lists.basho.com
