tags:

views:

79

answers:

2

All RDBMSs support the ALTER TABLE command, which allows administrators to add new columns to tables, or to change the types of existing columns.

I am looking for such a runtime schema evolution function in .Net ORM. I have scanned a few ORM frameworks, and I cannot find an intuitive solution to such an evolution. The closest is OpenAccess (http://www.telerik.com/products/orm/features.aspx#runtime-changes). In OpenAccess, you may have artificial fields /types, but you use a different way to access them. In other words, they are different from pre-defined properties/classes. This is not I expect and is different from what ALTER Table does.

BTW, Versant Object Database announces that it has the function of DYNAMIC DATABASE SCHEMA EVOLUTION (http://www.versant.com/en_US/products/objectdatabase/index/).

If you find such a framework, or you have some solutions. Please notify me.

Thank you in advance.

Ying

A: 

Have you looked at nhibernate?

DiggyF
Yes, I didn't find such as function.
Ying
+2  A: 

Hi, with Telerik OpenAccess ORM you are able to change the schema on the go, based on your model - so if your model is changed form the one that represents the actual situation in the database, you can just ask the data context for a schema update handler (the entry point via the API) and it will either: a) return a string representing the update script b) you can execute the returned script on the go

Anyways, please take a look (you can download a trial and make support requests during the trial period), as we are also interested in developing this technology further.

Yes, OpenAccess does support schema change, but we have to access the newly generated fields/types in a different way from normal pre-defined ones.
Ying
That is true, but it will be very difficult to do it otherwise as the dynamically added types and fields is something that is not trivial at all. I believe there is a second a bit more straight-forward approach using the metadata container directly (this is the base line for all new APIs that we are adding), but as it is not polished so far for official part of the documentation, you should open a support case with the so that they can provide assistance for that (If your only concern is the API itself used for artificiel types and fields).