{"id":6333,"date":"2018-08-06T12:04:37","date_gmt":"2018-08-06T12:04:37","guid":{"rendered":"https:\/\/9series-blog.staging9.com\/?p=6333"},"modified":"2026-03-03T10:47:30","modified_gmt":"2026-03-03T10:47:30","slug":"dynamo-db-overview","status":"publish","type":"post","link":"https:\/\/www.9series.com\/blog\/dynamo-db-overview\/","title":{"rendered":"DynamoDB &#8211; An Overview"},"content":{"rendered":"<p><a href=\"https:\/\/9series-blog.staging9.com\/wp-content\/uploads\/2018\/08\/dynamodb1.jpg\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-3328\" src=\"https:\/\/9series-blog.staging9.com\/wp-content\/uploads\/2018\/08\/dynamodb1.jpg\" alt=\"Dynamo DB - An Overview | 9series Solutions\" width=\"800\" height=\"500\" \/><\/a><\/p>\n<p><strong>Amazon DynamoDB<\/strong> is a nonrelational database that delivers reliable performance at any scale. It&#8217;s a fully managed, multi-region, multi-master database that provides consistent single-digit millisecond latency, and offers built-in security, backup and restore, and in-memory caching.<\/p>\n<p><strong>Services:<br \/>\n~<\/strong>\u00a0Automated data duplication over three availability-zones in a sole region.<br \/>\n<strong>~<\/strong> A provisioned-throughput model where you can easily adjust the read and write units at any given time formed on the authentic application usage.<br \/>\n<strong>~<\/strong>\u00a0Data can be backed up to S3.<br \/>\n<strong>~<\/strong>\u00a0Pay-per-use model \u2013 you only pay for what you use, you don\u2019t have to pay for any hardware or service that you haven\u2019t used.<br \/>\n<strong>~<\/strong>\u00a0With the help of Amazon\u2019s IAM Service you can apply security and access control.<\/p>\n<p><strong>Database Structure<br \/>\n<\/strong>In DynamoDB, all the tables, items, and attributes are the main elements that you actually work with. A table is generally a group of items, and each item is a group of attributes. DynamoDB uses the main keys to remarkably recognize each item in the table and alternate indexes to support more querying flexibility.<strong><br \/>\n<\/strong><\/p>\n<p><strong>The basic DynamoDB components:<\/strong><br \/>\n<strong>~\u00a0<\/strong>Tables<br \/>\n<strong>~\u00a0<\/strong>Items<br \/>\n<strong>~\u00a0<\/strong>Attributes<\/p>\n<ul>\n<li><strong>Tables<\/strong><br \/>\nLike other database systems, DynamoDB stores the data in tables. A table is a group of data. For example, see the example table called People that you could use to store personal contact information about friends, family, or anyone else of interest. You could also have a Cars table to store information about vehicles that people drive.<\/li>\n<li><strong>Items<\/strong><br \/>\nEach table consists of zero or more items. An item is a collection of attributes that is remarkably recognized among the other items. In a People table, each item represents a person. For a Cars table, each item depicts a vehicle. Items in DynamoDB are alike in numerous ways to the rows, records, or tuples in other database systems. In DynamoDB, there is no limit to the number of items you can store in a table.<\/li>\n<li><strong>Attributes<\/strong><br \/>\nEach item is composed of one or more attributes. An attribute is a fundamental data element, that does not have to be broken any further. For example, an item in a People table contains elements called PersonID, LastName, FirstName, and so on. In the Department table, the item may have some attributes like DepartmentID, Name, Manager, and so on. Attributes in DynamoDB are similar in many ways to fields or columns in other database systems.<\/li>\n<\/ul>\n<p><strong>Index<br \/>\n<\/strong>Items are accessed using their primary key, but you can also use indexes. Indexes give a substitute (and performant) way of retrieving the data. Each index has its own main key and this key is used when they perform index lookups.<\/p>\n<p><strong>DynamoDB supports 2 types of index<\/strong><br \/>\n1. Local secondary index<br \/>\n2. Global secondary index<strong><br \/>\n<\/strong><\/p>\n<ul>\n<li><strong>Local secondary index:<\/strong><br \/>\nAn index that uses the table&#8217;s Hash Key, but can use an alternate range key. Using these indexes consumes throughput capacity from the table.<\/li>\n<li><strong>Global secondary index:<\/strong><br \/>\nAn index that uses a Hash and Range Key that can be different from the table&#8217;s. These indexes have their own throughput capacity, separate from the table&#8217;s.<\/li>\n<\/ul>\n<p>A global secondary indexes is called global because it applies to the entire table, and secondary because the first real index is the primary hash key. In contrast, local secondary indexes are said to be local to a specific hash key. In that case you could have multiple items with the same hash key, but different range keys, and you could access those items using only the hash key.<\/p>\n<p><strong>Operations supports\u00a0<\/strong><br \/>\n<strong>Query level:<\/strong> create, update, delete, list, describe<br \/>\n<strong>Item\/attribute level:<\/strong> add, update, delete<br \/>\n<strong>Query:<\/strong> query a table with hash key and range key. Result limit 1 MB<br \/>\n<strong>Scan:<\/strong> reads all items from table<br \/>\n<strong>Support pagination<\/strong><\/p>\n<p><strong>Supported Languages<\/strong><br \/>\n<strong>~<\/strong>\u00a0Java<br \/>\n<strong>~<\/strong> JavaScript<br \/>\n<strong>~<\/strong> Swift<br \/>\n<strong>~<\/strong> Node.js<br \/>\n<strong>~<\/strong> .NET<br \/>\n<strong>~<\/strong> PHP<br \/>\n<strong>~<\/strong> Python<\/p>\n<ul>\n<li><strong>Widely used:<\/strong><br \/>\nDynamoDB has gained its popularity in the gaming industry and IoT industry. If you&#8217;re already making use of the AWS stack and need a NoSQL database system, then DynamoDB is a sure thing. Remember that you can\u2019t have fixed data structures like that with MongoDB.<\/li>\n<li><strong>Amazon DynamoDB data types:<\/strong><br \/>\nScalar \u2013 Number, String, Binary, Boolean, and Null.<br \/>\nMulti-valued \u2013 String Set, Number Set, and Binary Set.<br \/>\nDocument \u2013 List and Map.<\/li>\n<li><strong>Amazon DynamoDB partitions:<\/strong><br \/>\nIn DynamoDB, data is separated automatically by its hash key. Hence, you will need to select a hash key if you\u2019re applying a GSI. The partitioning reasoning depends entirely on two things: table size and throughput.<a href=\"https:\/\/9series-blog.staging9.com\/wp-content\/uploads\/2018\/08\/inner-section.jpg\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-3329\" src=\"https:\/\/9series-blog.staging9.com\/wp-content\/uploads\/2018\/08\/inner-section.jpg\" alt=\"Dynamo DB - An Overview | 9series\" width=\"800\" height=\"450\" \/><\/a><\/li>\n<\/ul>\n<p><strong>Moving Forward<\/strong><br \/>\nAmazon DynamoDB has gained a lot of popularity in gaming &amp; IoT industry. We have experienced developers who provide you the <a href=\"https:\/\/www.9series.com\/services\/aws-cloud-consulting.html\" target=\"_blank\"><strong>best Amazon Web Services<\/strong><\/a>. If you have a project and need our help then you can get in touch with our team.<\/p>\n<p><strong>Sources:<\/strong><br \/>\n<em>https:\/\/aws.amazon.com\/dynamodb\/<\/em><br \/>\n<em>https:\/\/docs.aws.amazon.com\/amazondynamodb\/latest\/developerguide\/GSI.html<\/em><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Amazon DynamoDB is a nonrelational database that delivers reliable performance at any scale. It&#8217;s a fully managed, multi-region, multi-master database that provides consistent single-digit millisecond latency, and offers built-in security,&#8230;<\/p>\n","protected":false},"author":1,"featured_media":6334,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"dsgo_overlay_header":false,"dsgo_overlay_header_text_color":"","dsgo_overlay_skip_top_bar":false,"_designsetgo_exclude_llms":false,"footnotes":""},"categories":[1464,5],"tags":[2253,2254,2255,2256,2257,2258,2259],"class_list":["post-6333","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-amazon-dynamodb","category-technology","tag-amazon-dynamodb","tag-amazon-nosql-dynamodb","tag-amazon-web-services","tag-aws-nosql-dynamodb","tag-nosql-database-system","tag-nosql-database-systems","tag-nosql-design-for-dynamodb"],"_links":{"self":[{"href":"https:\/\/www.9series.com\/blog\/wp-json\/wp\/v2\/posts\/6333","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.9series.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.9series.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.9series.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.9series.com\/blog\/wp-json\/wp\/v2\/comments?post=6333"}],"version-history":[{"count":1,"href":"https:\/\/www.9series.com\/blog\/wp-json\/wp\/v2\/posts\/6333\/revisions"}],"predecessor-version":[{"id":6336,"href":"https:\/\/www.9series.com\/blog\/wp-json\/wp\/v2\/posts\/6333\/revisions\/6336"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.9series.com\/blog\/wp-json\/wp\/v2\/media\/6334"}],"wp:attachment":[{"href":"https:\/\/www.9series.com\/blog\/wp-json\/wp\/v2\/media?parent=6333"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.9series.com\/blog\/wp-json\/wp\/v2\/categories?post=6333"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.9series.com\/blog\/wp-json\/wp\/v2\/tags?post=6333"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}