Databases Reference
In-Depth Information
DomainMetadata — Get information on a domain, its items, and the items' attribute-value
pairs. Information like domain creation date, number of items in the domain, and the size
of attribute-value pairs can be obtained.
Once you create a domain, you can use the PutAttributes method to insert or update an item.
Remember that an item is a collection of attribute-value pairs. Inserting an item implies creating
the set of attribute-value pairs that logically forms an item. Updating an item implies
retrieving a particular item and then updating the value for one or more attributes of the item.
BatchPutAttributes is also available to carry out multiple put operations in a single call.
DeleteAttributes allows you to delete an item, an attribute-value pair, or just an attribute-value
from your domain. BatchDeleteAttributes allows multiple delete operations in a single call.
You can get the attribute-value pairs of a single item by using the GetAttributes operation.
Alternatively, you can use the SELECT operations to query and fi lter items in your domain. SimpleDB
supports a rich set of features to fi lter a data set in a domain. The syntax and semantics are similar to
that offered by SQL. SimpleDB automatically creates and manages indexes to make querying effi cient.
Although SimpleDB's query mechanism feels a bit like SQL, you should not confuse SimpleDB for
an RDBMS. It's not a relational store and does not support complex transactions or referential
foreign key-based constraints as relational databases do.
SIMPLEDB REGIONS
Currently, AWS offers SimpleDB in four different regions: U.S. East, U.S. West,
Europe, and Asia. You need to choose a region before you create a domain. Choose
a region close to your users to reduce latency and improve performance. Two
domains in different regions could have the same name but they are different and
completely isolated from each other. They do not share any data between them.
The four available regions (with their physical locations) are as follows:
sdb.amazonaws.com — U.S. East (Northern Virginia)
sdb.us-west-1.amazonaws.com — U.S. West (Northern California)
sdb.eu-west-1.amazonaws.com — Europe (Ireland)
sdb.ap-southeast — Asia (Singapore)
Next, I illustrate a few ways to access and use SimpleDB.
Using the REST API
The easiest way to use SimpleDB is to use its REST API. Although SimpleDB's REST API isn't
thoroughly RESTful from a purist's standpoint, it provides a simple HTTP-based request-response
model. Read Subbu Allamaraju's post titled, “A RESTful version of Amazon SimpleDB” at
Search WWH ::




Custom Search