Added start of code to communicate with database