Database utilities