Generate Category from database