@eniko SQLite is almost certainly what you want. Old, slow-moving and reliable project made by people who take seriously the fact that their software messing up could means cars crash and planes fall out of the sky.
The only alternative I'd take seriously is to use the old "write out everything to a new file and rewrite it into place" trick, but that gets tricky if worlds are big and you only wanna load and save parts of it at a time