I would like to point out that calibre has a builtin feature to protect the user from
inadvertently clicking on a cell and editing it by accident -- a solution that doesn't require modifying the database by hand.
And it seems the OP was perfectly happy with that builtin method, too.