Integrate app with database