9

I have a Hosting which doesn't support SQL server or any other databse because it is cheap. I know that there are some Dll in which we can add to project and use it as the database.

I wantto know that which one is the best? and is there any other solution to use a database in a Hosting which doesn't support any kind of Database? (don't tell that you can usefile-base database, cause I don't like it)

4
  • Aren't all databases file-based under the hood anyway?
    – BoltClock
    May 25, 2011 at 6:39
  • Presuming they mean not service based. May 25, 2011 at 6:40
  • @BoltClock, yes they are but in behind the sence,You know I'd rader Dll databses May 25, 2011 at 6:41
  • Keep in mind that generally sqlite will not work in medium trust environment, and most shared hosting give you only medium trust.
    – user452699
    Jun 1, 2011 at 14:47

7 Answers 7

12

You could use SQL Server Compact Edition, or SqlLite with a .NET provider (like this one: System.Data.SQLite).

7

Best might be subjective, but Microsoft SQL Server Compact 4.0 or Sqlite

SQL Server Compact Edition 4 was updated to enable:

  • Enabled to work in the medium or partial trust environments in the web servers, and can be easily deployed along with the website to the third party website hosting service providers.
5

FireBird is also a good choice. Read more about it.

What is a good embedded database to use with C#?

2

There is an sql server compact editon if you have no access to a data base server. Also if you host doesn't support databases you can get hosted databases from another provider. Another very popular DBMSless option is Sql light which I have used in c and am sure some one has extended to use in c#.

2

I suggest you Db4o (Database for objects): http://www.db4o.com

It's an object-oriented database and it works like a charm since it store objects instead of tables and rows, that may be a good choice for you as it'll free you of creating a data access layer, object-relational mapping and so.

Anyway, I'll tell you that if you're going to host data for some multi-user application, any of possible solutions would be a bad choice because you'll have great performance issues.

2
  • "any of possible solutions would be a bad choice because you'll have great performance issues." - care to elborate? May 25, 2011 at 6:53
  • "[...] because these are stored in a single file and each thread needs an exclusive lock over the file in order to read and write data [...]" (or, depending on database technology, at least, to write the file). May 25, 2011 at 6:56
2

I would take SQLite over SQL Compact Edition in notime.

So, for small apps, I always go with SQLite.

You have a good (maybe the best) library for C# here as well, you can use a small app to view the database using SQLite Admin

It might interest you:

https://stackoverflow.com/questions/583278/sqlite-vs-sqlce-vs-in-a-mobile-application

and

https://stackoverflow.com/questions/2278104/sql-ce-sqlite-what-are-the-differences-between-them

2
  • 1
    The negative of that: no upward scaling way. Sql Compact you can easily upgrade to use a real server should the need arise.
    – TomTom
    May 25, 2011 at 6:55
  • you can easily use Entity Framework to move stuff from one place to another
    – balexandre
    May 25, 2011 at 7:24
1

I'm using SqlLite and happy with it. It works greatly even in cheapest shared web hostings.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.