Update database structure to allow for multiple users
Closed this issue · 1 comments
michealengland commented
Currently the database structure is very flat as seen below.
ex:
/posts/postKey/post-data
/timelines/timelineKey/timeline-data
Unfortunately, this makes querying per user difficult as every piece of information will need to be checked. Instead, the data structure should look more like the following.
/posts/uid/postKey/post-data
/timelines/uid/timelineKey/timeline-data
Switching to this type of data organization will allow for much quicker read times since we're reading a smaller portion of data.
michealengland commented
This issue was completed in #74, Timelines & Posts now utilize uid
keys to check for data which results in faster lookups and better data organization.