Are you experiencing heartburn often? If you do, you should be careful with the medicines that you take. A new study suggests that heartburn medications increase one's risk of dementia.

According to CBS News, a popular class of heartburn drugs known as proton pump inhibitors (PPIs) increases one's risk to dementia. This group of drugs includes Prilosec, Nexium and Prevacid. These drugs work by lowering the amount of acid produced in the stomach.

Per NPR.org, these drugs are also harmful for the same reason. When they block the production of stomach acid, it leaves people vulnerable to nutritional deficiencies and infections including food poisoning like salmonella and life-threatening digestive system infection such as Clostridium difficile and pneumonia. It is also linked to kidney and heart disease. Recent study suggests that it also increases one's risk to dementia.

The study, which is published in JAMA Neurology, analyzed patient data that were collected from 2004 to 2011 by German health insurer Allgemeine Ortskrankenkassen for 73,679 of its customers, UPI reported.

The researchers learned that patients who were 75-years old and older without dementia who took PPI drugs had 44 percent increased risk of dementia compared to those who did not use the drug. This finding was supported by recent studies with mice, which revealed that rodents on PPIs had increased levels of amyloid plaques in their brains. The said buildups contributed to dementia.

The researchers noted that these studies did not take into account one's lifestyle and diet. The said factors affected the risk of dementia or other diseases that PPIs may intensify.

"The teaching for many years was that these drugs were quite safe," John Clarke, a gastroenterologist at Johns Hopkins Hospital, told NPR. "But there is data that's emerging that suggests PPIs may not be as safe as we think they are."

However, Keith Fargo, director of scientific programs and outreach for the Alzheimer's Association, said that it is still unlikely for doctors not to recommend the PPIs despite its potential threat.

"It does not tell us anything that should change medical practice right now," Fargo said. "I don't think there's going to be an uprising among doctors telling patients not to take their PPIs. This doesn't rise anywhere near the level of evidence you would need for that."

Many believe that PPI is the best solution for severe heartburn. "Proton pump inhibitors do have some very positive benefits to patients," said Kenneth DeVault, a gastroenterologist at the Mayo Clinic and president of the American College of Gastroenterology. "They relieve symptoms better than any other medication that has ever been developed."

DeVault added that the most important effect of PPIs is restoration of the quality of life. He stressed that the drug can also reduce the risk for esophageal cancer for some people.

The medical professionals advised to take PPIs if they really need it. However, it's best to explore other options first.