Win a copy of Learn Spring Security (video course) this week in the Spring forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Learing database is missing from the Java book

 
Yasser Youssef
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hey all!

hope you're all fine.

I am a C# developer who wants to "upgrade" to Java. I bought lots of books from HeadFirst. One of them called "Learn Java". It's a great book. But while i was browsing the contents table, I couldn't find any topic about how to interact with the databases! In C#, we learn the ADO.NET and how to use this framework.

Why was is missing from the book? Where can I find it? Are these other books that deal with this topic?

Please help .. i want to start working using Java.

Thanks a lot,
Yasser H. Youssef
Senior Web Applications Developer
 
K. Tsang
Bartender
Posts: 3348
12
Android Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Yasser,

Database connectivity with Java is JDBC. I'm not sure why the book doesn't cover JDBC. I'm not sure what DBMS you are using. For example let say you use MySQL. Then the following code should get you started:



The JDBC driver is the key, once found MySQL drivers, make sure to place it in the "lib/ext" directory of the JRE.

Hope this helps.
 
Jan Cumps
Bartender
Posts: 2584
11
C++ Linux Netbeans IDE
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
once found MySQL drivers, make sure to place it in the "lib/ext" directory of the JRE.
I don't think this is common practice.

Just add the jdbc driver to your classpath.

Regards, Jan
[ October 06, 2007: Message edited by: Jan Cumps ]
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic