Geo Location, Spatial Searches, and RavenDB
Join the DZone community and get the full member experience.Join For Free
i mentioned in the previous post that the data is coming in a highly relational format, and that the maxmind advice is to not load this into a relational database, because then queries take a long time. instead, they have their own efficient binary format.
i decided to put this into ravendb, and that brought the question, how are we actually going to work with this? how do we model the data?
in our code, we defined the following, which i guess would pretty closely match how you model the data in a relational database:
in this case, we are actually storing the whole thing as a single entry, like so:
this allows us to query things efficiently and easily. but before we can get there, we need to actually load the data in, which is the topic of my next post.
Published at DZone with permission of Oren Eini, DZone MVB. See the original article here.
Opinions expressed by DZone contributors are their own.