Integration with Database code