Reading data

- [Instructor] So now that we've talked about creating data…and how result sets work, let's jump in and actually…read some data from our database.…I'd like you to jump into your IDE.…And go ahead and open up your project.…And once again we're going to go to source main java…our base package…and we're going to start with our customer DAO.…All right, so once again we're going to create…a SQL statement here.…And we're going to do it by creating…a private static final string.…

And this time we are going to call it get one.…And it will be a select.…Now we're going to go ahead and numerate all of our values…instead of using a star operator.…When dealing with SQL queries in a bit of code…I find it much more efficient to actually go ahead…and write them all out so that you can…track what is what and where it is.…It doesn't always play out the way you would expect…if you don't do this.…

So it's just a lot easier to do.…So go ahead and put all our fields in.…And we are going to select this from customer…where customer ID equals question mark.…

Resume Transcript Auto-Scroll

Author

Released

2/11/2019

Whether developers want to build mobile device apps for Android or web-based or desktop-based applications with the core Java SDK from Oracle, they must contend with the fact that many dynamic applications need to integrate data from a relational database. In this course, Frank Moley helps you get up to speed with the Java Database Connectivity (JDBC) API, showing how to use it to read and manage data from relational databases such as Postgres, Oracle Database, MySQL, and SQL Server in applications programmed with Java. Frank begins by going over key JDBC terminology, the basics of configuring a PostgreSQL database, and how to create the course project. He then provides detailed instructions on how to select and update data, work with transactions, handle exceptions, and more.