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

  • SEARCH
  • Home
  • 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 57621
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 10, 20262026-05-10T17:43:12+00:00 2026-05-10T17:43:12+00:00

We are designing a Payroll Generation System for a client. The organization we are

  • 0

We are designing a Payroll Generation System for a client.

The organization we are targeting has a hierarchy as follows: Company -> Cluster -> Business Unit (BU) -> Department -> Employee

The salary for an employee is made up of various salary components. Each salary component has 3 rules associated with it, a Calculation Rule (Calculate component as % of another component, or % of a fixed number or a fixed number), an Eligibility Rule (whether an Employee/Dept is eligible for a component) and a Constraint Rule which limits tha max and min of a component.

****These rules are editable and can be edited by a user end user**. Also these rules are inherited top-down, but if defined at a lower level, the lower level rule takes precedence.**

We have a database which has Attendance, Leaves, Bonuses tables and these rules are also supposed to interact with these tables.

The client will be generating payroll for multiple clients each hosting a Separate Database instance. They may each have a different interpretation of each component and may have different components.

We are only looking to support SQL Server, and payroll generation will be an offline activity.

We are divided upon where to put the logic which uses these rules to generate the individual tax components (which will include Tax Deductions, Tax Write-offs, Allowances, etc).

Some people are advocating magic SPs which will take an employee Id and generate a payroll for that month. Others want the logic to be split into separate components which will get the dependent data for an employee in the application layer and calculate these components there.

The order of our priorities are: 1. The ability to adapt changes to new clients quickly 2. Long term maintainability 3. Performance

1 and 2 outweigh 3 here by a large factor as this will be an offline activity.

Maintainability and Quick Customizability are very important, we will be deploying the application for different clients. Client A may have a Salary Component Rule as ((0.3 * Basic) + 800) and Client B as (0.2 * Basic) + (0.1 * Atendance Bonus)

Will SPs cause a mess here, as the rules suggested above will be specified by the end user and will need to be customizable through a web UI. We will have to parse the formulas from SQL. How difficult or easy will it be? What advantage will doing this in the Application Layer (C# .Net) have over using SPs?

The original post is here: Design Hints, Payroll System…repost …but none of the questions were properly answered.

Suggestions and pointers to existing systems’ architecture will be very helpful. …and yes, we are using LINQ to SQL elsewhere in the system.

Kind regards, Ashish Sharma

  • 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. 2026-05-10T17:43:12+00:00Added an answer on May 10, 2026 at 5:43 pm

    I always try to shy away from putting business logic in the DB layer. It is more difficult to write, debug and maintain. In addition, the DB is generally the most expensive layer to scale. If you end up needing to beef up your system to support more users it is relatively cheap and easy to add new webservers to a system, but adding DB instances becomes expensive as each DB requires a license and additional support.

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

Sidebar

Ask A Question

Stats

  • Questions 181k
  • Answers 181k
  • Best Answers 0
  • User 1
  • Popular
  • Answers
  • Editorial Team

    How to approach applying for a job at a company ...

    • 7 Answers
  • Editorial Team

    What is a programmer’s life like?

    • 5 Answers
  • Editorial Team

    How to handle personal stress caused by utterly incompetent and ...

    • 5 Answers
  • Editorial Team
    Editorial Team added an answer The main issue i think is that you are calling… May 12, 2026 at 4:12 pm
  • Editorial Team
    Editorial Team added an answer This will get you up to 100,000 days: SELECT DATEADD(d,… May 12, 2026 at 4:12 pm
  • Editorial Team
    Editorial Team added an answer You may use C99 variadic macros: #define my_printf(...) my_printf_(x, __VA_ARGS__)… May 12, 2026 at 4:12 pm

Related Questions

We are designing a survey application with the following features The users will be
We are designing a new database and I would like some input in where
We are designing a web site and have run into some UI challenges that
We are designing a client/server program and I need some help with a design

Trending Tags

analytics british company computer developers django employee employer english facebook french google interview javascript language life php programmer programs salary

Top Members

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.