I never recommend going with random database X, use something that&#x27;s been around a while and has lots of users, then at least you know that you&#x27;re statistically unlikely to experience a failure mode that nobody else has.<p>Rolling your own on disk persistence and recovery is like rolling your own crypto. What you don&#x27;t know can definitely hurt you, you&#x27;d better be an expert, and even then you won&#x27;t likely get it right the first time around. It&#x27;s just a really hard problem involving complex interactions between your code, the OS, the filesystem, the disk drivers, and your disks all of which can cause data loss in very unexpected ways.<p>Your method can work, but it almost certainly has issues lurking that can cause data loss. You might be ok with that because it&#x27;s a toy project, but it&#x27;s obviously not a good idea for important data.