@portapipe wrote:
Hi everyone.
I'm going to use NoSQL database for a huge project but I've worked since 2002 with SQL databases so I'm quite "closed" about this kind of things.I have a quite complex data tree and I'm wondering how to flat the data structure to make it work well and fast, even with millions of data loaded.
That's the data part I'm worried about:
registered users can post things in the app. Latitude and longitude is saved into Firebase. A category and the creation data too.
Now.
I need to make a "query" like "SELECT * FROM posts WHERE category = {category} AND latitude > {latBig} AND latitude < {latSmall} AND (same for longitude) ORDER BY date DESC"I know that I need to make indexes to make the JSON work well but I'm stuck here because there are lots of things to check.
My idea was to make posts as always, plus add an indexes of categories (they're just 10 so it's not so hard to make).
The user can filter things based on categories and/or position (posts near him) and THIS is the hard part.QUESTION (finally):
How can I get just the last 100 created post near me of a specific category?DOUBT:
Get all the posts based on data should be reeeeeeally heavy for the system or not?
In SQL less fetch data = more speed.
In NoSQL is that the same? Because I've read about no issue on getting so much data in a single call but It's the opposite of what I've learned and used since now so I'm a little bit scared to make a complex app based on a service that I have to change in the futureThanks for all the tips you're going to tell me. It's important for me to have all clear before touch a single line of code.
Posts: 12
Participants: 2