Democracy only works when the people understand its limitations, said former prime minister Dr Mahathir Mohamad.