basic database writing operation