AWS Certification Training: PwC Academy
- 172k Enrolled Learners
- Weekend/Weekday
- Live Class
DynamoDB is a fully managed NoSQL database service provided by Amazon. These days, databases have become the backbone for any company irrespective of how big they are. Traditional database systems which were initially used, are not the go-to solution today because of the dynamic change in requirements and type of data procured. In this Amazon DynamoDB tutorial, I will be discussing the new and fast way of storing and retrieving data using DynamoDB.
If you wish to make a career in cloud computing and explore the different services provided by AWS, take a look at the AWS Training and Certification.
In this Amazon DynamoDB tutorial, I will be discussing the following topics:
Amazon DynamoDB is a fully managed NoSQL service that works on key-value pair and other data structure documents provided by Amazon. It requires only a primary key and doesn’t require a schema to create a table. It can store any amount of data and serve any amount of traffic. With DyanmoDB, you can expect a good performance even when it scales up. It is a very simple and small API that follows key-value method to store, access and perform advanced data retrieval.
DynamoDB comprises of three fundamental units known as table, attribute, and items. A table holds a set of items, an attribute is the simplest element that stores data without any further division and item holds a set of attributes.
Now that you know what is DynamoDB, let’s move further in this Amazon DynamoDB tutorial and introduce you to the terms used here.
Here with DynamoDB, everything is kept simple, the terms used with DynamoDB are easy to understand which makes it unique from the rest of the Database services. The terms used are as follows:
A primary key is a unique attribute that is necessary while creating a table, it cannot be null at any given point. Hence, while inserting an item into the table, a primary key attribute is a must. E.g. Employee ID is the primary key for the table Employee records. Two items cannot have a similar primary key. DynamoDB supports two types of Primary key.
A simple primary key is also known as Partition key, this is basically a single attribute. DynamoDB uses Partition key’s value to distinguish items in a table. E.g. Employee ID in Employee records table.
A composite primary key is also known as Partition key and Sort key. This type of key is generally made up of two items. The primary component is the Partition key and the secondary component is the Sort key. E.g. Car Details table with Brand name and Model number as a composite primary key.
A secondary index can be understood as the attribute that lets you query the data, with or without the help of a Primary key. DynamoDB has these secondary indexes that help you achieve this additional access.
This is an additional/optional feature provided by DynamoDB to keep a track of data modification events in a table. Here, each event is represented by a stream record and if this service is enabled, then you get a new event every time when there is a new item created, an item is updated or an item is deleted.
These are the different terms used, without any further delay let’s proceed with the DynamoDB tutorial and find out how to access a table.
Accessing DynamoDB is very easy and can be done using the following methods:
Features Of DynamoDB
DynamoDB is a NoSQL database service. DynamoDB is designed in such a way that the user can get high-performance, run scalable applications that would not be possible with the traditional database system. These additional features of DynamoDB can be seen under the following categories:
DynamoDB is a database tool and to interact with an application, it requires API. The APIs in DynamoDB are:
Control Plane consists of operations responsible for “Creating” and “Managing” a DynamoDB table. The API operations that can be used are as follows:
Data Plane consists of “CRUD” operation, i.e. “Create“, “Read“, “Update“, and “Delete” options to perform different actions on your table. Here in Data Plane, there are multiple operations that can be done on a table. The operations here are as follows:
DynamoDB Stream is nothing but a service used to track data stream that is loaded into a table and retrieved from a table. To modify the streaming, the user can use the following commands:
So, now that you have a decent idea about the different APIs supported by DynamoDB. Let’s take a look at the different case studies where customers have benefited with DynamoDB.
I have listed down the case studies of some big companies and startups, as to how they benefited using DynamoDB.
This is how the trending NoSQL database “Amazon DynamoDB” helped companies to reach the pinnacle of user experience. Let’s move further in this Amazon DynamoDB tutorial and see how to implement the different queries.
Let’s find out how to create a table in DynamoDB.
Step 1: Navigate to the DynamoDB section in AWS or click here. Select “Create Table“.
Create Table – Amazon DynamoDB Tutorial
Step 2: Fill in with the necessary details and click on “Create“.
Create Table – Amazon DynamoDB Tutorial
Step 3: You can view your table being created. Click on “Overview” to understand your table, click on “Items” to edit, insert and query on the table. There are many more options you can use to understand your table better.
Table Description – Amazon DynamoDB Tutorial
Now that you have created a table, let’s go ahead and insert a few items and understand how NoSQL works.
Step 1: Navigate to “Items” and click on “Create item“.
Create Item – Amazon DynamoDB Tutorial
Step 2: It will open a JSON file where you can add different items. Click on the “+” symbol and select “Append” and select what type of data you want to enter.
Insert Item – Amazon DynamoDB Tutorial
Step 3: This is what it looks like after adding multiple columns to your table. Click on “Save“.
Insert Item – Amazon DynamoDB Tutorial
Step 4: Since it is a NoSQL architecture, you can play around with the columns you add to the table. E.g. “Position“.
Insert Item – Amazon DynamoDB Tutorial
Step 5: This is how your table will look like once you have inserted the data.
Display Table Content – Amazon DynamoDB Tutorial
Now that we have a table ready, let’s go ahead and look at some basic queries.
Step 1: Here you can frame your query and click on “Start Search” to get the desired result.
E.g. I am searching for all the mobile numbers that are greater than or equals to “1234“.
Search Table – Amazon DynamoDB Tutorial
Step 2: Here, I am searching for the record which has EmpId as “ED4“.
Search Table – Amazon DynamoDB Tutorial
This is a small tutorial on how to use DynamoDB to suffice your needs. I hope you found this Amazon DynamoDB tutorial informative.
If you wish to learn more about Cloud Computing and build a career in Cloud Computing, then check out our Cloud Computing Courses which comes with instructor-led live training and real-life project experience. This training will help you understand Cloud Computing in depth and help you achieve mastery over the subject.
Got a question for us? Please mention it in the comments section and we will get back to you or post your question at Edureka | Community. At Edureka Community we have more than 1,00,000+ tech-fanatics ready to help.
Course Name | Date | Details |
---|---|---|
AWS Certification Training: PwC Academy | Class Starts on 31st August,2024 31st August SAT&SUN (Weekend Batch) | View Details |
AWS Certification Training: PwC Academy | Class Starts on 14th September,2024 14th September SAT&SUN (Weekend Batch) | View Details |
AWS Certification Training: PwC Academy | Class Starts on 16th September,2024 16th September MON-FRI (Weekday Batch) | View Details |
edureka.co