nosql

Firestore NoSql Database Structure (as a n-ary tree)

回眸只為那壹抹淺笑 提交于 2020-08-24 02:35:57
问题 I am developing an app that will offer the possibility to filter the users you search (gender, age, location, ...). I want to make this fast and as cheaper as possible, so I have decided to store my data as a n-ary tree, just something like this: ----- Users ----- Root Node: Gender (male or female) -male --country (nodes: USA, UK, Spain, Germany, France, Italy, ...) ---age (nodes: 18, 19, 20, 21, 22, ..., 60) ->user (leaf nodes) -female --country (nodes: USA, UK, Spain, Germany, France, Italy

Firestore NoSql Database Structure (as a n-ary tree)

五迷三道 提交于 2020-08-24 02:29:49
问题 I am developing an app that will offer the possibility to filter the users you search (gender, age, location, ...). I want to make this fast and as cheaper as possible, so I have decided to store my data as a n-ary tree, just something like this: ----- Users ----- Root Node: Gender (male or female) -male --country (nodes: USA, UK, Spain, Germany, France, Italy, ...) ---age (nodes: 18, 19, 20, 21, 22, ..., 60) ->user (leaf nodes) -female --country (nodes: USA, UK, Spain, Germany, France, Italy