Welcome to the Treehouse Community

The Treehouse Community is a meeting place for developers, designers, and programmers of all backgrounds and skill levels to get support. Collaborate here on code errors or bugs that you need feedback on, or asking for an extra set of eyes on your latest project. Join thousands of Treehouse students and alumni in the community today. (Note: Only Treehouse students can comment or ask questions, but non-students are welcome to browse our conversations.)

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and a supportive community. Start your free trial today.

Java Hibernate Basics Data Persistence & ORMs Using JDBC to Connect to a Database

I don't see how it's connected?

Following on from the code we wrote in the Workspace, I don't see how that solution applies to this part of the question.

Question: Using Connection c, insert exactly one row into the languages table. The new row's id column should have a value of 2, and its name column should have a value of 'Java'.

If anyone would be able to explain to me how this is done and how that relates the the past video that would be amazing!

Thank you very much for all your help! Alastair

Application.java
// Load class "org.sqlite.JDBC"
 Class.forName("org.sqlite.JDBC");

// Establish connection to database named "treehouse.db"
try(Connection c = DriverManager.getConnection("jdbc:sqlite:treehouse.db")) {

} catch(SQLException ex) {

}