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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T11:56:40+00:00 2026-05-27T11:56:40+00:00

I have a employee table and status table. In employee table i have his

  • 0

I have a employee table and status table. In employee table i have his id and name. and in status i store his status for various months of a year.

It never ends i.e. starting from current year to more year to come by it will keep on growing i.e. each row represents a status for a month and a year. So this takes hell lot of time to load a data for 12 month on screen as its 1 to many relationship.

So i was thinking to store this data in a serialized manner in same table as employee table i.e. key will be month_year and value will be its status. So if i do this will this table grow large to create space problems?.

And what data type should i use if i store serialize data and store in it. Because this application can be used for 3-4 years also. so it comes upto 48 months data in a array and same as serialized in table.

**** Update *****

If this month is November, I will shown on screen data from this year October to next year October. So this is the biggest problem.

**** Update2 ***

This is how i should show my data on the screen i.e. for each employee 12 months status. So i enter the problem of nested queries in my php code. Get a employee in loop enter the second table and take all his data and show.

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-05-27T11:56:41+00:00Added an answer on May 27, 2026 at 11:56 am

    Serialization is a bad choice.
    You can consider normalization like this way :-

    employee ( id, name ...);
    employee_status (employee_id, year_month int(6), status boolean);
    

    To get list of employ status from October to next October :-

    select e.id, e.name, es.year_month, es.status
    from employee as e
    inner join employee_status as es
    on e.id=es.employee_id
    where es.year_month between "201110" and "201210";
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have three tables: Employee(EmployeeID,Fname,Lname...) ProjectHeader(ProjectID,LeadID,Status....) ProjectDetails(ProjectDetailsID,ProjectID....) Here's my current code: $get_projects = SELECT
I have the following database design: Employee Table: Username, Name, DivisionCode Division Table: SapCode,
I have the following database design: Employee Table: Username, Name Quiz Table: QuizID, Title,
I have a employee table with columns like emp_id, firstname, lastname, month and year.
I have a table Employees(Id,CompanyId,Name,Status....) I have an index Ix_CompanyId_Status(CompanyId,Status) looking on the dm_db_missing_index_details
I have Employee table and an Entity class for it, My task is such
I have a employee table, and a vacations table where each row represents a
I have an employee table, with the following data. For a particular manager, i
Suppose I have employee and department table, employee has foreign key departmentID that is
I have a table: Employee (employeeID) EmployeeRank (rankID, employeeID) Now I have another table

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.