Edit database - Update queries

Feel free to test/debug.