Connected the model view to basic database calls