Example code with DB API