First run at database support for the markov module