Database connection

connect call the necessary functions to connect to db.