changes because of new db layout and new view layout

Signed-off-by: Karl Merkli <info@karl-merkli.ch>