Implement database-layer modifications for tag system