开发者

Abstracting DB away from applications

I have a database that is accessed by several Java applications. I want to enca开发者_开发问答psulate the DB away from the applications, so that whenever there is a change in the DB schema, the changes that need to be done in the applications are trivial.

What kind of technology is best to implement this?

A solution I can think of is using an ORM tool like Hibernate but this is done at the application, not at the DB. I want the DB itself to be abstracted away from the applications.


One possible solution is to be a layer of views on top of your tables. Then you can make sure that this layer keeps compatibility for the calling applications.

This is easily done for clients that only read data.

Clients that write data will need another mechanism, stored procedure for examples. In the end, the goal is to create a configurable layer on top of the tables using either procedures or views.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜