Simon Green's Developer Blog
Developing .NET in the cold white north ...

NHibernate VistaDB Driver and Dialect

Friday, 7 December 2007 13:35 by Simon

Well, I finally got a bit of spare time and published the NHibernate driver and dialect for VistaDB as a CodePlex project.

As I mentioned in my previous blog entry, VistaDB is really useful even if you only use it during unit testing.

The really great thing about it though is that you can do normal database / NHibernate development and have a simple XCopy deployment which makes application demos very easy (complicated installs and configurations are often a barrier to evaluation and possible sales). Depending on your application and the usage that it gets VistaDB may or may not be up to the task of handling the persistence for the full deployment (it is a file-based database although a proper server version is on the way). With NHibernate though this isn't a worry as the customer is free to use any of the other supported database engines for the deployed version.

I intend to update a forum application I wrote a number of years ago to the new ASP.NET MVC about to be release and use the VistaDB database during development. The current SQL Server database is fairly large (about 4Gb) and has well over 2.5 million posts on it so it should give it a good test - I will let you know how I get on with it.


Tags:   , , ,
Categories:   .NET
Actions:   E-mail | del.icio.us | Permalink | Comments (1) | Comment RSSRSS comment feed

Using VistaDB for unit testing (even if you target SQL Server)

Wednesday, 21 November 2007 16:06 by Simon

In case you aren't familiar with it, VistaDB is a lightweight, embedded database engine written entirely in managed code. It is a fantastic product that is coming on in leaps and bounds. Their aim is to be fully SQL compatible with SQL Server and are even adding support for TSQL.

I've used in on a few of my own projects and have been very impressed (I have a forum application with a 4Gb SQL Server database and approximately 2.5 million posts that I have just started converting to use it).

Even if you decide that you don't need it though it may still be worth looking at for testing purposes.

The client project I'm currently working on uses NHibernate for the persistence layer. Having developed an NHibernate Dialect and Driver for VistaDB (which I need to publish!) we've been able to use this when running unit tests. Instead of having to setup databases we can just create an in-memory database for use by the unit tests which is destroyed when they are finished. It is quick, convenient and avoids a lot of dependency issues PLUS it runs Linux / MONO (our app is cross platform).

 


Tags:   , ,
Categories:   .NET | Build
Actions:   E-mail | del.icio.us | Permalink | Comments (0) | Comment RSSRSS comment feed

VistaDB Driver and Dialect for NHibernate

Sunday, 3 July 2005 16:12 by Simon

I've just started work on a VistaDB driver and dialect for NHibernate.

NHibernate is an excellent OR/M (Object Relational Mapping) Object Persistence framework for .NET and VistaDB is an embedded database designed to server as a replacement to Microsoft JET/ MSDE and Borland BDE.

Putting the two together should enable easy xcopy deployment of applications with practically no configuration, something especially useful for people evaluating an application, while still allowing the backend database to be replaced with something more heavy-duty if required and available (such as SQL Server or Oracle).

I have the main functionality working (saving and loading objects) although due to the way that identity columns work in VistaDB I have needed to change a line in NHibernate to support it (hopefully will be accepted as it does not effect any other drivers).

The next step is to ensure all the data-types are mapped to the correct (and supported) types in VistaDB and also to make sure the NHibernate NUnit tests run ok.

 

Tags:   , ,
Categories:   .NET
Actions:   E-mail | del.icio.us | Permalink | Comments (0) | Comment RSSRSS comment feed