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

Values


Each attribute is a key/value pair, and the value is where you store the interesting stuff—your data! You can only store textual data in SimpleDB for now. There are some ways to get around it and store binary data in Amazon S3 and use metadata in SimpleDB to point to it. We will discuss the procedures for accomplishing this in Chapter 7, Storing Data on S3. The only restriction textual data has, with a larger implication, is that you must encode and decode values for other data types such as dates and numbers when storing and retrieving them for use in your application. In the next chapter, we will review how to encode and decode data correctly so that we can do sorting and comparison correctly even for data types such as numbers and dates.

One of the unique features of SimpleDB is the ability to have multiple values for a single attribute. These multiple values are actually stored by SimpleDB in such a way that you can query for each separately!

Storing multiple values in a single...