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 ...
Get Programming Amazon Web Services now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.