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 7029927
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 28, 20262026-05-28T00:36:10+00:00 2026-05-28T00:36:10+00:00

I am designing a very small relational database for tracking my salaries from different

  • 0

I am designing a very small relational database for tracking my salaries from different jobs. Since I work several jobs and one job the work schedule is almost fixed, being every workday from 9am to 2:30pm and it’s a long term position and I get paid on a monthly basis. The other jobs the schedule is uncertain and quite random, and I get paid by hours.

Here is my dilemma. If I record every hour that I work for all those jobs and the corresponding wage that I get from it, in a single table, then I will have to divide my monthly wage from that fixed schedule job by all the working hours in one month, and it will also mean that there will be a lot of repeating input for that fixed schedule job(e.g. 9am to 10am; 10am to 11am; etc.) with exactly the same values. On the other hand, if I make the payment interval weekly or monthly, it will definitely fit my fixed schedule job but will lose a lot of information that I should keep track of for those non-repeating cycle working hours. I could make two different tables but two different tables will basically record the same class just with differently time intervals, does it sound wise? To add things a little more complicated, I do want to keep track of leaves for my fixed schedule job so tracking it by days instead of months is actually desirable.

Any suggestion here would be highly appreciated. Thanks.

  • 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-28T00:36:11+00:00Added an answer on May 28, 2026 at 12:36 am

    I guess you have two options here:

    1. as you proposed, have two tables, one that captures the adhoc payments and one table that stores the regular (weekly/monthly) payments.
      Advantage here is that nicely split the two types incomes. The disadvantage is that your reporting gets a bit more complicated to program. You always need to add the two tables based on some logic how to distribute the regular payments.

    2. you keep onlyone single table but you distribute the regular payments upon entry across the various days, e.g. if you get $200 for 4 weeks, you’ld create an entry per working day (Assuming 5 days a week) of 10$.

    I personally would go for option 2:
    Create a master table for the regular payments that defines the interval (weekly/monthly,quarterly,etc.) as well as the hours that this payment is for, e.g. 20 hours per month at $100.
    Create one table to capture the actual details, that could then look something like this:
    Date/FromTime/NumberOfHours/Type/AmountEarned/RegularIncomeID

    Type would then define whether it is a regular or an adhoc payment (allows for some sort of reporting details) and RegularIncomeID would be a link to your master table.
    For the regular earned time, I’ld either leave the FromTime empty (probably not good if you plan to keep that field as part of a unique index as some DB systems dont allow NULL values in unique/primary indexes) or enter a default value such as 0AM.

    Option two has the advantage this it makes all your reporting much easier, such as show me hours worked per day for the last 3 months. Try doing this with option 1, probably possible too, but you’ld need to add a lot of programming logic, whereas options 2 would be a simple SQL statement.

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

Sidebar

Related Questions

I am very well versed in the theory and practice of relational database design.
I know a bit about database internals. I've actually implemented a small, simple relational
When designing classes abstract methods can be very helpful. From what I know, Python
Currently I am designing a website and I am finding it VERY difficult to
I'm designing a site. It is in a very early stage, and I have
Designing a new system from scratch. I'll be using the STL to store lists
When designing a database to use MVCC (Multi-Version Concurrency Control), you create tables with
When designing user table what would be the must have fields from the security/user
I have very little experience designing databases, and now I want to create a
I have been working on a small Plagiarism detection engine which uses Idea from

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.