Overview

Amazon SimpleDB provides a simple custom query language that enables you to search against attribute name-value pairs associated with items. This language is designed to underline the simplicity of Amazon SimpleDB versus a traditional RDBMS system.

The basic construct of a query expression is called a predicate. Each predicate is indicated by square brackets surrounding a set of comparisons defined against a particular attribute. For example, ['title' = 'My Life'] is a predicate that defines an equality comparison on the attribute title. Each predicate is evaluated individually against a single attribute and produces a set of item names. These sets can then be combined with set operations such as union and intersection to produce more complex queries. For example, ['title' starts-with 'Harry'] intersection ['year' = '2007'].

All predicate comparisons are lexicographical in nature. When designing an application, you should carefully think through storing data in its appropriate string representation. For more information, see Working with Numerical Data.