My strategy for running a meat and dairy industry:
Make a room somewhat isolated from the rest of your fortress, connected by a corridor with a few doors that are set to be pet-impassible but usable by dwarves. In this room build a cage, a few chains, and a farmer's workshop. The farmer's workshop should be as close as possible to the cage. Optionally, build a butcher's workshop, tannery, kitchen, and stockpiles for meat, milk, cheese, corpses, bones, raw and tanned hides, and other meat and dairy byproducts nearby. Also, optionally place a furniture stockpile set to accept only buckets next to the farmer's workshop.
Assign all your female livestock to the cage. Take a look at your male animals. Assign the best (most muscle, largest size) of each species to one of the chains next to the cage. Butcher the rest.
Set the farmer's workshop to repeat milking jobs. Your milker will go and get an animal out of the cage and take it to be milked. While it is out of the cage, it may become pregnant due to the male animal. After being milked, it will be let loose, but the pet-impassible doors will stop it from getting into the main fortress, and eventually a dwarf will come along and re-cage it.
Animals which become pregnant while uncaged will give birth in the cage. Every time you get a birth notification, check the gender of the offspring. If it is female, assign it to the cage. If it is male, assign it to a chain, then examine it for size and muscle quantity. Inferior animals get butchered, superior ones replace the current breeding stud. This method is easiest with cows, where you can see the gender of the animal from the name. Other animals - donkeys, horses, camels - make it harder to tell what gender the offspring is. You can add gender-specific tags to the raw files to fix this, but I only bother with cows.
You will want to have a second farmer's workshop in your main fortress running frequent cheese-making jobs, to turn all that milk into lovely cheese, and then optionally a kitchen making cheese and meat roasts.