SQLite on iPhone
It seems that many of the internal stores on the iPhone are actually SQLite databases.
The database that stores your text messages are located in /private/var/mobile/Library/SMS/sms.db and can be manipulated with any SQLite client. Similarly, Voicemail database is located at /private/var/mobile/Library/Voicemail/voicemail.db. That same folder also contains all your voicemail audio files, so you can back them up too, if you want.