Amazon SimpleDB is a non-relational database that can be thought of as a NoSQL database that internally helps you store data in multiple regions (replicas) to support high concurrency reads, updates, and so on, only at the Central data node, But in a matter of seconds, the changes can be propagated to other nodes. From this, it can be seen that SimpleDB is providing the final consistency.
But SimpleDB has an option (consistentread=true) for reading to tell that a strong consistent read is performed, and simpledb can only go to the central data node to read it, and it is clear that this will certainly sacrifice some efficiency.
The SimpleDB internally uses density to store slightly lower drive memory, so simpledb is better suited for storing small, fragmented, fragmented data. You can use Amazon S3 to store large data elements or files. There is a usage scenario where you can use S3 to store real data and use SimpleDB to store the index of that data.
Understand the above, and look at the SimpleDB data model below. It is important to know that it does not have the same pattern as a relational database, and that its pattern is very flexible.
From the data structure to see its data model, data structure is generally:
Map<string, map<string, set<string> > >
If you look at this, you know how it's stored, congratulations, if you don't understand. The Amazon SimpleDB data model consists of fields, projects, properties, and values, and the domain is a collection of items that are described by property-value pairs.
Fields you can understand as tables, items can be understood as a record in a table, attributes are columns, and values are well understood. Note that the SimpleDB domain has a 10GB limit, so you have to partition yourself to avoid exceeding this limit. If you do not want to have this restriction, you can use another Amazon Nosql,dynamodb, say, we are back, if so, why is it set<string>, because SimpleDB's data model properties can be associated with multiple values, so is the set , rather than string, gives great flexibility.
Original: http://blog.csdn.net/hongchangfirst/article/details/25535447
Author: Hongchangfirst
Hongchangfirst's homepage: http://blog.csdn.net/hongchangfirst