Sometimes it happens to (accidentally) delete records from Calendar or Contacts. How it is possible to recover them?

[In old palm os they were stored in dedicated files and I could access all deleted records at least on my PC.]
thanks