added db generation script, fixed minor view bug in sidebar