3 ms·
I've always hated "isDeleted" flags because it adds something that you have to remember to every query you write. I would almost prefer some way to "ghost" a r
by jiggy2011 14y ago
I've always hated "isDeleted" flags because it adds something that you have to remember to every query you write.
I would almost prefer some way to "ghost" a row where without a specific switch the DBMS will never return it from a query.
- SanjayUttam 14y agoI might be trivializing this but you could create a view "ActiveUsers" / "DeletedUsers". Not saying this make the IsDeleted flag perfect, but it would alleviate that particular problem, IMO.
- Argorak 14y agoWith a view and a set of rules, you can do such things in Postgres, without your application noticing: http://www.postgresql.org/docs/9.2/static/rules-update.html http://www.postgresql.org/docs/9.2/static/rules-update.html