Some new database functions