views:

55

answers:

3

I want to have a schema-free database, with as little maintenance as possible. What do you guys think is the best choice right now, a real no-sql database system like MongoDB, or an API like Friendly, a schema-free library on top of MySQL?

I'm not worried right now with scalability nor performance, they're "nice to have".

+2  A: 

I've researched several types of NoSQL databases and eventually settled with MongoDB for several reasons:

  • Easy to set up an initial, single server instance.
  • Easy to interact with, also with Ruby.
  • It's schema-less, just like key-value stores and Cassandra, but still supports advanced queries. Key-value stores and Cassandra are more limited in this.

Friendly also looks like something you could consider. Just remember that it's still a MySQL database; accessing the raw data without Ruby is probably a bit harder. MongoDB comes with a shell, which you can use to access the database without being dependent on Ruby.

I have also considered CouchDB, which is probably MongoDB's biggest competitor, and found it slightly harder to get started with. It's still a good alternative to MongoDB and features a REST interface and web interface to explore the data. It also has drivers for Ruby. From a maintenance point-of-view, CouchDB is probably more user-friendly than MongoDB.

Niels van der Rest
I'm more inclined to MongoDB also, but is accessing the data on the MySQL database without Ruby the only major problem with using Friendly?
sdsantos
@sdsantos: Yes, that's the only downside I could think of. But whether it's a *major* problem depends on whether you need such functionality ;)
Niels van der Rest
A: 

You can consider also OrientDB. You can work in schema-less mode or mixed by defining only few constraints (unique fields, min-max ranges, regexp for validation, etc.). Just download the zip, extract in your file system, start the server and point your browser to http://localhost:2480 for the graphical console. The command line console is also available.

Drivers are available in Java, but you can use it by any languages with HTTP RESTful calls. Soon the driver for C and PHP that use binary protocol.

I'm forgetting: it's free released with the commercial friendly open source license Apache 2.

Lvca
+1  A: 

Look, if all you need is a Schema-free database and you don't have major performance constraints, then MongoDB is probably the way to go here.

MongoDB:

  1. Is genuinely schema-free
  2. Supports most major languages
  3. Supports advanced queries and multiple indexes on a single collection (table). Many "document-oriented" DBs don't have this feature.
  4. Has a native map-reduce engine for more complex work.
  5. Has a minimum amount of configuration / maintenance: new databases / collections are created when you insert data, the files are the database so it's easy to start/stop/slave/backup,
  6. Easy to get started (we're talking minutes)

I know points #5 & #6 sound kind of "magical", but it's really worth the few minutes to see for yourself. Starting an instance takes only a couple of commands and then you're writing data. There's really no schema, no 'create table', no 'add column', no need for "auto-increment IDs" (Mongo just puts one in if you don't), the worst you have to worry about is making an index.

Gates VP