Thursday
Apr232009
Which Key value pair database to be used

My Table has 2 columsn .Column1 is id,Column2 contains information given by user about item in Column1 .User can give 3 types of information about item.I separate the opinion of single user by comma,and opinion of another user by ;.
Example-
23-34,us,56;78,in,78
I need to calculate opinions of all users very fast.My idea is to have index on key so the searching would be very fast.Currently i m using mysql .My problem is that maximum column size is below my requirement .If any overflow occurs i make new row with same id and insert data into new row.
Practically I would have around maximum 5-10 for each row.
I think if there is any database which removes this application code.
I just learn about key value pair database which is exactly i needed .
But which doesn't put constraint(i mean much better than RDMS on column size.
This application is not in production.
Example-
23-34,us,56;78,in,78
I need to calculate opinions of all users very fast.My idea is to have index on key so the searching would be very fast.Currently i m using mysql .My problem is that maximum column size is below my requirement .If any overflow occurs i make new row with same id and insert data into new row.
Practically I would have around maximum 5-10 for each row.
I think if there is any database which removes this application code.
I just learn about key value pair database which is exactly i needed .
But which doesn't put constraint(i mean much better than RDMS on column size.
This application is not in production.
Reader Comments (2)
I wouldn't suggest using key-value database over RDBMS, when it is justified only by column size constraint. Moreover, most key-value databases does not support aggregate functions. In your case I believe that simply switching to normalized relational schema will allow you make your computations fast enough, even if you have tens of millions of opinions.
I'm reading your blog for a while (nice read) and by chance I'm behind another k-v distributed storage that is not mentioned here - SubRecord. It is not mature enough to compete yet, but can be I think considered. For me it is also important to bring attention of any kind as probably no one here has ever heard of that :)