Build properties db

This is a full rewrite of #1380 (only the db part), as my git-foo is not good enough to let me do that kind of magic. So please review it carefully.

All data and process stuff has been left out.

I'm keeping #1380 around as reference.
Even for the RealDB, I had the same results ... It's probably only implemented for mysql, and the base class has tests for them.