A few more bits and pieces from SleuthFest --
The session, "Knives, Guns & Other Fun Things" wasn't what I expected. Instead of seeing (and maybe playing with) weapons, our speaker told us about identifying weapons used in crimes. Basically, they look at two kinds of toolmarks: striated, when a tool moves across an object, and impressed, when it leaves an impression. "Tools" aren't just hammers and screwdrivers, but this is the term they use for everything used in committing the crime, from guns to baseball bats.
He was a stickler for correct terminology. What most of us call a "bullet" isn't. Only the bit that comes out the front is the projectile. There's the powder and the casing. He didn't like the use of the term "clip" either. It's a magazine. And "ballistics" is technically the study of a projectile in motion, not the analysis of whether or not a specific gun fired a specific projectile. "Slug" was another term he didn't like (even showing us a picture of the garden-variety to demonstrate, although there are shotguns that shoot slugs.)
Assault rifles: these are "select fire" weapons, which means they can be switched from semi-automatic to automatic.
Machine guns fire 30, 50 or larger caliber ammunition, and it's belt fed, and these are BIG weapons, needing some kind of tripod-like support.
Submachine guns shoot pistol ammunition.
He divides handguns into pistols and revolvers, although I've seen dictionary definitions that say any handgun is a pistol.
As a writer, the challenge becomes keeping the terminology accurate while maintaining what the reader understands.
Ultimately, as the other experts said, all identification is done by eye. He uses a comparison microscope. Computers don't do the final matching, people do. And while there are extensive databases, most of the time he'll use the local one because most of the matches come from there. People commit crimes close to home. However, there are state and national databases, and every now and then you'll find a gun used in a crime here that doesn't show in the local database, but can be tied to a crime committed in another state.