Refactor database annotations