added database connection

and sql constructor (select)