Carlo Pecchia

Friendly: a NoSQL ORM into MySQL

(16.01.2010)
friendly kids

NoSQL solutions are gaining everyday more consensus (yes, and pure “hype” too..). Sometimes they represent a good solution for some application domain (or simply “working condition”) where a defined object model can’t be obtained or is not desirable.

Those are perfect cases for a NoSQL solution, but the next question is: another “stuff” to install, configure, manage, update, and so on?

With Friendly we can have a NoSQL solution (= schema free) deployed in well know (and maybe beloved) MySQL database.

First things first, install it:

$ sudo gem install friendly

Successfully installed sequel-3.8.0
Successfully installed will_paginate-2.3.11
Successfully installed friendly-0.4.3
3 gems installed

Let’s create a database in MySQL:

$ echo "create database friendly_db" | mysql -u root

Now simply look and this straightforward gist and see how simple and intutive it is: