Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 3331626
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 17, 20262026-05-17T23:36:12+00:00 2026-05-17T23:36:12+00:00

I read Tom Kyte’s Effective Oracle by Design. There he says to write most

  • 0

I read Tom Kyte’s “Effective Oracle by Design”. There he says to write most of the code in the DB itself to reduce application code. It is good in a distributed environment, but is it advantageous in an standalone application also?

My app. is in .NET.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-17T23:36:13+00:00Added an answer on May 17, 2026 at 11:36 pm

    IF your database will only ever support a single application, and IF you never expect the same data to have different use cases depending who is using it, and IF you are never ever planning to use a different storage mechanism… then sure put business logic in the databse.

    However, if any of those are true (as I suspect). Then I, and probably most people on this site, would strongly advise you against going down this path.

    Putting logic in the DB can be seductive as you think “I can change this on the fly!” but it is a maintenance road you don’t want to walk down. Listen to the voice of experience and keep your concerns separate.

    My app. is an standalone Windows app.
    It is an Inventory and Invoicing
    solution. At present, I wrote classes
    containing methods to perform various
    DB operations like Insert, Update and
    Delete. I wonder, if I could write
    stored procedures in the DB itself and
    only pass parameters via .NET
    front-end, what advantage it might
    give?

    This doesn’t actually sound like business logic to me at all, unless of course you are doing something more than just CRUD operations. In that case, then whether or not you use stored procedures, an ORM, or manually generated queries in code is an implementation detail.

    The data access layer should care about connecting to the data storage mechanism, but the rest of your application shouldn’t care. I’ll illustrate with an example:

    public class MyDomainObject
    {
        public String Name {get; set;}
    
        public Boolean IsValid()
        {
            return !String.IsNullOrWhitespace(Name) &&
               DoesNotContainInvalidCharacters(Name);
        }
    }
    
    public class MyDataAccess
    {
        public List<MyDomainObject> GetAll()
        {
            //Some data access logic here
        }
    
        public MyDomainObject GetByName(String name)
        {
            //Some data access logic here
        }
    
        public void Save(MyDomainObject)
        {
            if(MyDomainObject.IsValid)
            {
                //Some data access logic here
            }
        }
    }
    

    So now you have a domain object and a data access object. The domain object enforces some trivial business logic that can be checked via the IsValid property, and the data access layer uses that to determine if it should be saved or not. However, the details of how data is stored don’t really matter to the domain/business layer.

    If you want to refactor to use stored procedures, then your application shouldn’t really care.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Is there a way to emulate a disk drive in .NET, intercepting read/write/lock operations?
I am struggling to write a batch script which can read a CSV file
read the following code: // Creiamo la toolbar sotto UIToolbar *toolbar = [[UIToolbar alloc]
I read have one string like this: $var = '[[tom,10,17.5],[af,13,[x,10,y,12,z,11]]]'; How should I convert
Read about Server push here . I want to push data to client from
Read on before you say this is a duplicate, it's not. (as far as
Read (skimmed enough to get coding) through Erlang Programming and Programming Erlang . One
I read this PHP RegEx page , but either I'm missing something, misreading something,
Having read the threads Is SqlCommand.Dispose enough? and Closing and Disposing a WCF Service
I read somewhere once that the modulus operator is inefficient on small embedded devices

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.