DynamoDB

6 flashcards · Programming Languages · by ripley

  1. "Eventual Consistency"

    First things first: when we talk about consistency we refer to an scenario where different entities (nodes) have their own copy of some data object. Now, conflicts arise because each node can update its own copy (e.g. because there are clients, each one connected to some node, asking them to do so), so if I read the data from different nodes I'll see different values. This is where Eventual Consistency (EC), Strong Eventual Consistency (SEC) and Strong Consistency (SC) come into play. Eventual…

  2. SQL DB Characteristics

    Data is stored in tables that are related to each other through a primary key foreign key relationship. The database supports complex queries and joins to retrieve a combination of data from various tables. The schema of a relational database is defined in the beginning. Changes to the schema usually require a migration of data from the old schema to the new schema. Relational databases support vertical scaling which means that a single server must be made more powerful. Relational databases su…

  3. NoSQL databases characteristics

    NoSQL databases can support wide-column stores, document stores, key-value stores, and graph stores. The type of data stored varies by NoSQL database. NoSQL databases do not have a fixed schema. Different records can have different attributes. NoSQL databases support horizontal scaling. With this approach, you can partition and spread data across multiple cheaper servers instead of purchasing more powerful servers. For example, if a table stores information about 100,000 users, data can be part…

  4. "Strong Eventual Consistency"

    Strong Eventual Consistency This is a special case of EC, that is valid only for certain data types. Let's assume that the data object shared is a counter, and updates are made by add(int value)and substract(int value) operations. In this case, the order in which we apply updates does not matter! So if both nA and nB start with a counter value of 0, and if then nA runs add(10) and nB runs substract(5) (simultaneosly), they only need to send the update operation to each other without caring for…

  5. "Strong Consistency"

    Strong consistency Quite different to the other two. Here it is a requirement that upon update operations all nodes agree on the new value before making the new value visible to clients. That way updates are visible to all clients 'at the same time', so they will read the same value at all times. Now this introduces the requirement for some blocking in update operations. Both in EC and SEC an update operation was over as soon as the local copy was updated (then the operation was broadcasted to…

  6. ACID principles of SQL DB