Amazon SimpleDB
Developer Guide (API Version 2009-04-15)
« PreviousNext »
View the PDF for this guide.Go to the AWS Discussion Forum for this product.Go to the Kindle Store to download this guide in Kindle format.Did this page help you?  Yes | No |  Tell us about it...

Data Model

When using Amazon SimpleDB, you organize your structured data in domains within which you can put data, get data, or run queries.

Domains consist of items which are described by attribute name-value pairs. For a better understanding, consider the spreadsheet model shown in the following image.

The components correspond to each part of a spreadsheet:

  • Customer Account—Represented by the entire spreadsheet, it refers to the Amazon Web Services account to which all domains are assigned.

  • Domains—Represented by the domain worksheet tabs at the bottom of the spreadsheet, domains are similar to tables that contain similar data.

    You can execute queries against a domain, but cannot execute queries across different domains.

  • Items—Represented by rows, items represent individual objects that contain one or more attribute name-value pairs.

  • Attributes—Represented by columns, attributes represent categories of data that can be assigned to items.

  • Values—Represented by cells, values represent instances of attributes for items. An attribute can have multiple values.

Unlike a spreadsheet, however, multiple values can be associated with a cell. For example, an item can have both the color value red and blue. Additionally, Amazon SimpleDB does not require the presence of specific attributes. You can create a single domain that contains completely different product types. For example, the following table contains clothing, automotive parts, and motorcycle parts.

IDCategorySubcat.NameColorSizeMakeModel
Item_01ClothesSweaterCathair SweaterSiameseSmall, Medium, Large  
Item_02ClothesPantsDesigner JeansPaisley Acid Wash30x32, 32x32, 32x34  
Item_03ClothesPantsSweatpantsBlue, Yellow, PinkLarge  
Item_04Car PartsEngineTurbos  AudiS4
Item_05Car PartsEmissions02 Sensor  AudiS4
Item_06Motorcycle PartsBodyworkFender EliminatorBlue YamahaR1
Item_07Motorcycle Parts, ClothingClothingLeather PantsBlackSmall, Medium, Large  

Regardless of how you store your data, Amazon SimpleDB automatically indexes your data for quick and accurate retrieval.