Database Types
Unstructured data is information that either does not have a predefined data model or is not organized in a predefined manner.
Unstructured information is typically text-heavy but may contain data such as dates, numbers and facts as well as examples include email, messages, word processing, documents, videos, photos, and audio files.
Semi-Structured data is information that does not reside in a relational database, but that does have some organization properties that make it easier to analyze. e.g. XML & JSON
Structured data refers to information with a high degree of organization such that inclusion in a relational database is seamless and readily searchable by simple, straightforward search engine algorithms.
All data can be stored in database SQL in the table with rows and columns. They have a relational key and can be easily mapped into predefined fields.
DynamoDB Table
A table is like a collection of data items.
Like all other databases, Dynamo DB stores data in tables.
Items
Each table contains multiple items.
An item is a group of attributes that is uniquely identifiable among all the other items.
An item consists of a primary or composite key and a flexible number of attributes. Dynamodb is similar to rows, and records in another database.
Attributes
Each item is composed of one or more attributes.
An attribute consists of an attribute name and a value or a set of values.
An attribute is a fundamental data element, something that does not need to be broken down any further.
The aggregate size of an item cannot exceed 400 KB.
Dynamodb allows low latency read slash write access to items ranging from 1KB to 400 KB.
Dynamo DB can use pointers of S3 for storing items of size larger than 400 KB.
DynamoDB attributes and items are schema-less. That is there is no predefined structure beforehand.
Dynamo DB Read Capacity Unit
One read capacity unit represents one strongly consistent read per second, or two eventually consistent reads for seconds for an item up to 4 KB in size.
If you need to read an item that is larger than 4 KB, Dynamo DB will need to consume additional RCUs.
The total RCUs depend on the item size and whether you want eventual or strongly consistent.
Dynamo DB Write Capacity Unit
1 WCU represents one write per second for an item up to 1KB in size.
If you want to write an item more than 1 KB in size, Dynamo DB will need to consume additional WCU.
The total number WCUs depends on the item size.
Dynamo DB limits
256 tables per region.
No limit on the size of the table.
Dynamodb Calculating Reads
RCU for Strong:
50 reads at 40KB per item
(40/4) * 50 = 500 RCUs
10 reads at 6KB per item
(8/4) * 10 = 20 RCUs
33 reads at 17KB per item
(20/4) * 33 = 132 RCUs
RCU for Eventual:
50 reads at 40KB per item
(40/4) * 50 = 500/2 = 250 RCUs