Add usage tracking to the database.

Signed-off-by: Geoff Lane <geoff@zorched.net>