Follow an exercise in creating data using JDBC.
- [Instructor] Now, we're going to actually jump into…code again and create some data in our database.…Okay, so the first thing I'd like you to do is to open up…src, main, java.…And you'll notice that I've put a new folder…in here called util.…And I want to kind of walk through…some of these objects that I've created.…The first is an abstract class called DataAccessObject…and it's going to extend a DataTransferObject…to the generic's interface.…Now, there's a few things here…that I've added to the beginning.…
I've given us a select statement from LAST_VAL…and we'll talk a little bit about what that's for later.…But Postgres uses sequences much the same way…that Oracle uses sequences,…to give you incrementing values on your unique primary keys.…So this is how I'm going to actually go get the value…of the sequence when I update it.…But again, we'll talk a lot more about that later.…I've also defined our customer sequence name…and this can come from the SQL files…that you originally imported into your database.…
The real meat and potatoes comes down below…
AuthorFrank P Moley III
- Deciphering JDBC terminology
- Using containerized PostgreSQL
- Creating, reading, updating, and deleting data
- The Repository pattern
- Using stored procedures
- Ordering and limiting results
- Transactions in JDBC
- Handling exceptions
Skill Level Intermediate
Database Foundations: Core Conceptswith Adam Wilbert2h 14m Beginner
Java Essential Training: Objects and APIswith David Gassner2h 46m Intermediate
What you need to know5m 10s
1. Introducing Java Data Access
2. Data Access Basics
3. Advanced Data Access
Next steps3m 26s
- Mark as unwatched
- Mark all as unwatched
Are you sure you want to mark all the videos in this course as unwatched?
This will not affect your course history, your reports, or your certificates of completion for this course.Cancel
Take notes with your new membership!
Type in the entry box, then click Enter to save your note.
1:30Press on any video thumbnail to jump immediately to the timecode shown.
Notes are saved with you account but can also be exported as plain text, MS Word, PDF, Google Doc, or Evernote.