I am thinking of writing a tag engine for files using a relational database, but I can't find much information regarding the implementation of an efficient database. Supposedly there are books out there on this topic, but I haven't found anything.
I try to stay away from using RDBMSes like MySQL and PostgreSQL because I am looking for mostly simple CRUD-functionality and I don't want to require users installing other software just to run mine which I'm planning to write in C. Connecting and querying would also add a bit overhead, though I'm not sure how drastically it compares to that of reading and writing to files if you're connecting to your own computer.
The only thing I can think of is O(n) algorithms for handling simple SQL queries. If there's a selection it would most likely need to be sorted too adding giving it an additional O(n*log n) using quicksort on the resulting relation.