O'Reilly logo

Programming Amazon Web Services by James Murty

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Items and Attributes

Information is stored in the SimpleDB service as a collection of attribute values that are grouped together as items, where each item comprises one or more attributes. Items and attributes are inseparable resources; they cannot exist independently, nor can they be manipulated in isolation. The SimpleDB API operations we will discuss in this section all operate on items and attributes at the same time.

Items

An item is a collection of attributes with a name that is unique within the domain to which it belongs. The name can contain any text in UTF-8 format and may be between 1 and 1024 bytes long. An item’s name serves as its unique identifier. Although the item name is similar in concept to a primary key column in a traditional database, there is an important difference: you cannot refer to item names in SimpleDB query statements.

Each item may contain up to 256 attribute values. Note that this limit applies to attribute name and value pairs, not just attribute names. This means that attributes with multiple values will use up more than one of the 256 spaces allowed. Because an item must always contains at least one attribute value, you cannot create an item without specifying at least one; and if all of an item’s attribute values are deleted, the item is automatically deleted as well.

You may alter the attributes stored in an item at any time, and because the SimpleDB service does not impose a schema, there is no requirement that the items in a domain contain matching ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required