Book Image

Amazon SimpleDB Developer Guide

Book Image

Amazon SimpleDB Developer Guide

Overview of this book

SimpleDB is a highly scalable, simple-to-use, and inexpensive database in the cloud from Amazon Web Services. But in order to use SimpleDB, you really have to change your mindset. This isn't a traditional relational database; in fact it's not relational at all. For developers who have experience working with relational databases, this may lead to misconceptions as to how SimpleDB works.This practical book aims to address your preconceptions on how SimpleDB will work for you. You will be quickly led through the differences between relational databases and SimpleDB, and the implications of using SimpleDB. Throughout this book, there is an emphasis on demonstrating key concepts with practical examples for Java, PHP, and Python developers.You will be introduced to this massively scalable schema-less key-value data store: what it is, how it works, and why it is such a game-changer. You will then explore the basic functionality offered by SimpleDB including querying, code samples, and a lot more. This book will help you deploy services outside the Amazon cloud and access them from any web host.You will see how SimpleDB gives you the freedom to focus on application development. As you work through this book you will be able to optimize the performance of your applications using parallel operations, caching with memcache, asynchronous operations, and more.
Table of Contents (16 chapters)
Amazon SimpleDB Developer Guide
Credits
Foreword
About the Authors
About the Reviewers
Preface

Plan of action


We are going to store the metadata for our songs collection on SimpleDB and also store the corresponding MP3 files on S3. The following figure shows what we are going to accomplish:

In order to accomplish this, here is the sequence of steps we need to take:

  1. 1. Create a bucket in S3 for storing our music files.

  2. 2. Create additional metadata that we will need for the files and store the metadata in our songs domain.

  3. 3. Save the actual MP3 file to S3.

Creating an S3 bucket

Each S3 bucket has a name associated with it. Please keep in mind that the name of the bucket needs to be unique not just for your AWS account, but across all accounts in S3. This sometimes makes creating a bucket name challenging!

Note

You must of course be signed up to use Amazon S3 before trying out the code samples in this chapter. We examined in detail how to signup for Amazon's Web Services in Chapter 2, Getting Started with SimpleDB. Please review the chapter if you need help with the sign up process.

Creating...