Why does DynamoDB not just use plain JSON as a data structure?

0

Why does DynamoDB not just use plain JSON as a data structure?

It seems like a very weird interface for anyone to use. I come from Azure CosmosDb and it is just JSON we read and write.

And even AWS published a library afterwards that hides this (their DocumentClient class) but then, why was that the initial decision?

And indeed this is more of a history question, than a development question in itself.

amazon-dynamodb amazon-web-services
2021-11-23 23:51:05
1

0

This question is more or less opinion based unless somebody from the DynamoDB Teams answers this, but there are some misconceptions here:

  • You seem to assume that DynamoDB only supports the data structures that JSON supports, this is incorrect. DynamoDB also supports sets for example, which are not a feature in JSON.
  • The DocumentClient provides a simple (albeit leaky) abstraction on top of this that maps some language specific data types to the underlying DynamoDB data types that usually represent them best. It can make your life easier, but doesn't support all of the underlying capabilities.
2021-11-26 13:49:07

Definitely I was looking for the why they chose that design that is kind of "unnatural". MongoDb (and AZ Cosmos follows the same principle), does allow you to store document naturally (with the one restriction to use the _id field).
Kat Lim Ruiz

DynamoDB supports features that aren't supported by plain JSON, so they chose to enhance JSON with metadata to achieve that, e.g. the SS data type for string sets.
Maurice

In other languages

This page is in other languages

Русский
..................................................................................................................
Italiano
..................................................................................................................
Polski
..................................................................................................................
Română
..................................................................................................................
한국어
..................................................................................................................
हिन्दी
..................................................................................................................
Français
..................................................................................................................
Türk
..................................................................................................................
Česk
..................................................................................................................
Português
..................................................................................................................
ไทย
..................................................................................................................
中文
..................................................................................................................
Español
..................................................................................................................
Slovenský
..................................................................................................................