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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 31, 20262026-05-31T15:52:06+00:00 2026-05-31T15:52:06+00:00

I’ve got a excel sheet that contains all the employees that have worked for

  • 0

I’ve got a excel sheet that contains all the employees that have worked for my company and is still working for us. It’s a sheet of around 200 rows. Each row has basic info, like surname, name, position, qualification etc etc. 16 columns of basic info. Now, the tricky part is this. After the 16 columns, there are months (May-05 up to the present (Apr-12)). Under every month column, an employee either get’s a 0 (contract), 1 (permanent), 2 (contract-terminated) or 3 (student).

What would be the best way to do this? I was thinking of 4 tables (listed below), where the one table determines permanently terminated people (for the sake of knowing who was on what type of employment).

MySQL Table: hr_employees
|-----------------|-------|----|----|----|
| employee_number | name  | sur| etc| etc|
|-----------------|-------|----|----|----|
| 1               | Dave  | F  | xx | xx |
|-----------------|-------|----|----|----|

MySQL Table: hr_month
|----|--------|
| id | month  |
|----|--------|
| 1  | May-05 |
| 2  | Jun-05 |
|----|--------|

MySQL Table: hr_status
|----|------|------|--------|
| id | e_no | date | status |
|----|------|------|--------|
| 1  | 1    |  1   |   1    |
| 2  | 1    |  2   |   1    |
|----|------|------|--------|

MySQL Table: hr_terminated
|----|------|
| id | e_no |
|----|------|
| 1  | 1    |
| 2  | 1    |
|----|------|

I hope you guys understand what I want to achieve, otherwise, ask a question, and I’ll answer as best I can! 🙂

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-31T15:52:07+00:00Added an answer on May 31, 2026 at 3:52 pm

    Here is a design that simplifies your data entry and is more relational database like and less Excel like, insofar as it’s normalized.

    MySQL Table: hr_employee
    |-----------------|-------|----|----|----| 
    | employee_number | name  | sur| etc| etc| 
    |-----------------|-------|----|----|----| 
    | 1               | Dave  | F  | xx | xx | 
    |-----------------|-------|----|----|----| 
    | 2               | Bob   | M  | xx | xx | 
    |-----------------|-------|----|----|----| 
    
    MySQL Table: hr_employee_status
    |-----------------|------------|------------|--------| 
    | employee_number | from_date  | to_date    | status | 
    |-----------------|------------|------------|--------| 
    | 1               | 2005-05-01 | 2005-08-31 |   3    | 
    |-----------------|------------|------------|--------| 
    | 1               | 2006-05-01 | 2010-02-28 |   0    | 
    |-----------------|------------|------------|--------| 
    | 2               | 2010-03-01 | 9999-12-31 |   1    | 
    |-----------------|------------|------------|--------| 
    

    Here you can see that Dave was hired on as a student from May ’05 to August ’05, then he came back in May ’06 as a contract employee which he worked as until the end of February ’10. Then on March 1, 2010 Bob was hired as permanent employee and he is still working (max collating date means “until further notice”).

    The great advantage of this design is that you only have to enter/edit data when something changes, not once a month for every employee that you have or have ever had. You can also see what your workforce looked like at any given date (not just by months!) with a very simple SQL query.

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

Sidebar

Related Questions

I have a string like this: La Torre Eiffel paragonata all’Everest What PHP function
I've got a string that has curly quotes in it. I'd like to replace
I have a French site that I want to parse, but am running into
I'm parsing an RSS feed that has an ’ in it. SimpleXML turns this
I have a text area in my form which accepts all possible characters from
I'm working with an upstream system that sometimes sends me text destined for HTML/XML
I have just tried to save a simple *.rtf file with some websites and
link Im having trouble converting the html entites into html characters, (&# 8217;) i
That's pretty much it. I'm using Nokogiri to scrape a web page what has
I have a jquery bug and I've been looking for hours now, I can't

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.