Yash Ladia
2013-Sep-12 08:16 UTC
Having some issues on backend regarding a social networking project on ROR
I am working on a social networking project. I need to store about 10-15 user profile information like movies,music,books,relationship-status and so on. I am confused about which database should i use to store user profile info. There are NOSQL solutions like MONGODB as well as Neo4j(graph). Or should i store it in relational database like mysql. Needless to say, but the solution should be scalable and efficient. Any guidance on this would be of great help. -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To unsubscribe from this group and stop receiving emails from it, send an email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/a5cab170-99b4-48fa-a5e3-f057a6b93c4e%40googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
Peter Hickman
2013-Sep-12 10:22 UTC
Re: Having some issues on backend regarding a social networking project on ROR
The information would seem to fit a RDMS perfectly. But then as you have not given us any idea as to how simple or complex you expect this data to be no one can tell. Tell us what the data is like and we will be able to give you a better answer. On 12 September 2013 09:16, Yash Ladia <ladiayash-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> I am working on a social networking project. I need to store about 10-15 > user profile information like movies,music,books,relationship-status and so > on. I am confused about which database should i use to store user profile > info. There are NOSQL solutions like MONGODB as well as Neo4j(graph). Or > should i store it in relational database like mysql. Needless to say, but > the solution should be scalable and efficient. Any guidance on this would > be of great help. > > -- > You received this message because you are subscribed to the Google Groups > "Ruby on Rails: Talk" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org > To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org > To view this discussion on the web visit > https://groups.google.com/d/msgid/rubyonrails-talk/a5cab170-99b4-48fa-a5e3-f057a6b93c4e%40googlegroups.com > . > For more options, visit https://groups.google.com/groups/opt_out. >-- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To unsubscribe from this group and stop receiving emails from it, send an email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/CALxYQy7aM0W9%2B6fgKET_%3DFKbLtOeNXe4WYgtHV9zspDuN5awqA%40mail.gmail.com. For more options, visit https://groups.google.com/groups/opt_out.
Yash Ladia
2013-Sep-12 15:44 UTC
Re: Having some issues on backend regarding a social networking project on ROR
Thanx for your reply.My problem is that at a later point of time this would account for very large data set as the users will increase. I want to optimize my website and want to save time on data query from the database.Also, i will be looking for similar user profile based on user''s attribute like(taste in music,movies,interests etc).I want this to be done very efficiently and in a proper manner so that there is less complexity in writing the code. On Thursday, 12 September 2013 13:46:45 UTC+5:30, Yash Ladia wrote:> > I am working on a social networking project. I need to store about 10-15 > user profile information like movies,music,books,relationship-status and so > on. I am confused about which database should i use to store user profile > info. There are NOSQL solutions like MONGODB as well as Neo4j(graph). Or > should i store it in relational database like mysql. Needless to say, but > the solution should be scalable and efficient. Any guidance on this would > be of great help. >-- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To unsubscribe from this group and stop receiving emails from it, send an email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/dd9b3c7d-9cd9-47b7-8d2a-586ed57a65d2%40googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
Yash Ladia
2013-Sep-12 16:25 UTC
Re: Having some issues on backend regarding a social networking project on ROR
Thanx for your reply.My problem is that at a later point of time this would account for very large data set as the users will increase. I want to optimize my website and want to save time on data query from the database.Also, i will be looking for similar user profile based on user''s attribute like(taste in music,movies,interests etc).I want this to be done very efficiently and in a proper manner so that there is less complexity in writing the code. On Thursday, 12 September 2013 15:52:10 UTC+5:30, Peter Hickman wrote:> > The information would seem to fit a RDMS perfectly. But then as you have > not given us any idea as to how simple or complex you expect this data to > be no one can tell. Tell us what the data is like and we will be able to > give you a better answer. > > > On 12 September 2013 09:16, Yash Ladia <ladi...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org <javascript:>>wrote: > >> I am working on a social networking project. I need to store about 10-15 >> user profile information like movies,music,books,relationship-status and so >> on. I am confused about which database should i use to store user profile >> info. There are NOSQL solutions like MONGODB as well as Neo4j(graph). Or >> should i store it in relational database like mysql. Needless to say, but >> the solution should be scalable and efficient. Any guidance on this would >> be of great help. >> >> -- >> You received this message because you are subscribed to the Google Groups >> "Ruby on Rails: Talk" group. >> To unsubscribe from this group and stop receiving emails from it, send an >> email to rubyonrails-ta...-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org <javascript:>. >> To post to this group, send email to rubyonra...-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org<javascript:> >> . >> To view this discussion on the web visit >> https://groups.google.com/d/msgid/rubyonrails-talk/a5cab170-99b4-48fa-a5e3-f057a6b93c4e%40googlegroups.com >> . >> For more options, visit https://groups.google.com/groups/opt_out. >> > >-- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To unsubscribe from this group and stop receiving emails from it, send an email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/8565b2e4-bfc0-4649-a54b-58bad8f419d4%40googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
Manuel Montoya
2013-Sep-13 04:48 UTC
Re: Having some issues on backend regarding a social networking project on ROR
I think the User->HasOne->Profile association will be OK. From there you can go searching for more efficient database calls. On Thursday, 12 September 2013 03:16:45 UTC-5, Yash Ladia wrote:> > I am working on a social networking project. I need to store about 10-15 > user profile information like movies,music,books,relationship-status and so > on. I am confused about which database should i use to store user profile > info. There are NOSQL solutions like MONGODB as well as Neo4j(graph). Or > should i store it in relational database like mysql. Needless to say, but > the solution should be scalable and efficient. Any guidance on this would > be of great help. >-- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To unsubscribe from this group and stop receiving emails from it, send an email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/f2f775b4-b568-4f2a-a3fd-0ff90d2d7bab%40googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
Rekha Benada
2013-Sep-13 08:18 UTC
Re: Having some issues on backend regarding a social networking project on ROR
I would suggest MongoDB is a right choice.... On Thursday, September 12, 2013 1:16:45 AM UTC-7, Yash Ladia wrote:> > I am working on a social networking project. I need to store about 10-15 > user profile information like movies,music,books,relationship-status and so > on. I am confused about which database should i use to store user profile > info. There are NOSQL solutions like MONGODB as well as Neo4j(graph). Or > should i store it in relational database like mysql. Needless to say, but > the solution should be scalable and efficient. Any guidance on this would > be of great help. >-- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To unsubscribe from this group and stop receiving emails from it, send an email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/97c9eac8-5f7d-4c1d-903c-a26706720ed2%40googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
Peter Hickman
2013-Sep-13 09:16 UTC
Re: Re: Having some issues on backend regarding a social networking project on ROR
On 12 September 2013 16:44, Yash Ladia <ladiayash-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> Thanx for your reply.My problem is that at a later point of time this > would account for very large data set as the users will increase. I want to > optimize my website and want to save time on data query from the > database.Also, i will be looking for similar user profile based on user''s > attribute like(taste in music,movies,interests etc).I want this to be done > very efficiently and in a proper manner so that there is less complexity in > writing the code. >Having a large amount of simple data is not the same problem as having complex data. If all you are storing is key value pairs you could have a table like this class Interest < ActiveRecord::Migration def change create_table :interests do |t| t.integer :user_id, :null => false t.string :type, :null => false t.string :value, :null => false t.timestamps end end end And you would store it as: Interest.create(:user_id => user.id, :type => ''music'', :value => ''Status Quo'') Interest.create(:user_id => user.id, :type => ''movie'', :value => ''The Color Purple'') Interest.create(:user_id => user.id, :type => ''hobby'', :value => ''Fishing'') Interest.create(:user_id => user.id, :type => ''food'', :value => ''Cheese'') and have a has_many link from the User model to retrieve the data. This sort of data is exactly what an RDBMS is best suited for. Of course if it is just key value pairs then something like Redis is also a good tool too. MongoDBs strength is document storage for unstructured data. The problem is that the data you have is neither a document nor unstructured. This is not to say that you cannot store key value pairs in MongoDB but it is not the best tool for the problem you describe. -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To unsubscribe from this group and stop receiving emails from it, send an email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/CALxYQy52buNt36z7FZ4Jew1OvDnafuPUe%3DmfDWLfrBCgjBn7NQ%40mail.gmail.com. For more options, visit https://groups.google.com/groups/opt_out.
Yash Ladia
2013-Sep-13 14:29 UTC
Re: Re: Having some issues on backend regarding a social networking project on ROR
Ok I got your point behind not using Mongodb. But the project is similar to facebook and facebook uses graph. So, what advantage can one get by using graph. And why shouldn''t I use graph for this project. In this project, users will post status updates too and those updates will have tags. So think of a share model that has like 5 tags. So, should I create a tag model and then a share has many tags, or is there a better solution? On Friday, 13 September 2013 14:46:32 UTC+5:30, Peter Hickman wrote:> > On 12 September 2013 16:44, Yash Ladia <ladi...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org <javascript:>>wrote: > >> Thanx for your reply.My problem is that at a later point of time this >> would account for very large data set as the users will increase. I want to >> optimize my website and want to save time on data query from the >> database.Also, i will be looking for similar user profile based on user''s >> attribute like(taste in music,movies,interests etc).I want this to be done >> very efficiently and in a proper manner so that there is less complexity in >> writing the code. >> > > Having a large amount of simple data is not the same problem as having > complex data. If all you are storing is key value pairs you could have a > table like this > > class Interest < ActiveRecord::Migration > def change > create_table :interests do |t| > t.integer :user_id, :null => false > t.string :type, :null => false > t.string :value, :null => false > t.timestamps > end > end > end > > And you would store it as: > > Interest.create(:user_id => user.id, :type => ''music'', :value => ''Status > Quo'') > Interest.create(:user_id => user.id, :type => ''movie'', :value => ''The > Color Purple'') > Interest.create(:user_id => user.id, :type => ''hobby'', :value > => ''Fishing'') > Interest.create(:user_id => user.id, :type => ''food'', :value => ''Cheese'') > > and have a has_many link from the User model to retrieve the data. This > sort of data is exactly what an RDBMS is best suited for. Of course if it > is just key value pairs then something like Redis is also a good tool too. > > MongoDBs strength is document storage for unstructured data. The problem > is that the data you have is neither a document nor unstructured. This is > not to say that you cannot store key value pairs in MongoDB but it is not > the best tool for the problem you describe. >-- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To unsubscribe from this group and stop receiving emails from it, send an email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/da824b8f-36ea-4f05-8edf-223381e02b3c%40googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
Josh Jordan
2013-Sep-13 18:34 UTC
Re: Re: Having some issues on backend regarding a social networking project on ROR
Don''t fool yourself into thinking that Facebook is using a single data store. Facebook has a massive set of resources Remember that they have their own PHP compiler. They are most certainly using multiple data stores redundantly and querying the right one for the job at hand for each particular piece of functionality. On Friday, September 13, 2013 10:29:24 AM UTC-4, Yash Ladia wrote:> > Ok I got your point behind not using Mongodb. But the project is similar > to facebook and facebook uses graph. So, what advantage can one get by > using graph. And why shouldn''t I use graph for this project. In this > project, users will post status updates too and those updates will have > tags. So think of a share model that has like 5 tags. So, should I create a > tag model and then a share has many tags, or is there a better solution? > > On Friday, 13 September 2013 14:46:32 UTC+5:30, Peter Hickman wrote: >> >> On 12 September 2013 16:44, Yash Ladia <ladi...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: >> >>> Thanx for your reply.My problem is that at a later point of time this >>> would account for very large data set as the users will increase. I want to >>> optimize my website and want to save time on data query from the >>> database.Also, i will be looking for similar user profile based on user''s >>> attribute like(taste in music,movies,interests etc).I want this to be done >>> very efficiently and in a proper manner so that there is less complexity in >>> writing the code. >>> >> >> Having a large amount of simple data is not the same problem as having >> complex data. If all you are storing is key value pairs you could have a >> table like this >> >> class Interest < ActiveRecord::Migration >> def change >> create_table :interests do |t| >> t.integer :user_id, :null => false >> t.string :type, :null => false >> t.string :value, :null => false >> t.timestamps >> end >> end >> end >> >> And you would store it as: >> >> Interest.create(:user_id => user.id, :type => ''music'', :value => ''Status >> Quo'') >> Interest.create(:user_id => user.id, :type => ''movie'', :value => ''The >> Color Purple'') >> Interest.create(:user_id => user.id, :type => ''hobby'', :value >> => ''Fishing'') >> Interest.create(:user_id => user.id, :type => ''food'', :value => ''Cheese'') >> >> and have a has_many link from the User model to retrieve the data. This >> sort of data is exactly what an RDBMS is best suited for. Of course if it >> is just key value pairs then something like Redis is also a good tool too. >> >> MongoDBs strength is document storage for unstructured data. The problem >> is that the data you have is neither a document nor unstructured. This is >> not to say that you cannot store key value pairs in MongoDB but it is not >> the best tool for the problem you describe. >> >-- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To unsubscribe from this group and stop receiving emails from it, send an email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/4a46e26b-e9d8-4383-ab9c-b5ee3db8b000%40googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
Yash Ladia
2013-Sep-13 18:48 UTC
Re: Re: Having some issues on backend regarding a social networking project on ROR
So for the job at hand, what do you suggest? Mysql or graph? On Sat, Sep 14, 2013 at 12:04 AM, Josh Jordan <josh.jordan-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> Don''t fool yourself into thinking that Facebook is using a single data > store. Facebook has a massive set of resources Remember that they have > their own PHP compiler. > > They are most certainly using multiple data stores redundantly and > querying the right one for the job at hand for each particular piece of > functionality. > > > On Friday, September 13, 2013 10:29:24 AM UTC-4, Yash Ladia wrote: >> >> Ok I got your point behind not using Mongodb. But the project is similar >> to facebook and facebook uses graph. So, what advantage can one get by >> using graph. And why shouldn''t I use graph for this project. In this >> project, users will post status updates too and those updates will have >> tags. So think of a share model that has like 5 tags. So, should I create a >> tag model and then a share has many tags, or is there a better solution? >> >> On Friday, 13 September 2013 14:46:32 UTC+5:30, Peter Hickman wrote: >>> >>> On 12 September 2013 16:44, Yash Ladia <ladi...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: >>> >>>> Thanx for your reply.My problem is that at a later point of time this >>>> would account for very large data set as the users will increase. I want to >>>> optimize my website and want to save time on data query from the >>>> database.Also, i will be looking for similar user profile based on user''s >>>> attribute like(taste in music,movies,interests etc).I want this to be done >>>> very efficiently and in a proper manner so that there is less complexity in >>>> writing the code. >>>> >>> >>> Having a large amount of simple data is not the same problem as having >>> complex data. If all you are storing is key value pairs you could have a >>> table like this >>> >>> class Interest < ActiveRecord::Migration >>> def change >>> create_table :interests do |t| >>> t.integer :user_id, :null => false >>> t.string :type, :null => false >>> t.string :value, :null => false >>> t.timestamps >>> end >>> end >>> end >>> >>> And you would store it as: >>> >>> Interest.create(:user_id => user.id, :type => ''music'', :value => >>> ''Status Quo'') >>> Interest.create(:user_id => user.id, :type => ''movie'', :value => ''The >>> Color Purple'') >>> Interest.create(:user_id => user.id, :type => ''hobby'', :value >>> => ''Fishing'') >>> Interest.create(:user_id => user.id, :type => ''food'', :value >>> => ''Cheese'') >>> >>> and have a has_many link from the User model to retrieve the data. This >>> sort of data is exactly what an RDBMS is best suited for. Of course if it >>> is just key value pairs then something like Redis is also a good tool too. >>> >>> MongoDBs strength is document storage for unstructured data. The problem >>> is that the data you have is neither a document nor unstructured. This is >>> not to say that you cannot store key value pairs in MongoDB but it is not >>> the best tool for the problem you describe. >>> >> -- > You received this message because you are subscribed to a topic in the > Google Groups "Ruby on Rails: Talk" group. > To unsubscribe from this topic, visit > https://groups.google.com/d/topic/rubyonrails-talk/697882hLn4I/unsubscribe > . > To unsubscribe from this group and all its topics, send an email to > rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org > To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org > To view this discussion on the web visit > https://groups.google.com/d/msgid/rubyonrails-talk/4a46e26b-e9d8-4383-ab9c-b5ee3db8b000%40googlegroups.com > . > > For more options, visit https://groups.google.com/groups/opt_out. >-- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To unsubscribe from this group and stop receiving emails from it, send an email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/CAEnW1Xeu1%2B7WYWti2ejPubTSs%3DY74o3%2BGt-69WhgCDWTMieuQg%40mail.gmail.com. For more options, visit https://groups.google.com/groups/opt_out.
Yash Ladia
2013-Sep-13 18:50 UTC
Re: Re: Having some issues on backend regarding a social networking project on ROR
So for the job at hand, what do you suggest? Mysql or graph? On Saturday, 14 September 2013 00:04:18 UTC+5:30, Josh Jordan wrote:> > Don''t fool yourself into thinking that Facebook is using a single data > store. Facebook has a massive set of resources Remember that they have > their own PHP compiler. > > They are most certainly using multiple data stores redundantly and > querying the right one for the job at hand for each particular piece of > functionality. > > On Friday, September 13, 2013 10:29:24 AM UTC-4, Yash Ladia wrote: >> >> Ok I got your point behind not using Mongodb. But the project is similar >> to facebook and facebook uses graph. So, what advantage can one get by >> using graph. And why shouldn''t I use graph for this project. In this >> project, users will post status updates too and those updates will have >> tags. So think of a share model that has like 5 tags. So, should I create a >> tag model and then a share has many tags, or is there a better solution? >> >> On Friday, 13 September 2013 14:46:32 UTC+5:30, Peter Hickman wrote: >>> >>> On 12 September 2013 16:44, Yash Ladia <ladi...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: >>> >>>> Thanx for your reply.My problem is that at a later point of time this >>>> would account for very large data set as the users will increase. I want to >>>> optimize my website and want to save time on data query from the >>>> database.Also, i will be looking for similar user profile based on user''s >>>> attribute like(taste in music,movies,interests etc).I want this to be done >>>> very efficiently and in a proper manner so that there is less complexity in >>>> writing the code. >>>> >>> >>> Having a large amount of simple data is not the same problem as having >>> complex data. If all you are storing is key value pairs you could have a >>> table like this >>> >>> class Interest < ActiveRecord::Migration >>> def change >>> create_table :interests do |t| >>> t.integer :user_id, :null => false >>> t.string :type, :null => false >>> t.string :value, :null => false >>> t.timestamps >>> end >>> end >>> end >>> >>> And you would store it as: >>> >>> Interest.create(:user_id => user.id, :type => ''music'', :value => >>> ''Status Quo'') >>> Interest.create(:user_id => user.id, :type => ''movie'', :value => ''The >>> Color Purple'') >>> Interest.create(:user_id => user.id, :type => ''hobby'', :value >>> => ''Fishing'') >>> Interest.create(:user_id => user.id, :type => ''food'', :value >>> => ''Cheese'') >>> >>> and have a has_many link from the User model to retrieve the data. This >>> sort of data is exactly what an RDBMS is best suited for. Of course if it >>> is just key value pairs then something like Redis is also a good tool too. >>> >>> MongoDBs strength is document storage for unstructured data. The problem >>> is that the data you have is neither a document nor unstructured. This is >>> not to say that you cannot store key value pairs in MongoDB but it is not >>> the best tool for the problem you describe. >>> >>-- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To unsubscribe from this group and stop receiving emails from it, send an email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/ebf3a586-8c02-4154-9c16-22ac5f7d695d%40googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.