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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 7, 20262026-06-07T08:46:30+00:00 2026-06-07T08:46:30+00:00

I am working on timesheet application and have question on normalization. I have linked

  • 0

I am working on timesheet application and have question on normalization.

I have linked three tables in option-I and in the option-II there is no Group and SubGroup table, just one Activity table.

I like to know which option is better according to the following layout.

enter image description here

enter image description here

ADDED – New Option

enter image description here

  • 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-06-07T08:46:31+00:00Added an answer on June 7, 2026 at 8:46 am

    I would go for a solution with one GROUP table and one ACTIVITY table:

    GROUP_ID (PK)   PARENT_GROUP_ID (FK)   CODE          NAME
    --------------- ---------------------- ------------- ------------
    1               (null)                 4             IT ACTIVITIES
    2               (null)                 5             ADMINISTRATION
    3               (null)                 6             FINANCE
    4               (null)                 7             HR
    5               1                      4.1           IT ADMIN
    6               1                      4.2           IT NETWORK
    7               2                      5.1           MEETING
    
    
    ACTIVITY_ID (PK)   GROUP_ID (FK)  CODE     NAME
    ------------------ -------------- -------- -----------
    1                  5              4.1.1    IT PROC
    2                  5              4.1.2    HELPDESK
    3                  6              4.2.1    TECHNICAL SUPPORT
    (etc)
    

    Each table would use an integer surrogate key (running number) for primary key so you don’t break referential integrity if you have to change the code for a group or an activity. The foreign key on column PARENT_GROUP_ID referrs back to the same table and column GROUP_ID.

    Using a setup like this makes it relatively easy to add more levels in the group hierarchy if that should ever become necessary (and it will, managers always want more detailed reports 🙂 ). I say relatively easy since you might have to go about updating a lot of the group and activity codes. But you would not have to change (for instance) all timesheets referencing a specific activity since they would be referencing the integer surrogate key.

    The same goes for introducing sibling nodes. If you (for instance) need to insert a sub group between 4.2 and 4.3 it will not be too difficult. Just update the code for the current 4.3 group to 4.4 and then insert the new group with code 4.3.

    Also, this makes it possible to have activities anywhere in the group tree, if that would ever be needed.

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

Sidebar

Related Questions

I have been working on a Timesheet Management website. I have my home page
I have a staff timesheet table where i have timestamp of when those records
I'm working on a timesheet application. I'd like to add an autosave functionality. Let's
Working on a mobile application using jquery mobile and phonegap framework. My question is
Working with a website (as opposed to a web application) in VS2010 so there
Working with MySQL database. I have a store table. The store table has at
I'm working on a simple timesheet plugin for Redmine, all was going well until
Working with Reporting Services 2008 r2. So here's my issue: We have 5 reports
Working with JSF 2.0 (and Primefaces), is there a way to fire an ActionListener
I just working with JSON data and am playing around with jQuery and Ajax

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.