Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
?
Solved

Archiving question

Posted on 2009-04-20
1
Medium Priority
?
153 Views
Last Modified: 2012-05-06
archiving means that my old data will move to another tables, is this tables outside of my database or inside database? when i need to make query, am i going to make something special to find old record?
0
Comment
Question by:fahadman
1 Comment
 
LVL 143

Accepted Solution

by:
Guy Hengel [angelIII / a3] earned 2000 total points
ID: 24182911
the history/archive tables can be inside the same database, but can also be outside of the database.
in sql server, you would at least put them into a different filegroup than the actual table.

if you are really in the situation to create history/archive tables, you need to make that difference clear in the user forms, so the user searches by default only the current (active) data, and has to explicitely "extend" the search for the history data, if needed.
for that, you then indeed need to query both the active and the archive table then, using a UNION ALL, or, if you work with a stored procedure that "hides" the exact table layout, eventually using a table variable storing the hits first, and  the returning the data from there.
0

Featured Post

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

by Mark Wills PIVOT is a great facility and solves many an EAV (Entity - Attribute - Value) type transformation where we need the information held as data within a column to become columns in their own right. Now, in some cases that is relatively…
This article explains how to reset the password of the sa account on a Microsoft SQL Server.  The steps in this article work in SQL 2005, 2008, 2008 R2, 2012, 2014 and 2016.
The Relationships Diagram is a good way to get an overall view of what a database is keeping track of. It is also where relationships are defined. A relationship specifies how two tables connect to each other. As you build tables in Microsoft Ac…
Enter Foreign and Special Characters Enter characters you can't find on a keyboard using its ASCII code ... and learn how to make a handy reference for yourself using Excel ~ Use these codes in any Windows application! ... whether it is a Micr…

577 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