• norbert.manyi (10/2/2012)


    Take the following example:

    select * from tbl_Users U where U.active = 1 and U.deleted = 0

    It seems that the application owner keeps changing the business logic, so I would like some opinions on how I can make the business logic as separated from the code as possible.

    My first idea (given my coding background) was to create functions to be used like

    select * from tbl_Users U where fn_IsUserActive(U.UserID) = 0 but I don't know about how much that would degrade performance...

    Ps. I understand that this particular example can be done using views, but I'm taking about the situations where you cannot do this. (I just can't find a good example right now)

    How is the application owner changing the business logic? Is the business changing their procedures? Or is more a case of changing SARG values? A little more detail's needed, I think, before we can begin to answer.

    Roland Alexander 
    The Monday Morning DBA 
    There are two means of refuge from the miseries of life: music and cats. ~ Albert Schweitzer