In a multi-tenant data insert scenario, GUID is a great data type for primary key. Since it is unique globally, you will not need to rely on any range or custom logic. However, if you extend these columns as index, you will end up with frequent index fragmentation and hence bad performance. In this post, […]
Working around the bug “Instead Of Trigger on View returns no output”
There is an inherent and documented bug with SQL for a very long time where the database will not yield any output when you have got an “Instead Of” trigger on a view and you update the view. The bug is currently updated as “Won’t fix” as the fix will alter the core bits of […]
A poor man’s implementation of row level security in SQL
Often I have come across situations where the enterprise customers want to restrict data availability to their employees / IT not only from the application but also at the database level. Government / Public sectors have a common requirement that they don’t want everybody at their IT team to be able to query everybody’s data. […]