Results 1 to 3 of 3
  1. #1
    snoopy2003 is offline Advanced Beginner
    Windows 7 64bit Access 2010 32bit
    Join Date
    Feb 2011
    Posts
    72

    Design tables in order to keep history

    Hello,

    My database contains employee data.
    I wish to store historical data of some fields like salary and status
    I should be able to display later weekly/monthly/yearly view of the data.

    What is the preferred way to design the tables in order to retrieve the data afterward ?

    I think to store salary historical data in a separate table like:
    workerID
    salary
    StartDate
    EndDate



    or
    workerID
    salary
    EffectiveDate

    Is it possible to retrieve monthly view of employee salary with this table
    (I mean: not all the months appears in the table).

    Thank you for your help

  2. #2
    TheShabz is offline Court Jester
    Windows XP Access 2003
    Join Date
    Feb 2010
    Posts
    1,368
    First off, I would go with your second option, the EffectiveDate. Reason for this being that the start date of one is automatically the end date of the previous, thus making storing the end date redundant information.

    As far as viewing in a weekly/monthly/yearly view of salary info, I cant really think of a clean, sexy way of doing it. It would probably come down to running multiple queries with date criteria being "BETWEEN [beginConstraint] AND [endConstraint]". There might be some stock code for this on the web if you have the time to look.

  3. #3
    snoopy2003 is offline Advanced Beginner
    Windows 7 64bit Access 2010 32bit
    Join Date
    Feb 2011
    Posts
    72
    Hello,

    Thank you for your answer. I will search for a code example
    or VBA sub to handle the calculation and create a table based on the result.

    Thank you

Please reply to this thread with any new information or opinions.

Similar Threads

  1. Creating a History
    By mwabbe in forum Access
    Replies: 7
    Last Post: 08-19-2010, 09:16 AM
  2. Paradox Sort order for linking tables to access
    By Jimmy in forum Import/Export Data
    Replies: 0
    Last Post: 02-02-2010, 03:13 AM
  3. Database design - connecting 2 tables
    By Eisaz in forum Database Design
    Replies: 2
    Last Post: 10-16-2009, 09:19 AM
  4. tables design
    By luca in forum Database Design
    Replies: 7
    Last Post: 08-24-2009, 07:38 AM
  5. Comment History
    By botts121 in forum Programming
    Replies: 0
    Last Post: 07-02-2009, 01:02 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums