简体   繁体   中英

Alternative to SQL Server for a simple web app

I have a simple app written using SQL Server, Entity Framework, C# and WCF. When I wanted to share this app with my friends, I realised they didn't use SQL Server on their machine. I could go for SQL Server Express edition, as the usage of my app is personal and non-commercial.

I found MySQL as a popular alternative to SQL Server.

1) Would I be required to update my entities when moving to MySQL?

2) Should I anticipate code changes in my BL layer due to change in entities layer? (I am wondering whether entities was built for SQL Server)

Are there any databases similar to MS Access that is lightweight compared to MySQL?

Are there any databases that need not be installed but can be copied around like MS Access?

Appreciate your response!

Sounds like you want SQLite .

SQLite is a software library that implements a self-contained, serverless, zero-configuration, transactional SQL database engine.

Very easy to deploy. Also, check out System.Data.SQLite .

According to the System.Data.SQLite page ...

Supports nearly all the entity framework functionality that Sql Server supports, and passes 99% of the tests in MS's EFQuerySamples demo application.

You should be good. :)

Im not sure how your BLL looks like and i have no experience with entity framework, but ive experienced multiple times that linq-to-sql works much better with sql-server as with any other database.

So unless you have a good reason not to use sql express, i'd advice to stick to sql express.

After all, you should always install something when deploying (unless you use xml as storage, which is quite well possible with linq-to-xml).

VistaDB Express Edition is also free for non-commercial usage and integrates good into .NET and VS. afaik it also works on a single local data file thus requires no specific installation on your friends' computers.

Otherwise I recommend using PostgreSQL over MySql since it is more standards compliant and has a nicer license.

I think what you're after is just a change in providers. What you need to use MySQL is the .Net Connector which supports most everything simple. It's not very mature yet so something very complex you may have issues on, but it should do most of what you want through Entity Framework.

With Entity Framework yes you can do updates, it's LINQ-to-SQL that doesn't update against any other databases (unless you use a third party provider like DotConnect )

SQLite is one alternative, but since multiple threads against it can cause major issues with it's operation, so if you need a major data store I'd go SQLExpress or MySQL.

Yes, you could use MySql with EF but I don't know if it would require changes.... I wouldn't be surprised if it does though. At the very least your physical DB would have to be ported / converted to MySql and that will take time.

I would assume that if you need to install a DB on your friends Pc's why not stick with SQL Express since you already developed in SQL Server on your box. Should be less issues with this than migrating to MySql.

我也投票支持VistaDB 3,因为它易于部署。

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM