Is it possible to link a bullet to a specific gun, other than simply matching calibers? For instance, from the rifling marks on the bullet?
To a degree, yes. If a fired bullet is recovered at a crime scene (for example) that is still in good enough condition to observe the rifling marks, it can be compared to a bullet fired from a specific firearm to see if the rifling marks match. Like finger-printing, this is more of an art than a science, and it depends on matching the number of similarities between the marks on the two bullets to establish a probablility that they were fired from the same gun. There is no "certainty" to it.
Several problems exist with the technique: For one, the rifling in the bore of a firearm changes as it wears. The more firings take place between the two test bullets, the less alike the marks will be = probability goes down. As pointed out, if the owner replaces the barrel, all bets are off.
The bigger problem comes in simply having test material. To do this, you'd need a recovered bullet in fairly decent condition. The more smashed/deformed the slug is, the harder identification will be (even less probability of a match). And, you need to have the rifle or pistol you suspect fired the round in hand so you can run the control test and recover the comparison bullet.
Simply having the recovered slug from a crime scene gets you little beyond knowing the caliber, weight (assumed, from what's left), and possibly the make of gun it was fired through (Polygonal or cut rifling? Number of lands & grooves, etc.). Without a suspect in mind, and his gun in custody to test, there's no way to use the fired slug as a "signature" to ID the shooter, or even the owner of the gun.
Is there such a thing as a ballistics database in the US or certain states?
No. Some states (MD) have (or had) maintained "ballistics fingerprint" records on all handguns sold. But, to my knowledge, these only kept fired cartridge cases -- not recovered bullets. The idea being that the fired cases bear the markings of the firing pin, extractor, ejector, and whatever impact marks the gun makes on the case as it cycles. Then the cases on file could be compared against cases recovered at crime scenes. The same issues of uncertainty apply to this as to the bullet "fingerprinting," of course.
Information I've read indicates that many millions of dollars have been spent to build and maintain these databases/archives, and they've yet to be used conclusively in
ONE criminal trial.
-Sam
P.S. -- Fortunately, on television, this is a valuable and reliable set of tests that puts the bad-guy behind bars in 30 minutes or less, every week! ;-)