Added functions to connect to database

Basic functionality to connect to database and select database is done