6

I read and heared a lot (podcasts, stackoverflow questions..) about NoSQL-Databases and I am really curious to use them, but...

Although I read a lot of things like how-to-sql-or-nosql or what-scalability-problems-have-you-solved-using-a-nosql-data-store I am still not certain which kind of DB to use.

The Problem is: For a (school) project we (my project group) need to implement a quite big database (that should serve a rest-server, probably written in erlang, with lots of clients). We are quite good at designing datamodels for relational databases. So we startet to do that.

Now I played around with some NoSQL and was really impressed by the performance. So: Is it a good Idea to use a NoSQL Database? Our Datamodel has lots of relations and the queries would have lots of joins (or at least use joined views). I sometimes read this means I should go with a relational Database and in other places I read this means I could easily redesign it into NoSQL-Style to loose this overhead of relations.

Should I use NoSQL and if yes, which of the systems would you suggest me to use? Are Things like HanderlerSocket for MySQL are an option? And how can I easily redesign a relational Datamodel into NoSQL-Style?

Community
  • 1
  • 1
Marc Fischer
  • 1,296
  • 1
  • 13
  • 16
  • 16
    If you hit the limits of any relational database for a school project, you're doing something seriously wrong. –  Mar 22 '11 at 07:36
  • 6
    maybe is a very good school. – Elzo Valugi Mar 22 '11 at 07:38
  • 2
    If they are that good OP should be telling us. – dkretz Mar 22 '11 at 07:40
  • Well. We attend a so called [HTL](http://en.wikipedia.org/wiki/H%C3%B6here_Technische_Lehranstalt) and this is going to be part of our thesis work, for which we want to start our own company. – Marc Fischer Mar 22 '11 at 08:47
  • 2
    NoSQL solutions use various approaches in order to achieve performance which are not ACID compliant, such as delayed write which can (and will) make you lose data. As for HandlerSocket for MySQL - it works only if you can fit your entire dataset in the memory and if you work with primary key lookups mostly - which then outperforms NoSQL solutions by miles. Bear in mind that relational databases have been around for decades and are *proven* technology while NoSQL approach is still young and in need of maturing. I'd definitely stick to a RDBMS. – Furicane Mar 22 '11 at 09:12
  • Alternatively, you could go with a mixed approach. I've found that using a RDBMS paired with a simple NoSQL solution such as Memcached to be extremely beneficial both in persistency of data and fast response times. – Michael McTiernan Mar 22 '11 at 09:43
  • Memcached isn't NoSQL, it's a key:value store. – Furicane Mar 22 '11 at 10:10

3 Answers3

5

The answer to your question is: It totally depends on your data and requirements. In a real-world project you would analyze the benefits of various NoSQL-Databases (HBase, Cassandra, MongoDB, CouchDB, Riak,...) in your special project. Then you could evaluate these against the benefits of a classical RDBMS like MySQL.

In a school project like yours a NoSQL-Database is mainly a decision of taste as your project will probably never benefit from typical NoSQL-advantages like schemalessness or sharding.

A redesign of a relational datamodel can be a very tricky task as you have to wrap up your mind around the different database model of the chosen NoSQL-database. Joins are not necessarily a problem if your business data fits the database model of your chosen NoSQL-database. Sometimes Join-intensive relational models are a lot easier to implement in some NoSQL-Databases (e.g. a Document oriented database like MongoDB).

If you really want to try out NoSQL go with MongoDB as it is very well documented for a first entry.

As a german-speaker (Grützi in die Schweiz aus Berlin) I recommend you to read the following book in German, which helps you to get the main reasons for using a NoSQL-database and explains the main steps to start using the most popular NoSQL-Databases: NoSQL: Einstieg in die Welt nichtrelationaler Web 2.0 Datenbanken

Benjamin Brauer
  • 368
  • 1
  • 5
  • 19
4

Please keep in mind that you are not required to use just 1 data storage engine. You can use SQL and noSQL solutions in parallel.

Just remember to document your database/noSQL structures properly.

-daniel

Daniel
  • 7,006
  • 7
  • 43
  • 49
0

If you want to do joins in nosql, you could use playOrm which does joins on partitions. In this way, you can have a 1 trillion row table and 1 partition of that table may only be 100,000 rows and you can join that partition with another one. playOrm also then gives you all the familiar hibernate relationships as well.

Dean Hiller
  • 19,235
  • 25
  • 129
  • 212