• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 154
  • Last Modified:

DataBase Question

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?
  • 2
2 Solutions
Guy Hengel [angelIII / a3]Billing EngineerCommented:
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...
fahadmanAuthor Commented:
thanks, so u made separate table for history

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:

fahadmanAuthor Commented:
i will have another question please find it in a moment

Featured Post

NFR key for Veeam Backup for Microsoft Office 365

Veeam is happy to provide a free NFR license (for 1 year, up to 10 users). This license allows for the non‑production use of Veeam Backup for Microsoft Office 365 in your home lab without any feature limitations.

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now