• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 159
  • 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?
0
fahadman
Asked:
fahadman
  • 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...
0
 
fahadmanAuthor Commented:
thanks, so u made separate table for history
0
 
amazingwolf1Commented:
Hi,

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:
http://vyaskn.tripod.com/sql_archive_data.htm

HTH
0
 
fahadmanAuthor Commented:
i will have another question please find it in a moment
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

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