asp.net - Delete data records - keep joined data -


i not able find better title this.

branches          users             attendance -----------       -----------       ----------- branchid^         userid^           courseid^ branchname        username          userid*                   branchid* 

here's table. due company re-structure need delete old branches , users belong in them. when boss wants see old attendances wants see old usernames if don't exist.

what's best practice here? i'm thinking add disabled column in branches/users aren't visible on web page.

a "soft delete" flag used address requirement retain both current , logically deleted data. alternatively, move rows archive tables historical reporting.

having both current , logically deleted rows in same table more convenient if need combined reporting on both. downside presence of inactive rows can add more overhead queries of active data only. depends on percentage of inactive rows , number of rows.


Comments

Popular posts from this blog

asp.net mvc - SSO between MVCForum and Umbraco7 -

Python Tkinter keyboard using bind -

ubuntu - Selenium Node Not Connecting to Hub, Not Opening Port -