Abstract away database references