NoSQL Essentials – Part 4 – Column-family databases

Column-Family Databases

Column-family databases aren’t a million miles different from document databases. They hold most of the same pros and cons. There is however one significant difference, column-family stores use peer-to-peer replication, where document databases, use master-slave or primary-secondary replication.

Just like all NoSQL database types, you have a lot of databases choices. Common column-family data stores include HBase, Cassandra, Amazon SimpleDB and Hypertable. HBase was built by Apache and is debatably the most popular column-family store. However recently Cassandra has been getting a lot of attention, so that is what I will be covering.

Differences from relational databases.

  1. In column-family databases, each row consist of a collection of columns=>value pairs. A collection of similar rows then makes up a column family. In a relational databases, this would be equivalent to a collection of rows making up a table. The main difference is that in a column-family database, rows do not have to contain the same columns.
  2. RDBMS impose high cost of schema change for low cost of query change. Column families impose little to no cost in schema change, for slightly more cost in query change.

Continue reading →

NoSQL Essentials – Part 3 – Document databases

Document Databases

Document databases are debatably the most talked about NoSQL database type at the time of writing. They’re easy to understand and really easy to work with. They offer all the benefits of using a key-value database (nearly), plus a lot more. Some of the most popular key-value databases currently includes, MongoDB, CouchDB, Terrastore, OrientDB and RavenDB. In this article I am going to be focusing on MongoDB.

Some people love Mongo, some people hate it, I’ve only played with it, but given it’s the most widely used NoSQL database and the most valued by employers. It’s certainly worth knowing a little about.

Continue reading →

NoSQL Essentials – Part 2 – Key-value databases

Key-value Databases

Key-value databases are by far the most basic of the NoSQL data stores. All major key-value databases, store their data in-memory, or at least provide the option to store in-memory or on disk. Some of the most popular key-value databases currently includes, Redis, Riak, Memcached, BerkleyDb, HamsterDB, Amazon Dynamo (This is part of the AWS suite and is proprietary to them).

In this article I am going to be focusing on Redis and Riak.

Key-value databases have been around for a long time. Memcached being one of the oldest and most widely used, however far from being the most feature rich over the last 5 years and is also significantly less performant than its competitors.

Continue reading →

Setting up the Apache WSGI module on OSX 10.9

Last month I posted a blog article called Running a Flask application under the Apache WSGI module. I detailed all the steps when running on a typical Ubuntu/Debian machine. Today however, I thought I’d try and do the same setup on my mac. There were a few gotchas, which is why I’m writing this. As with most things Mac, I can’t promise this as a guide for everyone, just it worked for me and hopefully it will for you.

Ok, so before I get started, I’ve only performed this setup on OS X 10.9.4, one of the problems I had, was not a problem in versions prior to OS X 10.8. However if you’re that out of date, you might want to upgrade anyway.

Continue reading →