updated DB object to take a definition object rather than seperate parameters