Database connectivity [insert and query]