Ask HN: Introduction to NoSQL?

6 points by sjs382 ↗ HN
I have trouble wrapping my head around NoSQL. Maybe because relational databases seem so natural to me?

Anyone have a good introduction to NoSQL style databases? When it's appropriate to use them, (dis)advantages of using them, how to query? Ideally a tutorial of how to build a simple app?

11 comments

[ 3.8 ms ] story [ 27.4 ms ] thread
There's lots of types of NoSQL dbs, where would you like to start? Are you looking for a DocumentDB or a Key/Value store or a Graph DB or a column oriented db?

Do you have a preference on what language an example app or tutorial is in?

I guess I'm just looking for an introduction to both. They can be different documents, of course, but it would be nice to have one that compares different types, too.

No preference RE: language. Python or PHP would be nice but I can read Ruby as well.

I think Redis is one of the easier NoSQL databases to pickup, because it's easy to install and is mainly just a key-value database with some bonus features. Your entire DB is stored in memory and persistence is done by asynchronous writes to disk, so it is possible that you could lose data if something were to reboot for instance, but it also means that it's really fast.

Simple twitter clone with Redis: http://code.google.com/p/redis/wiki/TwitterAlikeExample

Entire thing is stored in memory? Uh oh... Haha
Chapter 5 of The Art of Unix Programming by esr, "Textuality". That's the reason I haven't used databases for simpler things in years.
For the Neo4j graph database, check out:

* the 10 minute code-level getting started guide: http://wiki.neo4j.org/content/Getting_Started_Guide

* a full-blown reference example, including diagrams, graph layout screen shots, code walk through etc: http://wiki.neo4j.org/content/IMDB_Example

* the domain modeling gallery, which shows how to model a bunch of domains in a graph db: http://wiki.neo4j.org/content/Domain_Modeling_Gallery

* popular blog post about how to model a social network in Neo4j: http://blog.neo4j.org/2009/09/social-networks-in-database-us...

* how to work Neo4j in python, ruby, clojure, scala & grails: http://wiki.neo4j.org/content/Main_Page#Language_bindings

If you have more questions, feel free go all mailing list on us: https://lists.neo4j.org.

Hope that helps!

NoSQL is not really one specific database type, quite a lot of very different apporaches fall under the label. Starting from Key/Value Stores like redis, over documentbased structures like couchdb and Column-oriented approaches like Google's BigTable and Apaches HBase to graph-Databases like neo4j. And these aren't even all types of NoSQL approaches.

Their use depends pretty much entirely on what you'd like to do. Network-Structures are naturally best suited for graphbased databases. For Scaling Issues and really fast access redis seems good (haven't used it) and if you are working on really, really large datasets Hbase combined with hadoop might be worth a look.

Here is a small overview presentation: http://www.slideshare.net/chrisbaglieri/non-relational-datab...