rgtk
rgtk

Reputation: 3500

Database for unstructured data

I am designing a system that will need to deal with filtering/searching by various fields that have different types of value (date, text, number, geo, array).

Writes will happen once every few hours, in high amount (10K's of rows). Reads will be continuous.

Which database solution would fit those needs?

I looked at some NoSQL solutions like MongoDB or CouchDB but I feel like they would have problems with filtering several attributes at once.

Upvotes: 0

Views: 162

Answers (1)

peter
peter

Reputation: 15119

Are the writes only inserts or do they also contain updates?

CouchDB bulk insert would be perfect for inserting a high amount of data at once. And if you do inserts, incremental map reduce will recalculate the views properly so the reads would be very efficient. However you need to define views for everything and those aren’t as easy as writing MongoDB queries.

On the other hand in MongoDB you can define indices and be more flexible with the queries. Additionally if you want you can still run MapReduce batch jobs after the insert on MongoDB as well, but those wouldn’t be incremental which would mean that you need to rerun the job on the whole dataset after every insert.

As you might know, both of the databases also have support for spatial data so that is perfect for you. Additionally if CouchDB wouldn’t be fast enough for you, and your server has enough resources, you can switch to couchbase.

Generally it feels like your usecase is perfect for CouchDB - seldom writes with many reads in between - but it is hard to give a definitive answer with this little information as you provided.

Upvotes: 1

Related Questions