Click here to Skip to main content
15,889,281 members
Home / Discussions / Database
   

Database

 
AnswerRe: RID|Key lookup vs Index Seek? Pin
dasblinkenlight6-Jul-11 6:13
dasblinkenlight6-Jul-11 6:13 
GeneralRe: RID|Key lookup vs Index Seek? Pin
devvvy10-Jul-11 0:11
devvvy10-Jul-11 0:11 
QuestionFeeding parameters from a C# app into an SSIS package that converts query results to CSV and FTP [modified] Pin
Alaric_5-Jul-11 12:34
professionalAlaric_5-Jul-11 12:34 
AnswerRe: Feeding parameters from a C# app into an SSIS package that converts query results to CSV and FTP Pin
Alaric_7-Jul-11 6:44
professionalAlaric_7-Jul-11 6:44 
QuestionLow-level filtering of IsDeleted bit field Pin
army_man716554-Jul-11 11:39
army_man716554-Jul-11 11:39 
AnswerRe: Low-level filtering of IsDeleted bit field Pin
Johan Hakkesteegt5-Jul-11 1:48
Johan Hakkesteegt5-Jul-11 1:48 
GeneralHistory table Pin
David Mujica5-Jul-11 3:25
David Mujica5-Jul-11 3:25 
GeneralRe: History table Pin
Eddy Vluggen5-Jul-11 13:19
professionalEddy Vluggen5-Jul-11 13:19 
I do not see much advantages, unless both tables are located in separate files. Otherwise you'd be adding a lot of extra work, just to give it a new status. I'd still prefer having them in the same table, with an (indexed) attribute to make a distinction between the records with the status "deleted" and the ones that aren't.

Yes, you can omit checking that single attribute in each query on that table, that could be considered an advantage. There's more disadvantages; you'll be maintaining two definitions of the same table in each database, and it'd add extra strain in terms of physically moving the data and updating indexes.

Most of the time, a simple DateTime to indicate the date/time of removal (null if not removed) is enough to provide simple "undelete" functionality. That's from a YAGNI/KISS viewpoint - it might make sense to have history-tables depending on your needs.

In that case I'd recommend to add some triggers and log it in a copy of the database, located on the same server. You can easily write a script that clears all tables in a database, and it'd be easy to make separate backup-plans.
Bastard Programmer from Hell Suspicious | :suss:

AnswerRe: Low-level filtering of IsDeleted bit field Pin
jschell5-Jul-11 6:20
jschell5-Jul-11 6:20 
AnswerRe: Low-level filtering of IsDeleted bit field Pin
Mycroft Holmes5-Jul-11 14:21
professionalMycroft Holmes5-Jul-11 14:21 
AnswerRe: Low-level filtering of IsDeleted bit field Pin
Shameel7-Jul-11 3:20
professionalShameel7-Jul-11 3:20 
QuestionUnQuote a nvarchar() string and use it as a table name Pin
reza assar4-Jul-11 1:57
reza assar4-Jul-11 1:57 
AnswerRe: UnQuote a nvarchar() string and use it as a table name Pin
Shameel4-Jul-11 4:46
professionalShameel4-Jul-11 4:46 
AnswerRe: UnQuote a nvarchar() string and use it as a table name Pin
PIEBALDconsult4-Jul-11 6:01
mvePIEBALDconsult4-Jul-11 6:01 
AnswerRe: UnQuote a nvarchar() string and use it as a table name Pin
Niladri_Biswas4-Jul-11 17:03
Niladri_Biswas4-Jul-11 17:03 
GeneralRe: UnQuote a nvarchar() string and use it as a table name Pin
reza assar6-Jul-11 1:04
reza assar6-Jul-11 1:04 
QuestionGetDate Pin
berba4-Jul-11 0:10
berba4-Jul-11 0:10 
AnswerRe: GetDate Pin
thatraja4-Jul-11 0:25
professionalthatraja4-Jul-11 0:25 
AnswerRe: GetDate Pin
Simon_Whale4-Jul-11 0:40
Simon_Whale4-Jul-11 0:40 
GeneralRe: GetDate Pin
berba4-Jul-11 2:44
berba4-Jul-11 2:44 
GeneralRe: GetDate Pin
Simon_Whale4-Jul-11 2:49
Simon_Whale4-Jul-11 2:49 
AnswerRe: GetDate Pin
Shameel4-Jul-11 4:44
professionalShameel4-Jul-11 4:44 
QuestionA Quick SQL/Integrated Authentication issue (Looks like I am missing something trivial) Pin
Vasudevan Deepak Kumar30-Jun-11 7:24
Vasudevan Deepak Kumar30-Jun-11 7:24 
AnswerRe: A Quick SQL/Integrated Authentication issue (Looks like I am missing something trivial) Pin
Pete O'Hanlon30-Jun-11 7:44
mvePete O'Hanlon30-Jun-11 7:44 
GeneralRe: A Quick SQL/Integrated Authentication issue (Looks like I am missing something trivial) Pin
Vasudevan Deepak Kumar30-Jun-11 7:53
Vasudevan Deepak Kumar30-Jun-11 7:53 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.