Dairy farming is a class of agriculture for long-term production of milk, which is processed (either on the farm or at a dairy plant, either of which may be called a dairy) for eventual sale of a dairy product. Centralized dairy farming as we understand it primarily developed around villages and cities, where residents were unable to have cows of their own due to a lack of grazing land. Near the town, farmers could make some extra money on the side by having additional animals and selling the milk in town. .
Dairy farming has been part of agriculture for thousands of years. Historically it has been one part of small, diverse farms. In the last century or so larger farms concentrating on dairy production emerged. Large scale dairy farming is only viable where either a large amount of milk is required for production of more durable dairy products such as cheese, butter, etc. or there is a substantial market of people with cash to buy milk, but no cows of their own. Dairy farms were the best way to meet demand. .