One other thing I didn't see mentioned here is that many barrels are made by automated processes that create something almost exactly the same. Even when barrel A is different than barrel B, C or D, it may be a near match to barrel Y. When making thousands of automated barrels many of them will be very close. Through use, cleaning, polishing and other wear they will overlap many times throughout their lifespan.
This is more true on mass produced barrels that are very close than those made by smaller scale processes.
So your gun can ballistically match the gun of some thug someplace in the nation who just commited a crime. A year from now after firing several thousand shots, being polished and cleaned numerous times, they may have totally different marks and the same gun could overlap with the ballistic "print" of another similar model gun.
Prosecutors and "expert witnesses" many of whom make a living by being such "experts" will often discredit or deny that fact.
In reality the lie of the effectiveness is not as obvious or important because there is only a small percentage of guns being used in crimes. So even if a criminal's gun is giving a ballistic "fingerprint" that would match say 10 other guns in the nation, it is very unlikely those other 10 or their owners will even be a part of the investigation. Without those other 10 in the database nobody will ever know their guns were even matches as well.
If you were to take 10,000 glocks with polygonal rifling that is almost exactly the same from gun to gun, all in the same caliber, fire 10,000 rounds from each mixing them all together, then use a sample round to try to figure out which round came from which gun it would be very inaccurate.
A couple of the guns may have unique defects or marks that made it easier but even the ballistic print of the firearms themselves would have slowly changed during the course of the 10,000 rounds. Meaning round number 5 would not even match round number 5,000 from the same gun on many, never mind figuring out which gun it came from.
Now if you took some hand crafted barrel, with unique rifling, the uniqueness of the barrel would allow the fired round to be identified as being fired from the gun better.
Closed tests with several different models of guns with low numbers of rounds and virtually no wear, cleaning, polishing changing of parts etc are often used to demonstrate the capability of such technology. Quite misleading.
All of these facts are a big reason a ballistic database fails. The print changes through use, it overlaps other firearms during the course of the firearm's lifetime, continuing the change, receive new scratches, lose metal, have parts replaced etc.
If the database only includes firearms involved in crimes it is still not accurate beyond a reasonable doubt, but it does give good investigative conclusions.
If it includes all firearms it would be worthless, except for registering all gun owners.
Additionally it leads to "fishing". It means that if you have a .44 Magnum and a guy in your county was just killed with a .44 Magnum from a similar model firearm (or firearm using a similar barrel and breech) you may end up on a list of potential suspects even though you have no other connection to the case. This is even more true if the caliber or barrel, breech is more unique.
If you actually happen to have any connection or possible connection to that individual its certainly going to happen.
People may need to come inspect your gun on a regular basis just to conclude whether it was yours used or not.
The bigger the database the more likely yours will actually match other guns in the database. Since the print changes over time what other guns it matches will also change over time.
A big reason for the support of such systems by antis does not require the system to work. If all guns are part of such a database then all guns are registered. Period. Whether the system is a complete and utter failure you still would have all the guns in it and their owners registered. Something that allows better successful implementation of future gun control legislation.