If you want to prevent cavities, how often you eat can be just as important as what you eat. That's because food affects your teeth and mouth long after you swallow. Eating cookies with dinner will do less harm to your teeth than eating them as a separate snack. Of course, overall poor nutrition can contribute to periodontal (gum) disease. It also can have other long-term effects on your mouth. Learning how food affects your oral health is the first step toward mouth-healthy eating.

Changes begin in your mouth the minute you start to eat certain foods. Bacteria in your mouth make acids. The acids start the process that can lead to cavities.

How does this happen?

All carbohydrate foods eventually break down into simple sugars: glucose, fructose, maltose and lactose. Fermentable carbohydrates break down in the mouth. Other foods don't break down until they move further down the digestive tract.

Fermentable carbohydrates work with bacteria to form acids that begin the decay process and eventually destroy teeth. They include the obvious sugary foods, such as cookies, cakes, soft drinks and candy. But they also include less obvious foods, such as bread, crackers, bananas and breakfast cereals.

Certain bacteria on your teeth use the sugars from these foods and produce acids. The acids dissolve minerals inside the tooth enamel. The process is called demineralization. Teeth also can regain minerals. This natural process is called remineralization. Saliva helps minerals to build back up in teeth. So do fluoride and some foods.

Dental decay begins inside the tooth enamel when minerals are being lost faster than they are being regained.

The longer food stays near the bacteria on the tooth, the more acids will be produced. So sticky carbohydrates, such as raisins, can do more acid damage. But other foods that pack into crevices in the tooth also can cause decay. Potato chips are a terrific example. Eat a handful of chips and see how long you have to work to get all the stuck bits out from between your teeth. Teeth with a lot of nooks and crannies, such as molars, are more likely to trap food. That's why they tend to have more decay.

To make matters worse, many of the foods that are unhealthy for teeth don't just create acids while they are being eaten. The acids stick around for the next half-hour.

Depending on your eating and drinking patterns, it's possible for the bacteria to produce acid almost constantly. This can happen if you sip soft drinks or sweetened coffee throughout the day. Eating many small sweet or starchy snacks can produce the same effect. The resulting acid damage adds up, so decay is more likely. Studies have shown that people who eat sweets as snacks between meals have higher rates of decay than people who eat the same amount of sweets with their meals.

On the brighter side, some foods actually help to protect teeth from decay. That's because they increase saliva flow and neutralize the acids produced by bacteria. This makes it less likely that the enamel will lose minerals. For example, aged cheese eaten immediately after other food helps to buffer the acid.

Chewing sugarless gums also can help protect your teeth against cavities. Xylitol is an ingredient in some sugarless gums. This sweetener has been shown to reduce the amount of bacteria in the mouth. It also helps to buffer the teeth against the effect of acid. Most sugarless gums and sugarless candies increase the flow of saliva, which helps to protect your teeth against bacteria. Be careful about consuming large amounts of xylitol. This can have a laxative effect.

Like the rest of your body, your mouth depends on overall good nutrition to stay healthy. In fact, your mouth is highly sensitive to poor nutrition. It can lead to tooth loss, serious periodontal (gum) disease and bad breath.

The current and best advice for overall good nutrition is found in the Dietary Guidelines for Americans. This document was developed by the U.S. Department of Agriculture (USDA) and the Department of Health and Human Services.

To help people understand these guidelines, the USDA has an interactive tool called ChooseMyPlate. The tool can be found at www.choosemyplate.gov.

Your diet should have:

Enough fruits and vegetables to fill half your plate

Many foods made from grains, at least half of them whole grains

A variety of proteins, including lean meats, beans, eggs and nuts

For adults, 3 cups daily of low-fat or no-fat milk, yogurt and cheese (2 to 2 1/2 cups for children)

Sweets only on special occasions

To prevent tooth decay, you should follow a few extra guidelines. This can help to keep the amount of acid created by the bacteria on your teeth to a minimum. Here are some tips:

1. Limit between-meal snacking. Fewer snacks mean less acid exposure for your teeth. If you snack, choose foods that are not fermentable carbohydrates.

Best choices —Cheese, chicken or other meats, or nuts. These foods actually may help protect tooth enamel. They do this by neutralizing acids or by providing the calcium and phosphorus needed to put minerals back in the teeth.

Moderate choices—Firm fruits such as apples and pears and vegetables. Firm fruits contain natural sugars. However, their high water content dilutes the effects of the sugars. These fruits also stimulate the flow of saliva, which fights bacteria and helps protect against decay. Vegetables do not contain enough carbohydrates to be dangerous.

Worst choices— Candy, cookies, cakes, crackers, breads, muffins, potato chips, french fries, pretzels, bananas, raisins and other dried fruits. These foods provide a source of sugar that certain bacteria can use to produce acid. The problem can be worse if the foods stick to teeth or get caught between them.

2. Limit the amount of soft drinks or any other drinks that contain sugar. These include coffee or tea with added sugar, cocoa and lemonade. Fruit juices contain natural sugars that also can cause decay. Limit the amount of time you take to drink any of these drinks. Avoid sipping them throughout the day. A can of soda that you finish with a meal exposes your teeth to acids for a shorter time than a soda that takes you two hours to drink.

Better choices—Unsweetened tea and water, especially fluoridated water. Tea also has fluoride, which can strengthen tooth enamel. Water helps flush away bits of food. It also can dilute the sugar acids.

3. Avoid sucking on hard candies or mints, even the tiny ones. They have enough sugar to increase the acid produced by bacteria to decay levels. If you need a mint, use the sugarless varieties.

4. Limit very acidic foods (such as citrus fruits) because they can make the mouth more acidic. This may contribute to a loss of minerals in the teeth. The effects of acid exposure add up over time. Every little bit counts.

5. Brush your teeth after eating and after drinking sugary drinks, to remove the plaque bacteria that create the destructive acids. Sugar-free soft drinks can erode your teeth, too. If you cannot brush after every meal, brush at least twice a day.

6. Chew sugarless gum that contains xylitol. This can help reduce the risk of cavities. The gum helps dislodge some of the food stuck to your teeth. It also increases saliva flow to help neutralize the acids.