Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Use NoSql? And if yes how?

Tags:

sql

mysql

nosql

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?

like image 319
Marc Fischer Avatar asked Mar 22 '11 07:03

Marc Fischer


People also ask

How is NoSQL used?

NoSQL databases are designed for distributed data stores that have extremely large data storage needs. This is what makes NoSQL the ideal choice for big data, real-time web apps, customer 360, online shopping, online gaming, Internet of things, social networks, and online advertising applications.

When should NoSQL not be used?

You should also avoid NoSQL if your application needs run-time flexibility. If consistency is a must and if there aren't going to be any large-scale changes in terms of the data volume, then going with the SQL database is a better option.

Can NoSQL replace SQL 1 point Yes No?

NoSQL should actually be understood as “Not Only SQL” rather than “Non SQL” which means it does support SQL along with having a lot more features and it can in no way replace the traditional SQL databases. The choice purely stands on the requirements of data structure, query handling and scalability for an application.

Why would you use a NoSQL database?

NoSQL databases have become popular because they store data in simple straightforward forms that can be easier to understand than the type of data models used in SQL databases. In addition, NoSQL databases often allow developers to directly change the structure of the data.


2 Answers

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

like image 152
Benjamin Brauer Avatar answered Oct 02 '22 08:10

Benjamin Brauer


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

like image 30
Daniel Avatar answered Oct 02 '22 09:10

Daniel