DynamoDb,Demistyfied. (Chapter 1)
An oversimplification of what dynamoDB is, and how it can be used for app development.

I love creating and writing about the creation of software.
Search for a command to run...
An oversimplification of what dynamoDB is, and how it can be used for app development.

I love creating and writing about the creation of software.
I started learning about DynamoDB and this is great series. Have bookmarked it.
Keep them coming Rosius Ndimofor👍
I'm glad you liked it Apoorv Tyagi. There's a lot more on the way.
A Technical / Non Technical overview of the dynamoDb for Beginners
Perform CRUD operations on dynamoDB with python
Watch the complete Video on Youtube https://www.youtube.com/watch?v=kKX-8L_R2XM Prerequisites Before proceeding make sure you have these dependencies Docker Python 3.11 and above AWS CLI Full access to a foundation model. For this workshop, we'll...

Introduction In a previous workshop, Building event-driven applications with AWS sam and python we built an e-commerce ordering service using AWS SAM, API Gateway, Lambda and Python. Here's the solutions architecture. In that workshop, whenever a ne...

Github Repository https://github.com/EducloudHQ/introduction_to_gen_ai Skill up with serverless on Educloud https://www.educloud.academy/content/da99ad07-7efa-41e7-ba50-b18e6b89e10d This post is an introductory lesson to building AI-enhanced serverle...

Introduction Serverless computing is a cloud-based approach to application development that eliminates the need for provisioning and managing servers. Instead, developers focus on writing code that is triggered by events such as HTTP requests or data...

https://github.com/trey-rosius/sam_stepfunctions Hey!!! How you doing? In this post, we’ll look at how to build a workflow, using SAM as IaC, Appsync, and python. Prerequisites Install AWS Cli (https://docs.aws.amazon.com/cli/latest/userguide/cli-c...

Changing the underlying data model for the application once it was deployed was really difficult, if not impossible because tables had fixed rows and columns.
Scaling an RDBMS was a pain. They can only be scaled vertically. (scale-up with a larger server). That's expensive and resources can easily be wasted.
With all these issues, development wasn't rapid, the cost of running the service was high and scaling was difficult.
In the early 2000s, NoSQL was born.
NoSQL is a non-relational DBMS, that does not require a fixed schema, avoids joins, and is easy to scale. It stores data as JSON documents instead of as columns and rows used by relational databases.
NoSQL stands for “not only SQL” rather than “no SQL” at all. This means a NoSQL JSON database can store and retrieve data using literally “no SQL.” Or you can combine the flexibility of JSON with the power of SQL for the best of both worlds.
Some of the technical challenges NoSql addresses are
Primary Key
A unique identifier for each item in a table. When creating a table, you must specify the table name and primary key. In the Products table above, ProductID is the primary key. It should be unique to that item alone.
Dynamo DB supports 2 types of primary keys. A partition key and a partition and sort key.
A partition key is a simple primary key composed of one attribute. Dynamo Db uses this partition key as input to an internal Hash function. The output determines the partition where the item would be stored. No 2 items can have the same partition key. In the “Products” table above ProductID is an example of a simple primary key.
A Partition Key and Sort Key also known as composite primary keys has 2 attributes. In this scenario, two items can have the same partition key. All identical partition key values are stored together in sorted order by sort key value.
The following snippet shows a table named Products, with some examples of items and attributes
#Products table
{
"ProductID":001,
"Name":"coffee",
"Qty":605,
"price":500
},
{
"ProductID":002,
"Name":"Milk",
"Qty":200,
"Price":150,
"Category":"proteins",
"Img":"https://githubusercontent.com/41929050/61567049-13938600-aa33-11e9-9c69-a4184bf8e524.jpeg"
},
{
"ProductID":003,
"Name":"Oranges",
"Qty":1000,
"Price":50,
"Category":"Fruits",
"Compliments":{
"fruits":["bananas","pineapples","guavas"],
"processed":"Yoghurt"
},
"Img":"https://githubusercontent.com/41929050/61567049-aa33-11e9-9c69-a4184bf8e57856.jpeg"
}
Note the following about the Products table:
Each item in the table has a unique identifier, or primary key, that distinguishes the item from all of the others in the table. In the Products table, the primary key consists of one attribute (ProductID).
Other than the primary key, the Products table is schemaless, which means that neither the attributes nor their data types need to be defined beforehand. Each item can have its own distinct attributes.
Most of the attributes are scalar, which means that they can have only one value. Strings and numbers are common examples of scalars.
Some of the items have a nested attribute (Compliments). DynamoDB supports nested attributes up to 32 levels deep.
Secondary Indexes
It’s a way of efficiently accessing records by means of some piece of information other than the usual primary key. You can create one or more secondary indexes on a table.
DynamoDB supports 2 kinds of indexes
Global secondary index
You can read a ton more about dynamo DB straight from the AWS website AWS DynamoDB
To run DynamoDB on your computer, you must have the Java Runtime Environment (JRE) version 8.x or newer. The application doesn't run on earlier JRE versions.
Also make sure you install aws cli on your computer
Once you've installed and configured dynamo DB locally as illustrated here, running this command
aws dynamodb list-tables --endpoint-url http://localhost:8000
yield this ouput.(assuming it's a fresh dynamoDB installation)
{
"TableNames": []
}
The article is already getting very long. I'll end here and continue in the next chapter, which illustrates how to build CRUD functions using python to store and access data from a table in Dynamo DB.
Continue to Chapter 2
Thanks a lot for reading.
*Stay Tuned