Flat NoSQL Firebase Data on Drill-Down Table -


i'm trying transition core data firebase can expand application beyond ios. i'm trying wrap brain around structuring data and, know subjective, i'm hoping on feedback experts:

let's have 10,000 record database want able drill-down in table view of locations. each location may or may not have sub-headings. i'm considering structuring data follows:

"locations": {   "t774": {     "title": "usa",     "subline": "no"   },   "t775": {     "title": "canada",     "subline": "no"   },   "t776": {     "title": "mexico",     "subline": "no"   },   "t777": {     "title": "north carolina",     "subline": "usa"   },   "t4323": {     "title": "south carolina",     "subline": "usa"   },   "t4354": {     "title": "raleigh",     "subline": "usa north carolina"   },   "t4383": {     "title": "charlotte",     "subline": "usa north carolina"   },   "t4384": {     "title": "ontario",     "subline": "canada"   },   "t3802": {     "title": "nova scotia",     "subline": "canada"   },   "t4395": {     "title": "halifax",     "subline": "canada nova scotia"   },   "t4396": {     "title": "colima",     "subline": "mexico"   },   "t4398": {     "title": "manzanillo",     "subline": "mexico colima"   } } 

and table view load initial firebase query of blah.blah.queryequal(tovalue: "no"), filter top locations have sublime of "no". then, when user clicks on location, location name added query, example if usa selected, query updated blah.blah.queryequal(tovalue: "usa"). , if north carolina selected query updated blah.blah.queryequal(tovalue: "usa north carolina")

this method appears work (though haven't tried 10,000 records, few dozen, before commit structure hoping comment, yay or no, on proceeding in style. perhaps there better way , can't take off core data glasses quick enough?


Comments

Popular posts from this blog

node.js - Node js - Trying to send POST request, but it is not loading javascript content -

javascript - Replicate keyboard event with html button -

javascript - Web audio api 5.1 surround example not working in firefox -