Added sql database code