added database and getter query