World Library  
Flag as Inappropriate
Email this Article

Amazon SimpleDB

SimpleDB Logo

Amazon SimpleDB is a distributed database written in Erlang[1] by It is used as a web service in concert with Amazon Elastic Compute Cloud (EC2) and Amazon S3 and is part of Amazon Web Services. It was announced on December 13, 2007.[2]

As with EC2 and S3, Amazon charges fees for SimpleDB storage, transfer, and throughput over the Internet. On December 1, 2008, Amazon introduced new pricing with Free Tier[3] for 1 GB of data & 25 machine hours. Transfer to other Amazon Web Services is free of charge.[4]


  • Limitations 1
    • Store limitations 1.1
    • Query limitations 1.2
  • Features 2
    • Conditional Put and Delete 2.1
    • Consistent Read 2.2
  • See also 3
  • References 4
  • External links 5


SimpleDB provides eventual consistency, which is a weaker form of consistency, compared to other database management systems. This is often considered a limitation, because it is harder to reason about, which makes it harder to write correct programs that make use of SimpleDB. This limitation is the result of a fundamental design trade-off. By foregoing consistency, the system is able to achieve two other highly desirable properties:

  1. availability – components of the system may fail, but the service will continue to operate correctly.
  2. partition tolerance – components in the system are connected to one another by a computer network. If components are not able to contact one another using the network (a condition known as a network partition), operation of the system will continue.

Component failures are assumed to be inevitable; thus, both of these properties were deemed necessary in order to provide a reliable web service. The CAP theorem states that it is not possible for a system to exhibit these properties along with consistency; thus, the designers needed to settle for a weaker form of consistency.

Published limitations:[5]

Store limitations

Attribute Maximum
domains 250 active domains per account. More can be requested by filling out a form.[6]
size of each domain 10 GB
attributes per domain 1,000,000,000
attributes per item 256 attributes
size per attribute 1024 bytes

Query limitations

Attribute Maximum
items returned in a query response 2500 items
seconds a query may run 5 seconds
attribute names per query predicate 1 attribute name
comparisons per predicate 22 operators
predicates per query expression 20 predicates


Conditional Put and Delete

Conditional put and conditional delete are new operations, that were added in February, 2010. They address a problem that arises when accessing SimpleDB concurrently. Consider a simple program that uses SimpleDB to store a counter, i.e. a number that can be incremented. The program must do three things:

  1. Retrieve the current value of the counter from SimpleDB.
  2. Add one to the value.
  3. Store the new value in the same place as the old value in SimpleDB.

If this program runs while no other programs access SimpleDB, it will work correctly; however, it is often desirable for software application (particularly web applications) to access the same data concurrently. When the same data is accessed concurrently, a race condition arises, which would result in undetectable data loss.

Continuing the previous example, consider two processes, A and B, running the same program. Suppose SimpleDB services requests for data, as described in step 1, from both A and B. A and B see the same value. Let's say that the current value of the counter is 0. Because of steps 2 and 3, A will try to store 1. B will try to do the same; thus, the final counter value will be 1, even though the expected final counter value is 2, because the system attempted two increment operations, one by A, and another by B.

This problem can be solved by the use of conditional put. Suppose we change step 3 as follows: instead of unconditionally storing the new value, the program asks SimpleDB to store the new value only if the value that it currently holds is the same as the value that was retrieved in step 1. Then, we can be sure that the counter's value actually increases. This introduces some additional complexity; if SimpleDB was not able to store the new value because the current value was not as expected, the program must repeat steps 1-3 until the conditional put operation actually changes the stored value.

Consistent Read

Consistent read was a new feature that was released at the same time as conditional put and conditional delete. As the name suggests, consistent read addresses problems that arise due to SimpleDB's eventual consistency model (See the Limitations section). Consider the following sequence of operations:

  1. Program A stores some data in SimpleDB.
  2. Immediately after, A requests the data it just stored.

SimpleDB's eventual consistency guarantee does not allow us to say that the data retrieved in step 2 reflects the updates that were made in step 1. Eventual consistency only guarantees that step 2 reflects the complete set of updates in step 1, or none of those updates. Consistent read can be used to ensure that the data retrieved in step 2 reflect changes in step 1.

The reason that inconsistent results can arise when the consistent read operation is not used is that SimpleDB stores data in multiple locations (for availability), and the new data in step 1 might not be written at all locations when SimpleDB receives the data request in step 2. In that case, it is possible that the data request in step 2 is serviced at one of the locations where the new data has not been written.

Amazon discourages the use of consistent read, unless it is required for correctness. The reason for this recommendation is that the rate at which consistent read operations are serviced is lower than for regular reads.

See also


  1. ^ What You Need To Know About Amazon SimpleDB
  2. ^ Amazon SimpleDB- Limited Beta
  3. ^ SimpleDB - Free Tier - A shift in AWS pricing
  4. ^ Amazon SimpleDB official home page
  5. ^ "Limits", SimpleDB Developer Guide, Amazon  (API latest version).
  6. ^ Request to Increase Allocation of Amazon SimpleDB Domains. Retrieved on 2013-08-09.

External links

  • Amazon SimpleDB official home page
This article was sourced from Creative Commons Attribution-ShareAlike License; additional terms may apply. World Heritage Encyclopedia content is assembled from numerous content providers, Open Access Publishing, and in compliance with The Fair Access to Science and Technology Research Act (FASTR), Wikimedia Foundation, Inc., Public Library of Science, The Encyclopedia of Life, Open Book Publishers (OBP), PubMed, U.S. National Library of Medicine, National Center for Biotechnology Information, U.S. National Library of Medicine, National Institutes of Health (NIH), U.S. Department of Health & Human Services, and, which sources content from all federal, state, local, tribal, and territorial government publication portals (.gov, .mil, .edu). Funding for and content contributors is made possible from the U.S. Congress, E-Government Act of 2002.
Crowd sourced content that is contributed to World Heritage Encyclopedia is peer reviewed and edited by our editorial staff to ensure quality scholarly research articles.
By using this site, you agree to the Terms of Use and Privacy Policy. World Heritage Encyclopedia™ is a registered trademark of the World Public Library Association, a non-profit organization.

Copyright © World Library Foundation. All rights reserved. eBooks from Project Gutenberg are sponsored by the World Library Foundation,
a 501c(4) Member's Support Non-Profit Organization, and is NOT affiliated with any governmental agency or department.