AWS SimpleDB – what’s it good for?

Actually – it’s a nice and handy part of your cloud toolbox is what.

First of all – it’s a non-relational data store.  Which means you are not going to have highly normalized table structures and you are not (for the here and now) going to be able to join two tables in a SQL like query.

BUT!  It does work faster and more efficiently that trying to get access to a XML config file; it provides persistence that an in-memory data structure can’t; you can query it with SQL type statements; you can either insert or update data using a decent API; plus you can add data fields on the fly in your code.  Best of all – it’s very easy to use, and it’s cheap.  Far cheaper than either the MySQL or Oracle offerings – you get charged for every hour those guys are up and running.  For SimpleDBthe pricing structure is a lot more attractive.

Some things to square away first.  Forget the idea of tables – each unique data structure in SimpleDB is called a domain.  It’s a non-relational/quasi no SQL data structure that does allow SQL queries to get data.  Think tree and you have it – the primary node for each data row is called an itemName – the rest of the data fields are elements of the primary node.

So for my very simple Java servlet – I needed a user data structure that had to be persistent.  With SimpleDB the domain (think table) name became MyUsers – and the primary node for each row – the itemName in SimpleDB syntax – was the unique user ID.  I had one other data element – the child node – it was a URL for the user.

I have covered the making the connection to AWS in an earlier post so I’m not going over that again.

A great resource is the sample code that Amazon provides – available for more than just Java.

Next couple of posts I’m going to cover creating a domain, putting data into it, and then getting the data back out.


About Lee Greffin
Just another programmer...

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s

%d bloggers like this: