contrib/tnitter: revamp how the DB is handled