If you touch something new, you may feel at a loss, but if it is the old thing, is it hard for you to learn?
First,ODBC, our old friend.
the ODBC (Open database Connectivity) is the interface specification for Microsoft Corporation and the database.
Essence Point:
1.ODBC , set up a set of specifications and provide a set of standards for database access API , standard application Data interface.
2.ODBC is to use C language Implementation, the use of a large number of pointers.
3.The use of ODBC drivers isolates applications from specific database calls, the driver manager centrally manages individual drivers for a particular database, and provides a unified standard interface to the application .
4. structure model: divided into four parts, application interface, drive Manager, database drive and data source. Detailed View:
Second,JDBC, should be the voice of the
java The emergence of language, swept the world. At that time java Personnel with odbc To operate the database application, encountered a lot of trouble, such as odbc c language implemented, and contains a lot of pointers to java completely object-oriented thinking is a big conflict, resulting in java Many of the outstanding features can not be used, such as platform-independent, object-oriented features and so on.
as a result,SUN has developed a database application development interface dedicated to the Java language interface.
JDBC (Java database Connectivity) is the interface specification for Java and database .
Essence Point:
1.JDBC defines a generic low-level application programming Interface (API) that supports standard SQL functionality.
2.JDBC is to use Java language implementation, completely object-oriented ideas, platform-independent, strong consistency, security and stability, distributed, easy to use and other advantages, and also extends the Java 's ability.
3.JDBC is Java through database-driven communication with the database, using Java platform-agnostic, the JDBC application can naturally achieve cross-platform characteristics, and thus more suitable for heterogeneous environment on the Internet database applications. (As with ODBC )
4. structure model: divided into four parts, application interface, drive Manager, database drive and data source. (As with ODBC ) See figure:
Third, compare to learn
Same point:
1.JDBC with the ODBC are based on X/open of the SQL call-level interface;
2.JDBC Many design ideas follow the ODBC , including many abstractions and SQL CLI implementation; . Both ODBC and JDBC provide support for the SQL language;
3.JDBC is similar to the overall structure of ODBC ,
different points:
1.ODBC is by Microsoft Corporation, with C language, in which a large number of pointers are used; JDBC is by SUN Company, with JAVA language-written, fully object-oriented thinking.
2.ODBC difficult to learn, ODBC by mixing simple functions with complex functions, even simple things can lead to complex operations. JDBC easy to learn, design ideas are simple things to do, and when necessary, allow users to use advanced features.
3.ODBC the drive management programs and drives must be manually installed on each client computer; JDBC Drive because it's all used JAVA written, so JDBC can be in all the JAVA automatically installed on the platform.
Iv. Expansion and summary
Extensions:
jdbc-odbc , The reason it appears is simple: we sometimes need to Connect to Microsoft's database in the JAVA language, But because Microsoft's database is not written by JAVA , we need a bridge connection.
Specific implementations are not mentioned here, but one thing to note is thatJDBC is directly connected to the database using JAVA's database driver, and Jdbc-odbc Connected is the ODBC data source, the actual connection to the database is ODBC !
Summary
The technical summary is summed up in the comparison, here just to illustrate a point, I myself from the beginning to understand JDBC, and then think of ODBC, but for ODBC is limited to use, so feel very messy, finishing a few days later, found that the most able to make their own understanding of the relationship is "traced back", from the "root" on the search , this kind of knowledge of the network to grow, outward expansion or more dense feeling, Instead of a sudden emergence of a point, let their brains, mechanically to find the relationship, but naturally, shun growth, feeling or this kind of learning is better, and efficient, recommended to everyone!