main shows the way to acess db using queries