In this lecture, we will get introduced to DynamoDB in AWS.
If you're already familiar with DynamoDb,
feel free to skip this lecture and go to the next one.
DynamoDB is a no SQL database solution provided by AWS.
It is a highly scalable database that can cope with millions
of requests from applications such as mobile and web,
gaming, and IoT.
It is a fully managed service from AWS.
There are no servers that the users have to manage,
and this means that AWS offloads operational tasks
such as database upgrades, software installation,
and patching from the users.
Along with high scalability, it also provides low latency data access,
making it a very popular choice
for some of the world's largest scale applications.
DynamoDb also guarantees high availability as the data
is replicated across multiple AWS regions.
Dynamodb is a no SQL database.
This means that it stores data in the form of key-value pairs
and documents.
For example, let's assume that we want to create a database
storing information about cars.
With a key-value database, this can be done like this.
The data here is stored as a table,
which is a collection of key-value pairs,
where a key serves as a unique identifier.
Here, we have two keys called manufacturer
and the model of the car.
This can be expanded further to add more information about
the car and to make each one more uniquely identifiable.
Now let's add two more keys,
the year and the vehicle identification number
or the VIN to the collection.
Each entry in this database is called an item,
and in this example, we have a database of cars with four items
at this moment.
Each item in the database is composed of one or more attributes.
The attributes are the keys that we have defined for the table,
such as manufacturer, model, year, and VIN,
all of which provide meaningful information about the items.
Each item in this database can also be represented like this.
In order to uniquely distinguish an item with every other item
in the table, DynamoDB uses a primary key.
For example, the attribute called VIN
or the vehicle identification number is a unique value,
and this can be used to identify any car in this table.
A VIN in this case can be used as a primary key.
When adding more items, it's mandatory to define a value
for the primary key.
The other attributes are optional,
and you can also have a null value.
For example, let's add a fifth item to this table
with just the vehicle identification number
and the manufacturer name,
which is optional, and let's not choose to add values
for any other attributes such as the model or the year.
This fifth item is also a valid entry in this database.