I didn't look super closely, but it looks like your database works similarly to DynamoDB, in which case it could use similar data modeling. Here is a great post on single table design for DynamoDB that would probably be mostly applicable here:
https://www.alexdebrie.com/posts/dynamodb-single-table/
The post author actually wrote an entire book on data modeling with a single key/value table.
Yep, that's the idea. If you had a user with ID 1, one scheme to get all her info could be storing attributes in keys such as:
Then a prefix search for "user:1:" would get you the relevant keys for that user.But you could also go another way and drop a JSON-encoded object in a single key and work with it inside your app, since that might be the fastest way to get something off the ground!