Search code examples
ms-accesssqlitejet

Why should I use SQLite over a Jet database


Someone asked me this the other day, and I couldn't think of a good answer. Platform portability is completely irrelevant to the project.

In fact, Jet has some features that SQLite does not, namely foreign keys.

So can anyone think why SQLite should be used instead of a Jet database?


Solution

  • Contrary to what other people are saying, Jet is not dead and far from it: ACE is the new version of Jet and it's pretty robust and backward compatible.

    Both SQLite and Jet/ACE have their strengths and weaknesses and you need to get more information about the specific points that are important to you and your application.

    • In either case you can redistribute the engine.
    • Jet/ACE is a bit more integrated and supported out of the box in MS tools and Visual Studio.
    • Jet/ACE has more granular locking, which may be important if your app allows multi-users or needs multi-threaded access to the database.
    • Jet/ACE has more features in terms of what you would expect from a database (joins, unions and complex queries).
    • Jet/ACE has a simple migration path to SQL Server, so if your database needs become big, you could move to SQL Server fairly easily.
    • SQLite is cross-platform, so if your app needs to be ported to Linux/Mac under Mono then SQLite is a better choice.
    • the SQLite engine is tighter so redistributing may be easier.
    • datatypes are quite loose in SQLite.
    • SQLite has more liberal redistribution rights (since you can basically do whatever you want with it).

    People who say that Jet corrupts databases are stuck in 1995.

    In the end, unless your application has some very specific requirements that are pushing the boundaries of either database engines, then it probably doesn't matter which one you chose.
    Just use the one that easiest for you to include in your project.