extract tags from db