Many edible beans, including broad beans and soybeans, contain oligosaccharides (particularly raffinose and stachyose), a type of sugar molecule also found in cabbage. An anti-oligosaccharide enzyme is necessary to properly digest these sugar molecules. As a normal human digestive tract does not contain any anti-oligosaccharide enzymes, consumed oligosaccharides are typically digested by bacteria in the large intestine. This digestion process produces flatulence-causing gases as a byproduct. This aspect of bean digestion is the basis for the children's rhyme "Beans, Beans, the Musical Fruit".
Some species of mold produce alpha-galactosidase, an anti-oligosaccharide enzyme, which humans can take to facilitate digestion of oligosaccharides in the small intestine. This enzyme, currently sold in the United States under the brand-names Beano and Gas-X Prevention, can be added to food or consumed separately. In many cuisines beans are cooked along with natural carminatives such as anise seeds, coriander seeds and cumin.
One effective strategy is to soak beans in alkaline (baking soda) water overnight before rinsing thoroughly. Sometimes vinegar is added, but only after the beans are cooked as vinegar interferes with the beans' softening.
Fermented beans will usually not produce most of the intestinal problems that unfermented beans will, since yeast can consume the offending sugars.
Read more about this topic: Bean