commands: Improved database commands