setup code for the smartsocket database