update db and layout.