Start a new topic

Hi, how i can to create one latitud and longitude field in one collection?

When i go to create one new column in one collection in one data store, i can only to see one edit where i can to enter the name of the new column. Which type of field i need to create for to save latitud and longitud data?


I need to create other type of columns as date, numbers, how i can to do this and where i can to find documentations for this?


I use embarcadero delphi as kinvey, i understand Delphi uses REST api, where i can to find one REST example as delphi, or if not exists one as Delphi, i need one example of to save and query latitud and longitude values and after i can to show this points in one map as google map for example.


Regards,



Edgar mejia


Hello Edgar,


It seems as though you are somewhat confused as to how data modeling works in Kinvey (which uses MongoDB, a non-relational database system).   There is "no such thing" as rows or columns in Mongo, at least in the conventional sense of the words.  Everything is handled in Json, so if you want to add a longitude, add Longitude:value to your json objects (which can be done via library or rest).


Also, we currently do not support Delphi, the closest we come to Delphi is probably Xamarin, which is considerably far off, unfortunately.


Thanks,

Thank you friend, but how i can to do operations as this database for example for to do one date difference? How i have one master detail tables, i suppose i need to save the id foreign field in my detail table, but how i can to do one query for to join this two tables? Where i can to find one reference manual or tutorials as this type or examples?

Edgar,


We have libraries (http://devcenter.kinvey.com/ios/ for example) where you could pull a record from the Kinvey datastore and compare the _lmt part of the _kmd object to the current time, or the time of another object through standard language functions.


In general you want to "normalize" your data as much as possible in MongoDB, and store things in as few files as you can.   There is no "additional overhead" for Mongo to have EXTREMELY large collections of data (where there is a much larger price to pay with MySql / other relational Databases).  The two articles you could read to get a better understanding of this were written by our CTO Brian Wilson, and are available here:

How to Model Data with Kinvey -- http://www.kinvey.com/blog/3732/data-modeling-in-kinvey

How to Model Data relationships with Kinvey -- http://www.kinvey.com/blog/71/how-to-model-data-relationships-in-your-kinvey-backend


You can find a good amount of source code examples in the guides section of the devcenter link above for the language of your choice.   We deal mostly in Javascript (js, angular, etc), iOS, and Android for libraries.  In the guides, there are sample applications that may also serve useful for you to see how different functions of Kinvey are used and implemented in real-world situations.


Please let me know if you have any additional questions.  


Thanks,

Login or Signup to post a comment