Client-side database with Silverlight?

I’ve seen some discussion threads about doing things like putting VistaDb (a 100% managed code database) into a Silverlight app. Most of this was wishful thinking, IMHO. If you are going to put a database into a Silverlight app, obviously the data file(s) need to go in IsolatedStorage. So that’s one hurdle – handling file access. And VistaDb is kind of on the large side for inclusion in a Silverlight app that’s designed to download into the browser.

I took a look at SharpHsql, which a much simpler managed – code database effort that has had its ups and downs since being ported from the JAVA implementation.  I tried ripping out the Provider (which depends on System.Data – not present in Silverlight Framework) and thought I was making progress, but then I saw that there were still too many other dependencies on stuff from the full Framework that just isn’t there in Silverlight, so I gave up for now.

However, I still think this is an idea that has merit. Think of a notetaking app that you could run locally off Cassini or IIS, that used a database to store your stuff on the client. You could even LINQ-ify it. Then, you could sync your stuff through a WCF service to a central SQL Server database running on a website somewhere.

One thing SharpHSQL has in it is some very good routines for parsing textual SQL – that could be used to save a lot of time on writing a new one that’s more Silverlight – friendly.

I think it’s got some real potential – after all, you have up to 1MB of IsolatedStorage to work with. Just thought I’d throw it out as an idea.  Ah, well – maybe my Tweeter is just over capacity with too many Twits. Who knows? We could always go back to these:

card-90col

Comments

  1. Anonymous7:36 PM

    what about sqlite or sql any where?

    ReplyDelete
  2. SQLite cannot be ported to Silverlight because it is native C++ (or in the case of ADO.NET SQLite provider, a mixed mode assembly). Same with SQL Server Compact 3.5.

    ReplyDelete
  3. Anonymous10:12 AM

    use Gears

    ReplyDelete
  4. Can't do it. Gears isn't managed code - its SQLite, and you cannot build it into a Silverlight application.

    ReplyDelete
  5. Anonymous3:34 PM

    Maybe we can use Bamboo.Prevalence(http://bbooprevalence.sourceforge.net/)

    ReplyDelete
  6. You know what? I completely forgot about that. Here's an article I wrote:
    http://www.eggheadcafe.com/articles/20031028.asp

    ReplyDelete
  7. Anonymous5:30 PM

    Peter,
    Solution on this was just released.
    Siaqodb is Silverlight client-side database that you can save an object with just one line of code and retrieve back objects stored via LINQ just by reference an assembly of 87KB as size. For more info take a look on http://siaqodb.com

    ReplyDelete
  8. Anonymous12:39 AM

    Try EffiProz Silverlight embedded database. Written Entirely in C# and comes with ADO.NET style provider http://www.effiproz.com/product_sl.aspx

    ReplyDelete
  9. Peter Bromberg

    This is a good LINQ provider for VistaDB.
    https://www.kellermansoftware.com/p-47-net-data-access-layer.aspx

    ReplyDelete

Post a Comment

Popular posts from this blog

ASP.NET: Loss of Session / Cookies with Frames

Effectively Promoting your Blog (or WebSite)