Making the database only have unique tags and file names