SimpleDB uses a very simple data model, and all data is stored as an UTF-8 string. This simplified textual data makes it easy for SimpleDB to automatically index your data and give you the ability to retrieve the data very quickly. If you need to store and retrieve other kinds of data types such as numbers and dates, you must encode these data types into strings whose lexicographical ordering will be the same as your intended ordering of the data. As SimpleDB does not have the concept of schemas that enforce type correctness for your domains, it is the developer's responsibility to ensure the correct encoding of data before storage into SimpleDB.
Working only in strings impacts two aspects of using the database: queries and sorts.
Consider the following Sample_Qty
table:
ID | |
---|---|
101 |
Quantity = 1.0 |
102 |
Quantity = 1.00 |
103 |
Quantity = 10 |
104 |
Quantity = 25 |
105 |
Quantity = 100 |
Now try and execute the following SQL statement:
SELECT * FROM Sample_Qty WHERE Quantity= '1'
This SQL...