What is DynamoDB used for?
DynamoDB has a variety of use cases ranging from simple key-value stores through traditional relational databases and even time series.
Is DynamoDB fast?
It depends. DynamoDB might seem slower than some in-memory stores like Redis but DynamoDB is persistent and has different use cases. It’s "the webscale" where DynamoDB outperforms all traditional relational databases. It has very predictable performance, no matter the size of your dataset, whether it’s only 1GB or 100TB, the speed of reads and writes remains the same, actually, it gets even better with scale. DynamoDB proved to be capable of serving over 45 million requests per second during Prime Day.
Does DynamoDB Support SQL?
It does! Recently DynamoDB introduced support for PartiQL - a SQL-like language for querying, modifying, and inserting data. You can learn more about SQL support for DynamoDB here. While PartiQL is just an abstraction over existing Query and Scan methods, it is helpful when transitioning from RDBMS world.
Is Redis faster than DynamoDB?
It’s comparing apples to oranges. While Redis is in-memory data store, perfect for caches or sessions store, DynamoDB is persistent NoSQL database capable of storing relational data thanks to single-table design technique. While Redis is superfast for small datasets, it gets pricier and pricier. While you probably won't use Redis as persisent datastore for e.g. e-commerce shop, DynamoDB is perfect for that. Amazon boasts about using DynamoDB for all of their Tier-1 services (e.g. Amazon.com or Kindle store).
Is DynamoDB serverless?
Yes, DynamoDB is truly “serverless” in a sense that you don’t have to manage it or patch and care about underlying servers or software that it runs on. It’s fully administered by AWS and all you need to do is just use it using CLI or SDK. Moreover, DynamoDB works in a "pay for what you use" model - it is billed on read/write operation (in on-demand mode) and per amount of data stored.
Is DynamoDB highly available?
Yes, DynamoDB is both highly available, scalable, and distributed data store. It achieves that by sharding your data over dozens of servers across Availability Zones and does that automatically for you without your intervention. Moreover, you can use it in a multi-region fashion using global tables.
Is DynamoDB columnar database?
No. If you’re looking for a columnar database, consider using Redshift.
Can I use DynamoDB to store relational data?
Yes! You can either use multiple DynamoDB tables to keep entities in a separate tables like in AWS Amplify, or use Single-Table Design where all the entities are stored in one a table in a smart way.
When to use DynamoDB vs S3?
While S3 is object storage, DynamoDB is NoSQL database. S3 is more suitable for storing large files durably while DynamoDB is rather Key-Value store optimized for huge amount of data and concurrent operations. A typical example on when to use DynamoDB vs S3 is profile data. While DynamoDB is perfect for storing metadata, such as nickname, email, registration date, S3 is perfect for storing users' avatar images and store a link to that S3 Object in the DynamoDB table.
Does DynamoDB support atomic updates?
Yes, DynamoDB like many other databases support transactions. With TransactGetItems and TransactWriteItems you can read/write up to 25 items per transaction.
Is DynamoDB eventually consistent?
There are two modes that user can use when working with DynamoDB:
- Strong Consistency (Read-after-Write)
- Eventual Consistency
While Strongly Consistent reads are pricier, they are guaranteed to return the most recent data. They can also fail from time to time.
Which AWS regions support DynamoDB?
DynamoDB is available in the following 19 regions:
- US East (Ohio) us-east-2
- US East (N. Virginia) us-east-1
- US West (N. California) us-west-1
- US West (Oregon) us-west-2
- Asia Pacific (Hong Kong) ap-east-1
- Asia Pacific (Mumbai) ap-south-1
- Asia Pacific (Osaka-Local) ap-northeast-3
- Asia Pacific (Seoul) ap-northeast-2
- Asia Pacific (Singapore) ap-southeast-1
- Asia Pacific (Sydney) ap-southeast-2
- Asia Pacific (Tokyo) ap-northeast-1
- Canada (Central) ca-central-1
- Europe (Frankfurt) eu-central-1
- Europe (Ireland) eu-west-1
- Europe (London) eu-west-2
- Europe (Paris) eu-west-3
- Europe (Stockholm) eu-north-1
- Middle East (Bahrain) me-south-1
- South America (São Paulo) sa-east-1
Is DynamoDB a memory store?
While DynamoDB is not in-memory store, DynamoDB Accelerator (DAX) is an in-memory cache supplementing DynamoDB tables that delivers fast read performance for your tables at scale by enabling you to use a fully managed in-memory cache.
How to Add a Column in DynamoDB?
DynamoDB doesn't have a concept of columns. Each item consists of a Key and the attributes. Because it's a NoSQL database and doesn't have a strict schema, each item can have a different set of attributes, you can write whatever you like in each operation. If you want to add an attribute to the item, simply add it just like you add a property to an object.
© 2022 Dynobase