views:

165

answers:

5

I have an iPhone application that emails my GPS coordinates to an email account.

I have some code (here) that I'm using to search that account for emails that contain the GPS coordinates.

I wanted a Windows Forms application that would allow me to store the date, time, latitude, longitude and res information of the emails into some sort of rudimentary database that would just be either part of the program or just a file that accompanied the program.

I could probably use a CSV file but I wanted to do things the right way so I'll put it before the court of better programmers.

What is the best way to store this data to be queried against later?

Some ideas are to make a heat map of how often a certain location is occupied. Another idea is to create a path of "bread crumbs" that I can use later.

Thanks for any advice you can give.

+5  A: 

If you don't want a full fledged database server, I'd recommend using SQLite.

Travis Collins
does sqllite need to run on the client machine?I would eventally like to role this into other applications as well
Crash893
You add a reference to the SQLite dll file, so that it will get included when you build.
Travis Collins
+2  A: 

You can use SQLite and store the data for each GPS fix you get. Then you can use normal SQL queries to combine and slice the data in what ever ways you want. SQLite can be used from with in an iPhone app as well as .net languages, so you can store the data directly to a SQLite database on your iPhone instead of emailing the data then searching the emails.

Jared
+2  A: 

It sounds like you just need one database table. Nothing really fancy.

The date and time you would store as a DateTime object. I would then you could query against it.

David Basarab
+2  A: 

You might want to look at using an XML file. It is not a database but it is certainly more structured than using a CSV file.

To access the XML from a .NET application is simple with LINQ To XML.

The performance of XML I would assume is not as good as a database but for a small amount of data it probably doesn't matter.

How much data are you planning on storing?

I don't know which is better (SQLite or XML) but I just wanted to throw out another option.

orandov
+1  A: 

SQL Server embedded edition is an alternative.

Free, puts the database in a single file.

Meant for mobile apps, but alot of WinForm apps use it for local storage when there isn't a database server.

pearcewg
do i need sql server running on the machine if i use something like this?
Crash893
nope, it is a single file, no server or services. just the framework.
pearcewg