You can use a technology like Acoustid. Their "fingerprinter" analyze the audio part of a track and then make a lookup in the database if an identical fingerprint can be found. If yes, you can get additional informations for this track from associated projects like MusicBrainz.
But again - ohrenkino already told you - this will never give you the 100% matching tracks automatically. No known system can actually detect if a song was originally recorded on a Single, an Album, a "Best of", a "Super-Duper-80'-Collection' or even a 'Bootleg'. If you want to have accurate tags, you must have the source to be sure which year, which label, which producer, which cover and even which syntax the track title has.