how to transfer business rules to new data base in 3-tire Architecture?
as we know that 3-tire Architecture consist of Presentation tier , business logic and data base tier the business rules (like : stored procedures , triggers ...) are stored in data base开发者_运维技巧 tier , so when we want to replace the data base engine (like ms sqlserver) with new db engine (like oracle) these rules must be transfer to new db engine .
my question is how we can transfer these rules automatically instead of rewrite them for new engine?
The database tier or database itself shouldn't be containing the business logic/rules if you plan to swap database engine. The business logic tier should be encapsulating them instead. :)
model view controller aka mvc pattern.
But you've got the controller and model as one.
So the answer is you can't (unless a tool for converting db's exists that I'm not aware of) because the business logic should not be in the database.
精彩评论