Basic db querieng coming together.