DataBase Question

Posted on 2009-04-20
Last Modified: 2012-05-06
i have a database about online school, do i need to have additional table to save old information about user and tutor who is not active anymore, what is the techniques used? creating separate table or doing something else with exist tables. i have user/tutor details tables so do i need to add History table for each?
Question by:fahadman
    LVL 142

    Assisted Solution

    by:Guy Hengel [angelIII / a3]
    you could have some field that indicates the status somehow.
    often, I use 2 fields : ActiveStart and ActiveEnd (both datetimes), so you can store and query easily when the row is active and when not.

    if the same account can be active several periods of times, and that history has to be saved, an additional ActivationHistory (PK_of_main_table, active_date, active_end) table should get all those different values also...
    LVL 1

    Author Comment

    thanks, so u made separate table for history
    LVL 4

    Accepted Solution


    The solution of angellll is the basic solution for a system that has a minimal groath factor. For instance, if you can determine that your tables will stay small in about 5-10 years, you can use his approach, letting the developers of that time take care of archiving,

    If you think your tables will grow with each year in a way that will effect your queries, performance and maintanance, I suggest thinking seriously of archiving.

    Here is a quick start:

    LVL 1

    Author Comment

    i will have another question please find it in a moment

    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    How to improve team productivity

    Quip adds documents, spreadsheets, and tasklists to your Slack experience
    - Elevate ideas to Quip docs
    - Share Quip docs in Slack
    - Get notified of changes to your docs
    - Available on iOS/Android/Desktop/Web
    - Online/Offline

    Suggested Solutions

    by Mark Wills Attending one of Rob Farley's seminars the other day, I heard the phrase "The Accidental DBA" and fell in love with it. It got me thinking about the plight of the newcomer to SQL Server...  So if you are the accidental DBA, or, simp…
    I've encountered valid database schemas that do not have a primary key.  For example, I use LogParser from Microsoft to push IIS logs into a SQL database table for processing and analysis.  However, occasionally due to user error or a scheduled task…
    Sending a Secure fax is easy with eFax Corporate ( First, Just open a new email message.  In the To field, type your recipient's fax number You can even send a secure international fax — just include t…
    Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…

    779 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    12 Experts available now in Live!

    Get 1:1 Help Now