You don't want to write your own database. If you want to write some crude persistence layer where you're reading/writing files (or something similar), then that's fine.
Here is a link about why you don't want to write your own database: http://ayende.com/blog/162691/worlds-smallest-no-sql-database
If the main reason you don't want to use a third party database like Filemaker Pro is that it costs money ... there are tons of rock solid databases that are free.
Go check out SQLite, MySQL, Postgres, or even MongoDB.