JDBC and Connector/J (Web hosting india) 10 connecting to the database,
JDBC and Connector/J 10 connecting to the database, to executing SQL statements, to returning results. JDBC is middleware, or an intermediary between the Java language and a database. Fundamentally, JDBC is a specification that provides a complete set of interfaces that allows for portable access to an underlying database. The issue of portability is one of the key aspects of JDBC. Can you imagine using a language like Java which provides the absolute best mechanism for writing an application once and executing it on a large number of platforms and then having to change the code when your organization switches from Microsoft SQL Server to MySQL? That wouldn t be a very portable language in the area of database manipulation. Fortunately, JDBC provides the standard API, and individual database vendors produce the drivers necessary to perform the actual interface between your Java application and the database. This means that Oracle, MySQL, Microsoft, and many other database vendors have taken the time to write all of the code behind the scenes. Since all of the vendors are writing to a common API, you can be relatively certain that the idea of write once, execute often and anywhere is still intact. Because most of the vendor JDBC drivers are also written in Java (more on this in the next section), the drivers can be used on different platforms as well. Not only can you change the platform on which your application runs or where the database itself resides, but you can also change the platform where the database executes. In the case of MySQL, the database system executes on most flavors of Unix and Linux, Windows, and the Macintosh platforms. As you know, Java can be used to write different types of executables, such as Applications Applets Servlets Java ServerPages (JSPs) Enterprise JavaBeans (EJBs) All of these different executables are able to use a JDBC driver to access a database and take advantage of the stored data. Throughout this blog, we use a combination of these applications to illustrate using the MySQL JDBC driver to extract data from a database. For the most part, we use the term Java application to refer to any of the executable types we ve listed, with the possible exception of EJBs. What about ODBC? One of the reasons developers thought JDBC stood for Java Database Connectivity relates to the acronym ODBC (used by Microsoft). ODBC, or Open
Note: If you are looking for good and high quality web space to host and run your java application check Vision java hosting services