Two ways of JDBC query calls