views:

145

answers:

6

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!

+6  A: 

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. :)

JP Alioto
Good ref to System.Data.SQLite. I still vote for checking out VistaDB as a potential alternative (see my answer)
galaktor
Is it supported by the ADO.NET Entity Framework?
marc_s
Not sure if you mean VistaDB or SQLite, but concerning VistaDB: yes. See http://www.vistadb.net/vistadb3/sample-code.aspx
galaktor
+3  A: 

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).

Henri
+2  A: 

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.

galaktor
+2  A: 

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.

Nick Craver
+2  A: 

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.

klabranche
A: 

I'd also vote for VistaDB 3 as it's so easy to deploy.

Dan Diplo
Next time you could also just up-vote the answer you agree with and add a comment. It would have done my rep some good ;)
galaktor
Fair point - done!
Dan Diplo
Thank you, Dan :)
galaktor