I’ve only learned Java last quarter of 2010. I can say the knowledge I gained as of now are not enough and there’s a lot of improvement. I still do studying while developing but most of my code is snippet from other current working application. I guess my way of studying the language affect the way I know it. Instead of learning the basic first, I jump up to advanced features that affect how I understand it. (I did advanced to fulfill my previous project tasks.)
I often connect to my MySql database using import java.sql.connection etc. I’m using Eclipse IDE then when I create an instance of Connection/PreparedStatement and I haven’t imported the packages. Eclipse will show related Packages that’s where mysql.jdbc.* I’ve encountered.
All though I did some research about it still its not too clear for me. The difference of those to packages.
- Does it have pros and cons?
- Does it have a big significance difference with performance and security?
- Does it use in different way?
- Is there more things to know?
I know someone here can enlighten me more about this.
To quote from the javadoc for com.mysql.jdbc.Connection:
So, that class at least builds on top of JDBC to add more features. But it’s still JDBC at heart – you’re using this class when you use pure JDBC, you just don’t see it.
I would say that if you can build your app using only the standard JDBC interfaces, do so. If you absolutely need MySQL-specific API features, then use the MySQL interfaces. I work with Oracle mostly, and in all the years i’ve been doing it, i’ve never had to fall back to any Oracle-specific interfaces; there’s a huge amount you can do with JDBC.
To address your points: