{"id":332,"date":"2019-02-07T07:54:54","date_gmt":"2019-02-07T07:54:54","guid":{"rendered":"https:\/\/www.testpreptraining.com\/tutorial\/?page_id=332"},"modified":"2020-05-01T12:29:36","modified_gmt":"2020-05-01T12:29:36","slug":"amazon-dynamodb-nosql-database-service","status":"publish","type":"page","link":"https:\/\/www.testpreptraining.ai\/tutorial\/aws-certified-solutions-architect-associate-table-of-content\/amazon-dynamodb-nosql-database-service\/","title":{"rendered":"Amazon DynamoDB"},"content":{"rendered":"\n<p><strong>Data Model<\/strong><\/p>\n\n\n\n<ul class=\"wp-block-list\"><li>DynamoDB data model include\n<ul>\n<li>Tables<\/li>\n<\/ul>\n<ul>\n<li>Items<\/li>\n<\/ul>\n<ul>\n<li>&nbsp;Attributes<\/li>\n<\/ul>\n<\/li><li>a table is a collection of items<\/li><li>item is a collection of one or more attributes.<\/li><li>Each item also has a primary key that uniquely identifies item.<\/li><\/ul>\n\n\n\n<div class=\"wp-block-image\"><figure class=\"aligncenter\"><img loading=\"lazy\" decoding=\"async\" width=\"452\" height=\"202\" src=\"https:\/\/www.testpreptraining.ai\/tutorial\/wp-content\/uploads\/2019\/08\/image-258.png\" alt=\"\" class=\"wp-image-2776\"\/><\/figure><\/div>\n\n\n\n<p><strong>Data Types<\/strong><\/p>\n\n\n\n<ul class=\"wp-block-list\"><li>DynamoDB has flexibility with database schema<\/li><li>DynamoDB only requires a primary key attribute<\/li><li>Each item, added to table can then add additional attributes<\/li><li>Thus easily, expand schema without having to rebuild entire table.<\/li><li>Major categories in which data types fall into three major categories are \u2013 Scalar, Set, or Document.<\/li><li>Scalar Data Types:&nbsp; represents exactly one value. DynamoDB supports scalar types \u2013<\/li><li>String Text and variable length characters up to 400KB. Supports Unicode with UTF8 encoding\n<ul>\n<li>Number Positive or negative number with up to 38 digits of precision<\/li>\n<\/ul>\n<ul>\n<li>Binary Binary data, images, compressed objects up to 400KB in size<\/li>\n<\/ul>\n<ul>\n<li>Boolean Binary flag representing a true or false value<\/li>\n<\/ul>\n<ul>\n<li>Null Represents a blank, empty, or unknown state. String, Number, Binary, Boolean cannot be empty.<\/li>\n<\/ul>\n<\/li><li>Set Data Types \u2013represent a unique list of one or more scalar values. &nbsp;Each value in a set needs to be unique and same data type. sets do not guarantee order. &nbsp;three set types\n<ul>\n<li>String Set \u2013 Represents unique list of String attributes<\/li>\n<\/ul>\n<ul>\n<li>Number Set \u2013 Represents unique list of Number attributes<\/li>\n<\/ul>\n<ul>\n<li>Binary Set \u2013 Represents unique list of Binary attributes<\/li>\n<\/ul>\n<\/li><li>Document Data Types \u2013to represent multiple nested attributes, like JSON file. two document types \u2013 List and Map, which can be combined and nested to create complex structures.\n<ul>\n<li>List \u2013store ordered list of attributes of different data types.<\/li>\n<\/ul>\n<\/li><li>Map \u2013store unordered list of key\/value pairs. Maps can be used to represent structure of any JSON object.<\/li><\/ul>\n\n\n\n<p><strong>Primary Key<\/strong><\/p>\n\n\n\n<ul class=\"wp-block-list\"><li>uniquely identifies each item in table<\/li><li>point to exactly one item<\/li><li>DynamoDB supports two types of primary keys, and configuration cannot be changed after a table has been created \u2013<\/li><li>Partition Key: Has one attribute- &nbsp;a partition (or hash) key. DynamoDB builds an unordered hash index on this primary key attribute.<\/li><li>Partition and Sort Key: Has two attributes &#8211; first is partition key and second one is sort (or range) key. Each item in table is uniquely identified by combination of its partition and sort key values.<\/li><\/ul>\n\n\n\n<p><strong>Provisioned Capacity<\/strong><\/p>\n\n\n\n<ul class=\"wp-block-list\"><li>During DynamoDB table creation, required to provision a certain amount of read and write capacity<\/li><li>As per configuration settings, DynamoDB will provision infrastructure capacity<\/li><li>capacity is measured in read and write capacity units.<\/li><li>CloudWatch can be used to monitor DynamoDB capacity and make scaling decisions.<\/li><li>Metrics include ConsumedReadCapacityUnits and ConsumedWriteCapacityUnits.<\/li><\/ul>\n\n\n\n<p><strong>Secondary Indexes<\/strong><\/p>\n\n\n\n<ul class=\"wp-block-list\"><li>It allows to query data in table using an alternate key other than primary key<\/li><li>table with a partition and sort key we can define secondary indexes on that table<\/li><li>Types of indexes\n<ul>\n<li>Global Secondary Index: has a partition and sort key to be different from those on table. You can create or delete a global secondary index on a table at any time.<\/li>\n<\/ul>\n<ul>\n<li>Local Secondary Index: It has same partition key attribute as primary key of table, but a different sort key. You can only create a local secondary index when you create a table.<\/li>\n<\/ul>\n<\/li><\/ul>\n\n\n\n<p><strong>Writing and Reading Data<\/strong><\/p>\n\n\n\n<ul class=\"wp-block-list\"><li>write and read items to table using indexes<\/li><li>DynamoDB provides multiple operations to create, update, and delete individual items.<\/li><li>DynamoDB has multiple querying options to\n<ul>\n<li>search a table or index<\/li>\n<\/ul>\n<ul>\n<li>retrieve back a specific item or a batch of items.<\/li>\n<\/ul>\n<\/li><\/ul>\n\n\n\n<p><strong>Writing Items<\/strong><\/p>\n\n\n\n<ul class=\"wp-block-list\"><li>DynamoDB has primary API actions to create, update, and delete items: PutItem, UpdateItem, and DeleteItem.<\/li><li>PutItem action to create new item with one or more attributes. Wwill update an existing item if primary key already exists. &nbsp;only requires a table name and a primary key<\/li><li>UpdateItem action will find existing items based on primary key and replace attributes.<\/li><\/ul>\n\n\n\n<p><strong>Reading Items<\/strong><\/p>\n\n\n\n<ul class=\"wp-block-list\"><li>Read a created item by calling GetItem action or search using Query or Scan action.<\/li><li>GetItem retrieves item based on its primary key.<\/li><li>All of item\u2019s attributes are returned by default, and then we have option to select individual attributes to filter down results.<\/li><\/ul>\n\n\n\n<p><strong>Eventual Consistency<\/strong><\/p>\n\n\n\n<ul class=\"wp-block-list\"><li>While reading items from DynamoDB, operation can be\n<ul>\n<li>eventually consistent<\/li>\n<\/ul>\n<ul>\n<li>strongly consistent<\/li>\n<\/ul>\n<\/li><li>Consistency across all copies of data is reached within a second<\/li><li>with repeat read request after a short time, response returns latest data.<\/li><li>Eventually Consistent Reads<\/li><li>Data read might not reflect results of a recently completed write operation.<\/li><li>might include some stale data<\/li><li>Strongly Consistent Reads\n<ul>\n<li>DynamoDB returns with most up-to-date data<\/li>\n<\/ul>\n<ul>\n<li>reflects updates by all prior related write operations<\/li>\n<\/ul>\n<ul>\n<li>might be less available during a network delay or outage<\/li>\n<\/ul>\n<\/li><\/ul>\n\n\n\n<p><strong>Batch Operations<\/strong><\/p>\n\n\n\n<ul class=\"wp-block-list\"><li>operations for working with large batches of items\n<ul>\n<li>BatchGetItem<\/li>\n<\/ul>\n<ul>\n<li>BatchWriteItem &#8211; perform up to 25 item creates or updates with a single operation<\/li>\n<\/ul>\n<\/li><\/ul>\n\n\n\n<p><strong>Searching Items<\/strong><\/p>\n\n\n\n<ul class=\"wp-block-list\"><li>two operations to search &#8211; &nbsp;Query and Scan<\/li><li>These operations can be used to search a table or an index.<\/li><li>Query &nbsp;&#8211; primary search operation to find items in a table or a secondary index using only primary key attribute values. Needs a partition key attribute name and a distinct value to search. Results sorted by primary key and are limited to 1MB.<\/li><\/ul>\n\n\n\n<p><strong>Scaling and Partitioning<\/strong><\/p>\n\n\n\n<ul class=\"wp-block-list\"><li>DynamoDB is fully managed service which eases, building and scaling a NoSQL cluster<\/li><li>create tables that can scale up to hold unlimited number of items with consistent low-latency performance<\/li><li>DynamoDB table can scale horizontally by using partitions<\/li><li>Each partition represents a unit of compute and storage capacity.<\/li><li>DynamoDB decides which partition to store item in based on partition key.<\/li><li>partition key is used to distribute new item among all of available partitions<\/li><\/ul>\n\n\n\n<p><strong>Security<\/strong><\/p>\n\n\n\n<ul class=\"wp-block-list\"><li>granular control over access rights and permissions for users<\/li><li>DynamoDB integrates with IAM to provide strong control over permissions using policies.<\/li><li>create policies to allow or deny specific operations on specific tables<\/li><li>use conditions to restrict access to individual items or attributes.<\/li><\/ul>\n\n\n\n<p><strong>DynamoDB Streams<\/strong><\/p>\n\n\n\n<ul class=\"wp-block-list\"><li>DynamoDB Streams makes list of item modifications for last 24-hour period<\/li><li>extends application functionality without modifying original application<\/li><li>Streams can be enabled or disabled for DynamoDB table using\n<ul>\n<li>AWS Management Console<\/li>\n<\/ul>\n<ul>\n<li>Command Line Interface (CLI)<\/li>\n<\/ul>\n<ul>\n<li>SDK<\/li>\n<\/ul>\n<\/li><li>A stream consists of stream records.<\/li><li>Each stream record is single data modification in DynamoDB table to which stream belongs.<\/li><li>Each stream record gives a sequence number, for order in which record was published to stream.<\/li><li>Stream records are organized into groups, or shards.<\/li><li>Each shard is a container for multiple stream records.<\/li><li>Shards live for a maximum of 24 hours and, with load levels, could be split before being closed.<\/li><\/ul>\n","protected":false},"excerpt":{"rendered":"<p>Data Model DynamoDB data model include Tables Items &nbsp;Attributes a table is a collection of items item is a collection of one or more attributes. Each item also has a primary key that uniquely identifies item. Data Types DynamoDB has flexibility with database schema DynamoDB only requires a primary key attribute Each item, added to&#8230;<\/p>\n","protected":false},"author":1,"featured_media":335,"parent":53,"menu_order":23,"comment_status":"closed","ping_status":"closed","template":"","meta":{"_acf_changed":false,"footnotes":""},"categories":[],"tags":[35,10,13,14,5],"class_list":["post-332","page","type-page","status-publish","has-post-thumbnail","hentry","tag-amazon-dynamodb","tag-amazon-web-services","tag-aws-certified-solutions-architect-professional","tag-aws-exam-dumps","tag-aws-solutions-architect"],"acf":[],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v22.1 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>Amazon DynamoDB NoSQL Database - Testprep Training Tutorials<\/title>\n<meta name=\"description\" content=\"Learn more about Amazon DynamoDB and NoSQL database service to store and retrieve any amount of data. Get ready and Prepare with hundreds of practice test!\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.testpreptraining.ai\/tutorial\/aws-certified-solutions-architect-associate-table-of-content\/amazon-dynamodb-nosql-database-service\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Amazon DynamoDB NoSQL Database - Testprep Training Tutorials\" \/>\n<meta property=\"og:description\" content=\"Learn more about Amazon DynamoDB and NoSQL database service to store and retrieve any amount of data. Get ready and Prepare with hundreds of practice test!\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.testpreptraining.ai\/tutorial\/aws-certified-solutions-architect-associate-table-of-content\/amazon-dynamodb-nosql-database-service\/\" \/>\n<meta property=\"og:site_name\" content=\"Testprep Training Tutorials\" \/>\n<meta property=\"article:modified_time\" content=\"2020-05-01T12:29:36+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.testpreptraining.ai\/tutorial\/wp-content\/uploads\/2019\/02\/Amazon-DynamoDB.png\" \/>\n\t<meta property=\"og:image:width\" content=\"801\" \/>\n\t<meta property=\"og:image:height\" content=\"392\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/png\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data1\" content=\"5 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.testpreptraining.ai\/tutorial\/aws-certified-solutions-architect-associate-table-of-content\/amazon-dynamodb-nosql-database-service\/\",\"url\":\"https:\/\/www.testpreptraining.ai\/tutorial\/aws-certified-solutions-architect-associate-table-of-content\/amazon-dynamodb-nosql-database-service\/\",\"name\":\"Amazon DynamoDB NoSQL Database - Testprep Training Tutorials\",\"isPartOf\":{\"@id\":\"https:\/\/www.testpreptraining.ai\/tutorial\/#website\"},\"datePublished\":\"2019-02-07T07:54:54+00:00\",\"dateModified\":\"2020-05-01T12:29:36+00:00\",\"description\":\"Learn more about Amazon DynamoDB and NoSQL database service to store and retrieve any amount of data. Get ready and Prepare with hundreds of practice test!\",\"breadcrumb\":{\"@id\":\"https:\/\/www.testpreptraining.ai\/tutorial\/aws-certified-solutions-architect-associate-table-of-content\/amazon-dynamodb-nosql-database-service\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.testpreptraining.ai\/tutorial\/aws-certified-solutions-architect-associate-table-of-content\/amazon-dynamodb-nosql-database-service\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.testpreptraining.ai\/tutorial\/aws-certified-solutions-architect-associate-table-of-content\/amazon-dynamodb-nosql-database-service\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/www.testpreptraining.ai\/tutorial\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"AWS Certified Solutions Architect Associate (SAA-C03)\",\"item\":\"https:\/\/www.testpreptraining.ai\/tutorial\/aws-certified-solutions-architect-associate-table-of-content\/\"},{\"@type\":\"ListItem\",\"position\":3,\"name\":\"Amazon DynamoDB\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.testpreptraining.ai\/tutorial\/#website\",\"url\":\"https:\/\/www.testpreptraining.ai\/tutorial\/\",\"name\":\"Testprep Training Tutorials\",\"description\":\"\",\"publisher\":{\"@id\":\"https:\/\/www.testpreptraining.ai\/tutorial\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/www.testpreptraining.ai\/tutorial\/?s={search_term_string}\"},\"query-input\":\"required name=search_term_string\"}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\/\/www.testpreptraining.ai\/tutorial\/#organization\",\"name\":\"Testprep Training\",\"url\":\"https:\/\/www.testpreptraining.ai\/tutorial\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.testpreptraining.ai\/tutorial\/#\/schema\/logo\/image\/\",\"url\":\"https:\/\/www.testpreptraining.com\/tutorial\/wp-content\/uploads\/2020\/07\/tpt-logo-6.png\",\"contentUrl\":\"https:\/\/www.testpreptraining.com\/tutorial\/wp-content\/uploads\/2020\/07\/tpt-logo-6.png\",\"width\":583,\"height\":153,\"caption\":\"Testprep Training\"},\"image\":{\"@id\":\"https:\/\/www.testpreptraining.ai\/tutorial\/#\/schema\/logo\/image\/\"}}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Amazon DynamoDB NoSQL Database - Testprep Training Tutorials","description":"Learn more about Amazon DynamoDB and NoSQL database service to store and retrieve any amount of data. Get ready and Prepare with hundreds of practice test!","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.testpreptraining.ai\/tutorial\/aws-certified-solutions-architect-associate-table-of-content\/amazon-dynamodb-nosql-database-service\/","og_locale":"en_US","og_type":"article","og_title":"Amazon DynamoDB NoSQL Database - Testprep Training Tutorials","og_description":"Learn more about Amazon DynamoDB and NoSQL database service to store and retrieve any amount of data. Get ready and Prepare with hundreds of practice test!","og_url":"https:\/\/www.testpreptraining.ai\/tutorial\/aws-certified-solutions-architect-associate-table-of-content\/amazon-dynamodb-nosql-database-service\/","og_site_name":"Testprep Training Tutorials","article_modified_time":"2020-05-01T12:29:36+00:00","og_image":[{"width":801,"height":392,"url":"https:\/\/www.testpreptraining.ai\/tutorial\/wp-content\/uploads\/2019\/02\/Amazon-DynamoDB.png","type":"image\/png"}],"twitter_card":"summary_large_image","twitter_misc":{"Est. reading time":"5 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/www.testpreptraining.ai\/tutorial\/aws-certified-solutions-architect-associate-table-of-content\/amazon-dynamodb-nosql-database-service\/","url":"https:\/\/www.testpreptraining.ai\/tutorial\/aws-certified-solutions-architect-associate-table-of-content\/amazon-dynamodb-nosql-database-service\/","name":"Amazon DynamoDB NoSQL Database - Testprep Training Tutorials","isPartOf":{"@id":"https:\/\/www.testpreptraining.ai\/tutorial\/#website"},"datePublished":"2019-02-07T07:54:54+00:00","dateModified":"2020-05-01T12:29:36+00:00","description":"Learn more about Amazon DynamoDB and NoSQL database service to store and retrieve any amount of data. Get ready and Prepare with hundreds of practice test!","breadcrumb":{"@id":"https:\/\/www.testpreptraining.ai\/tutorial\/aws-certified-solutions-architect-associate-table-of-content\/amazon-dynamodb-nosql-database-service\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.testpreptraining.ai\/tutorial\/aws-certified-solutions-architect-associate-table-of-content\/amazon-dynamodb-nosql-database-service\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/www.testpreptraining.ai\/tutorial\/aws-certified-solutions-architect-associate-table-of-content\/amazon-dynamodb-nosql-database-service\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.testpreptraining.ai\/tutorial\/"},{"@type":"ListItem","position":2,"name":"AWS Certified Solutions Architect Associate (SAA-C03)","item":"https:\/\/www.testpreptraining.ai\/tutorial\/aws-certified-solutions-architect-associate-table-of-content\/"},{"@type":"ListItem","position":3,"name":"Amazon DynamoDB"}]},{"@type":"WebSite","@id":"https:\/\/www.testpreptraining.ai\/tutorial\/#website","url":"https:\/\/www.testpreptraining.ai\/tutorial\/","name":"Testprep Training Tutorials","description":"","publisher":{"@id":"https:\/\/www.testpreptraining.ai\/tutorial\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.testpreptraining.ai\/tutorial\/?s={search_term_string}"},"query-input":"required name=search_term_string"}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/www.testpreptraining.ai\/tutorial\/#organization","name":"Testprep Training","url":"https:\/\/www.testpreptraining.ai\/tutorial\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.testpreptraining.ai\/tutorial\/#\/schema\/logo\/image\/","url":"https:\/\/www.testpreptraining.com\/tutorial\/wp-content\/uploads\/2020\/07\/tpt-logo-6.png","contentUrl":"https:\/\/www.testpreptraining.com\/tutorial\/wp-content\/uploads\/2020\/07\/tpt-logo-6.png","width":583,"height":153,"caption":"Testprep Training"},"image":{"@id":"https:\/\/www.testpreptraining.ai\/tutorial\/#\/schema\/logo\/image\/"}}]}},"_links":{"self":[{"href":"https:\/\/www.testpreptraining.ai\/tutorial\/wp-json\/wp\/v2\/pages\/332","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.testpreptraining.ai\/tutorial\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/www.testpreptraining.ai\/tutorial\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/www.testpreptraining.ai\/tutorial\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.testpreptraining.ai\/tutorial\/wp-json\/wp\/v2\/comments?post=332"}],"version-history":[{"count":5,"href":"https:\/\/www.testpreptraining.ai\/tutorial\/wp-json\/wp\/v2\/pages\/332\/revisions"}],"predecessor-version":[{"id":5170,"href":"https:\/\/www.testpreptraining.ai\/tutorial\/wp-json\/wp\/v2\/pages\/332\/revisions\/5170"}],"up":[{"embeddable":true,"href":"https:\/\/www.testpreptraining.ai\/tutorial\/wp-json\/wp\/v2\/pages\/53"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.testpreptraining.ai\/tutorial\/wp-json\/wp\/v2\/media\/335"}],"wp:attachment":[{"href":"https:\/\/www.testpreptraining.ai\/tutorial\/wp-json\/wp\/v2\/media?parent=332"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.testpreptraining.ai\/tutorial\/wp-json\/wp\/v2\/categories?post=332"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.testpreptraining.ai\/tutorial\/wp-json\/wp\/v2\/tags?post=332"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}