?

Log in

No account? Create an account

t3knomanser's Fustian Deposits

.NET ORM

How Random Babbling Becomes Corporate Policy

run the fuck away

Mad science gone horribly, horribly wrong(or right).

.NET ORM

Previous Entry Share Next Entry
run the fuck away
Has anyone worked with any .NET ORM products? NHibernate is looking pretty good and I know people really like its Java cousin, Hibernate- but I'd like to benefit from the experience of others.

The problem I'm trying to solve is this:
I have an Oracle DB. The schema is... complex. More complex than it needs to be. When we can get funding, one of our "todos" is to refactor the schema and make it something easier to access and maintain. In the meantime, there's a new project coming down the pipe that wants me to create an interface between a third-party application and that Oracle DB. Obviously, if we refactor the DB, I don't want to rewrite all of that integration code. Also, I'm pushing to do a full rewrite of the application that sits in-front of this DB anyway (it's in classic ASP). If I get the go-ahead to start that project, I'd like to be able to reuse the code from this integration project.

I want to take the "meet-in-the-middle" approach. I'd like to build the object model for the app-side without thinking about the database. I'd like a lightweight mapper to link that abstract model back to the more concrete database. The big hurdle is the fact that, when the DB schema changes, it will probably be nigh unrecognizable. Keeping the object model and the DB in sync through mapping may be too ambitious.
  • Could you not do this all in the database? Create views on the database which represent the new API, and write your interface code to use those?
  • This is a possibility. But when I say that the database is going to change dramatically, it is really going to change dramatically. Views wouldn't cut it- I'd need to write table-valued-functions and do some PL/SQL wizardry to make it work.

    This is all hypothetical at the moment- the only thing that's certain is that I'm integrating the third-party app. The DB redesign and app rewrite are tentative- at least in the short term. In the long run, they're definitely going to happen- but how long?
  • Also- the changes have to be implemented before the DB schema is designed.
Powered by LiveJournal.com