Chapter 5. Data Types
SimpleDB stores the values for all attributes in your items as UTF-8 strings. This means that all comparisons between attributes to determine order or to match search criteria will be done lexicographically. Your application needs to be aware of this fact and encode data correctly before saving it to SimpleDB and decode the data correctly on retrieval from SimpleDB. Coding of dates and numbers is necessary in SimpleDB if the application will search for a value or sort on the values. All values in SimpleDB are treated as case-sensitive and must be taken into consideration. SimpleDB leaves the data type conversions to the developer, and thus provides you with a lot of flexibility in dealing with your data that is to be stored in SimpleDB. In this chapter, we will look at different kinds of data types and the encoding and decoding strategies to be used when storing and retrieving them from SimpleDB.
In this chapter, we will cover:
Lexicographical comparison
Storing numbers...