New to DynamoDB over here. I need to figure out a DynamoDB schema for different locations inside a building. Additionally, I need to be able to identify computers assigned to each of the locations. The locations are nested inside other locations. For instance,
- Building 1
- Wing A
- Floor 1
- Section A
- Office 1
- Computer A
- Computer B
- Office 2
- Computer A
- Office 1
- Section B
- Office 1
- Section A
- Floor 1
- Wing A
... and so on.
ACCESS PATTERNS:
- Show all of the locations (wings, Floors, sections, etc) in a building
- Show a specific location
- Show all of the computers assigned to a specific location
- Show the location of a specific computer
What I was thinking:
I initially wanted to create something like this:
PartitionKey SortKey Attributes
Building#1 Building#1 (For metadata)
Building#1 Section#1 [...]
Building#1 Section#1|Section#2 [...]
Building#1 Section#1|Section#2|Section#3 [...]
I know this is the wrong way to think about it, but I can't figure out any other way.
What is the best way to model the location of sections, offices, etc of a building?