add tag data structures in database