Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to store frequently modified lists in database in a natural way so that they are just ready to read?

For a social network site, I need to store frequently modified lists for each entity(& millions of such entities) which are:

  • frequently appended to
  • frequently read
  • sometimes reduced
  • lists are keyed by primary key

I'm already storing some other type of data in an RDBMS. I know that I could store those lists in an RDBMS as a many to many relationship like this way: Create a table listItems with two columns listId & listItem & to generate any particular list, just do a SELECT query for all records WHERE listId = x. But storing lists this way in an RDBMS is not very ideal when high scalability is concerned. Instead I would like to store prepared lists in a natural way, so that retrieval performance is maximized. Because I need to fetch around hundred of such lists for a user, whenever I user does login & view a page.

So how do I solve this ? What kind of database should be used for this data, probably the one that provide adding variable no of columns to keyed by a primary key, the ones like Cassandra ?

like image 541
Rajat Gupta Avatar asked Dec 08 '22 13:12

Rajat Gupta


1 Answers

I used the same method that is, to store a 2 column row for every record, which I turned to a txt file with the formatted html which then we changed to json and finally to mongodb.

But since you have got frequent operations, I suggest cassandra, hbase and googles big table implementations like accumulo cloudata and hypertable.

Cloudata may be the right one for you.

like image 158
Ajmal M Sali Avatar answered Dec 11 '22 07:12

Ajmal M Sali