Choosing database RRS feed

  • Question

  • I'm having a rough time deciding which DBMS to use.

    I'm building a small Windows Application and I needed the database to be a local file, just like MsAccess (.mdb). But at the same time I need this to be secure so that only the software can modify the data in this file.

    And I'm not sure whether MsAccess gives you that safety... but then, it's the only DBMS that I know that can be stored locally...

    And this application is not big enough to deserve a whole SQL Server installation for each because it will have only two tables without any relation... I'd need a DBMS for primary key control and select/update/delete...
    I've also considered an xml configuration fille but that would give much more trouble for controling everything and there is also the security problem...

    Thanks for the help!
    Monday, July 2, 2007 6:12 PM

All replies

  • How mcuh data are we talking about?

    Why not just serialize a dataset or an object graph back and forth to the disk?

    Monday, July 2, 2007 8:07 PM
  • Dude... seriously you should consider SQL Server Compact Edition



    It runs in-process, is very light weight and powerful.  And includes synchronization support.



    Tuesday, July 3, 2007 4:53 PM
  • You got me.

    That sounds good but I've never done anything like that... care to point me at some good references?

    The ammount of data will be really small... usually 1~50 records... but could grow up to 500 (very unlikely but still possible)
    Tuesday, July 3, 2007 5:25 PM
  • Here's a link on howto save the dataset:


    Tuesday, July 3, 2007 5:52 PM
  • Thanks a lot for you suggestions people!

    I'll be doing some tests and I'll be back soon with some feedback :]
    Wednesday, July 4, 2007 11:21 AM
  • If you go for the SQL Server Compact option, don't forget to check for licensing issues if you need replication/synchronization.


    As Lowendahl suggested, a DataSet migth be a nice option if it's not too much data and you need most of it most of the time. Using the Visual Studio DataSet designer you even get a nice ORM-like access to your data.

    Thursday, July 5, 2007 11:58 PM
  • I'd look at SQL Express, embrace the stored procedure Wink Maybe(?!) overkill for 2 tables though but I do enjoy the stored procedure.

    Monday, July 9, 2007 9:19 PM
  • I haven't used either of them (Compact or Express) but, from the specifications I'd use Compact in this case. And use a Data Access Layer to handle the relational <-> object marshaling.
    Monday, July 9, 2007 10:41 PM
  • From your description I am not sure why you would use a database at all
    You might have a simpler solution by having all your information in memory and just serializing/deserializing objects to disk
    If you feel you need the transactional behavior that a OODB like http://www.db4o.com/ would probably do the trick

    Tuesday, July 10, 2007 6:29 PM
  • I'd consider a database for it's transactional (ACID) properties. You could do that with transactional files as well but Compact Edition is so easy and inexpensive I'd rather rely on it doing a good job at such things rather than rolling my own. (Or Express to use stored proceduresWink )
    Wednesday, July 11, 2007 9:12 AM
  • I agree with Ron, SQL compact or SQL Express. It is small, lightwieght, full of features and always ready to scale. Datasets are ok, but why bother writing all the persistence and consistency code when it is so much easier to write against  a database.
    Sunday, July 15, 2007 10:25 PM