RSS Feed

Where Does the Business Logic Go?


September 29, 2009 by Mike Hillwig

A few years ago, when I was at the utility company, we were implementing the new customer management system. This was the first time I had ever seen a system that implemented all of the business logic in the database. Most of my experience was with the logic being on the client application.

Which one is better? I really don’t know.

In the case of the utility company, the system was new, and this was one of the first large implementations of the application. We were rolling out changes almost nightly. If we would have to have upgraded the client nightly, it would have been a pain. Instead, we applied it to a single database server, and the business logic was taken care of.

At my last company, all of the business logic was in the client application, and rolling out a service pack or hot fix to the application was a pain. Not only would our hundreds of Boston users have to be upgraded, but we’d have to upgrade our Citrix servers as well. As well as we’d plan it, it was never as easy as one might hope.

In my current company, we don’t have serious desktop management, and our ERP system has business logic in both places. We could upgrade the desktops in a few hours if necessary. Most of heavy lifting is fortunately done in the database. This thing has nested stored procedures several layers deep.

Our document management system, on the other hand would be a nightmare. All of the business logic is done by the desktop application. And it’s installed all over the company. I cringe at the thought of customizing that application. Fortunately, we haven’t had to.

I go back to the question of where the business logic should live? I like having it in the database because then I can control it. It typically makes patching easier. At the same time, it’s  a performance hit. There are more stored procedures and triggers. And yet, my database servers are typically more powerful than user laptops.

I have a feeling this is almost a religious debate, and we’ll never have a “right” answer. Your comments should be interesting, and I look forward to reading them.


  1. Mladen says:

    for me it’s a pretty simple answer.
    the data logic goes into the db
    the app logic goes out of the db.

    data logic is logic to keep data consistent because data is always accessed from multiple sources.
    app logic is doing weird business stuff with that data.

    data logic would be unique mail address.
    app logic would be person can have only 1 main mail since in other apps accessing the same data this may not be so.

  2. Graciela says:

    I missed the Pre-Con due to work but atdtened on Saturday. Buck Woody’s keynote was superb as was the opportunity to meet some vendors. A great day and hopefully more UK SQLSaturdays will be organised. The demand is definitely there.

  3. I’ve been reading Marcus’ ebook and it is fantastic, I hope to be at one of the future conferences he does. Thank you for the other tips, I will be subscribing to your posts via email, this is great stuff.

  4. Satte upp ett helt nytt inlägg där vi kan diskutera här, men jag har några följdfrågor:1. Så här många olika källor, vad tycker du om dem? De är sunnitiska hela högen.2. Vad skulle du tycka om en person som sårade, angrep och attackerade en dam, som var vår Profets dotter? Ni brukar ju ta illa upp när Aisha blir angripen, är det inte värre att angripa Profetens kött och blod?3. Vems sida tycker du man ska välja? Profetens eller hans vänners?

  5. I keep listening to the reports speak about receiving free online grant applications so I have been looking around for the top site to get one. Could you tell me please, where could i get some?

  6. Some genuinely wondrous work on behalf of the owner of this site, dead outstanding written content.

  7. this content says:

    Fantastic goods from you, man. I have have in mind your stuff prior to and you are just extremely magnificent. I really like what you have got right here, really like what you are saying and the best way in which you assert it. You are making it enjoyable and you continue to take care of to keep it sensible. I can not wait to learn much more from you. That is really a terrific website.

  8. Hi, I think your blog might be having browser compatibility issues. When I look at your blog in Opera, it looks fine but when opening in Internet Explorer, it has some overlapping. I just wanted to give you a quick heads up! Other then that, awesome blog!

  9. Hello.This post was really remarkable, particularly because I was searching for thoughts on this subject last week.

Leave a Reply

Your email address will not be published. Required fields are marked *