Bayesian Methods to the Database Inference Problem