Best database system option that is stored in a file without need of a server?
I'm developing an application in C# (.NET Framework v3.5) and I need to store some tables with relationships between them in a database.
What would a good database system to include in my application and why?
Important: I don't want my client to install a server (like MySQL or SQL Server), unless it is installed with .NET Framework v3.5.
I have been thinkin开发者_运维技巧g about SQLite and Microsoft Access because both store the database in a file instead of a server, but I'm just wondering if there are any other options I have. For example, just for testing purpose, I modeled my database using Entity Framework and I stored it in a .mdf file, and worked fine, but I'm not really sure if SQL Server is required to query/modify/insert info into that .mdf file?
SQL Server CE (compact edition) doesn't require any installation, you just need to deploy the appropriate DLL with your application. The database is stored in a file, no server is needed.
SQLite and SQL Server CE both support the Entity Framework (use this connector for SQLite)
I agree that SQLite is a good choice. It's a powerful, widely used (Firefox, Mac OS, Google Gears, you name it) database in a small package. It's in the public domain, and there's a convenient .NET binding including a ADO.NET provider. I've used it myself in a WinForms application.
SQL Server Compact Edition
精彩评论