More db work - a saner approach is appearing