Two years later, I ask myself the same question. I understand that permissions are the answer.
However, you need to write something inside the "insert / delete / update" methods (which I hope will not be called).
I would agree to use an exception, because since it should not be a challenge, you should be warned if there is one.
But a line based here : says
Although you must implement these methods, your code should not do anything other than return the expected data type. For example, you might want other applications not to insert data into some tables. To do this, you can ignore the insert () call and return 0.
This suggests that a good way is to simply return null / 0/0. I will use this way.
I am not sure whether it is worth wasting time on such a secondary question.
source share