generate view category list from database