Milk contains a sugar called lactose which is fortunately pretty benign as far as tooth decay is concerned. Even with the presence of lactose milk does not promote tooth decay because of the presence of high amounts of calcium, phosphate, and casein which is a milk protein that helps strengthen teeth.
Eating cheese can actually help protect teeth from developing cavities because eating cheese helps increase the flow of saliva which helps neutralize acids in the mouth. Cheese also increases calcium concentration which helps stop the demineralization of tooth enamel. The fat that is abundant in cheese also helps reduce bacteria in the mouth.
A lump of cheese is often eaten in Europe after a meal as a desert. European cultures have known for centuries that cheese helps protect the tooth enamel after a meal by neutralizing bacteria in the mouth. So next time you have a sugary meal have a piece of cheese when you finish to help neutralize the effects of the sugars in your mouth.