Fog Creek Software
Discussion Board




Data Storage Question

Hi everybody.
I have a big design question. I am developing an microsoft windows application with .net. This is a stand alone application that someone will by from a store and install on their home computer and PDA. My problem is Data storage.
I can't decide on the best way to store the data they save. 
The application will be doing some work with the data they enter like reports and searches. So eventually they will end up with lots of data.

Greg
Friday, February 06, 2004

Probably the best method would be to use a relational database.  Since you are going to be using .NET, I would consider using Access (an .MDB file) and ADO.NET.

If OTOH your record structure is very simple, then perhaps a straight flat file would do.

Dave B.
Friday, February 06, 2004

Thank you very much. It's a pretty complex db with look up tables etc. The db will probably have atleast 20-30 tables.
I forgot to other criteria for my data storage.
1) I would like it to be transparent to the user.

2) I want to prevent the user from being able to see my database at all. I don't care if they can see the file but I don't want them to be able see the table structure or data.

Greg
Friday, February 06, 2004

MDB files are transparent to the user.  Your application is the abstraction layer.  Take CityDesk for instance, interacting with the database is not necessary except for backup and compact/repair operations.  In which case the user only knows that they are backing up a file.

It is possible to encrypt and set a password on an MDB file.  This will prevent casual users from obtaining your database schema. 

You can put whatever extension you like on an Access file.  It does not have to be .MDB.  When you install your application you register this extension so Windows recognizes it and enables users to start your application by clicking on the data file.  Of course you don't want to select a popular or common extension that may already be in use.

It may also not be to your benefit to hide your database schema.  Exposing it can allow third parties to develop useful utilities that will help your end users and strengthen your product.

Dave B.
Friday, February 06, 2004

I hate to sound like a broken record, but iAnywhere product's SQL ASA product works great in mobile/embedded situations.  www.ianywhere.com

MR
Saturday, February 07, 2004

Hi all.
I just wonder if it is the great Greg Tavares who is asking the question?
Anyways I don't know much about .net
But In Basic I use to store data is string location (hep)
It is a great mean, because you got the address of the location and you can change the storage whenever you want.

Victor
Saturday, February 07, 2004

Nope I am not Greg Tavares :)

Greg
Saturday, February 07, 2004

Hi,

I would use an MDB as stated before but beware that it is very easy to open MDBs secured with a password (Google "lost password").

Also, as soon as you open a connection to the file/database, mdac creates the ldb file in the same directory exposing to everyone that your file is an Access database (no matter that you changed the extension).

One way around this is copying your file to the temp folder at startup/open file and open a connection to that folder. Once more is security by obscurity, not too safe.

Finally you could try encrypting the important info in the tables (adds another barrier to the not so determined cracker).

Hope this helps.

BD

BD
Saturday, February 07, 2004

>  I don't care if they can see the file but I don't want them to be able see the table structure or data

Why not?  Are you concerned about the competition stealing your schema?  Unless you're doing something really clever, it's probably not worth worrying about.

Brian
Saturday, February 07, 2004

Yeh I want to hide it because while it's not a completely new Idea my idea will greatly improve the usability and functionality.

Greg
Sunday, February 08, 2004

*  Recent Topics

*  Fog Creek Home