Question

Am I correct to assume that nested dictionaries are not supported in aws simpledb? Should I just serialize everything into json and push to the database?

For example,

test = dict(company='test company', users={'username':'joe', 'password': 'test'})

This returns test with keys of 'company' and 'users', however 'users' just represents a string..

Was it helpful?

Solution

Simply, YES, SimpleDB provides only first level of keys.

So if you want to store data with higher level of key nesting, you will have to serialize the data to a string and you will not have simple select commands to make queries, using deeper nested data (you will be given to test it as a string, but will not have simple access to subkey values).

Note, that one key (in one record) handles storing multiple values, but this is sort of list (often used to store multiple tags), but not a dictionary.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top