Insert object into database