Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is there any folder like hierarchy in Amazon DynamoDB

I am a new user to Amazon DynamoDB, when I use DynamoDB, I found that I can only create tables, but not databases (Like the databases in MySQL).
Is there any folder or database like hierarchy system in Amazon DynamoDB, so that I can put a set of tables into one folder (or databases) in order to make the DynamoDB well organized ?

like image 218
Vector Lee Avatar asked Oct 31 '25 19:10

Vector Lee


1 Answers

There is not this kind of hierarchy in DynamoDB itself. Anyway, if it's suitable for your purpose, you could set up the table name like "$foldername_$tablename". It is quite easy if you manage the tables in an automated manner, but I see it can be a pain if you need to do this manually.

Eg:

from boto.dynamodb2 import connect_to_region
from boto.dynamodb2.table import Table

users_table = Table(user+'_'+table_name,  # <---this is what I mean
                        connection = connect_to_region(db_region,
                        aws_access_key_id=id,
                        aws_secret_access_key=key))
like image 156
matteo Avatar answered Nov 03 '25 11:11

matteo