view and insert and update queries