What do you mean by implement a database? Do you mean and design and program your own?
If that's the case, a good resource would be to look at the developer guides for popular open source databases, such as the one for PostgreSQL[0], which will give a guide to how those databases are put together.