The past and present of Java Data Objects (JDO)

Source: Internet
Author: User
Tags dbase odbc connection

 1 Java and database applications, JDBC

Since the invention of Java, in just a few years, it has quickly occupied the application development market from desktop applications (J2SE) to servers (J2EE) and small-sized embedded systems (j2s, the language draws on the idea that everything in SmallTalk is an object. It is free from the historical burden of C ++. Its concise and free style has won the favor of many developers. Since JDK1.1, Java has become a practical language, rather than a new product to be watched. After a large number of enhancements (especially Collection Framework) of JDK1.2, JDK1.3 has increased the efficiency of virtual machines (HotSpot ), JDK1.4's integration of hundreds of leaders (such as Logging, RegExp, and NewIO) is now mature and sedated.

In the enterprise-level market, most applications are built on databases, and data is the life of an enterprise. Traditional development languages, including process-oriented C, object-oriented C ++, variant Pascal's Delphi (very good language, I have used it for four years), and data-oriented PowerBuilder, he has successively demonstrated the style on the stage of database development. Of course, Java will not let go of this, so JDBC appears. With the help of JDBC, Java also rapidly penetrated into the database development market, especially for Enterprise Server application development.

JDO is closely related to JDBC, although JDO is not just a Data Object packaging specification for JDBC. Next we will briefly introduce JDBC.

1.1 connection to relational databases

The history of relational databases is hard to understand. I can only briefly describe what I have learned from my experiences and experiences. At the earliest time, computers appeared only in some large research institutions, not to be involved by the general public. Apple Computer introduced PCs into the public, and with the opening of IBM's PC standards, PC gradually became popular, coupled with Microsoft's DOS operating system and Borland's Turbo series language development environment, the common people found that computers could do so many things! Later, DBASE, a simple relational database system, and SQL language emerged. Later, Borland saw the market prospect of the database and launched Paradox (which is still used in current Delphi and C ++ Builder), occupying most of the civil database, borland simply acquired Dbase and later bought InterBase, keeping the database market's leading edge in Windows3.0. At this time, Microsoft launched 2.0 and more stable 3.0 and Win32API after being scolded by Windows 3.1 and, which created the dominant position of the desktop operating system on PCs, when Borland was not alert, he purchased a Fox Company that had the same Dbase-like database technology and quickly made it easy to use. It formed FoxBase and then evolved into FoxPro, gradually surpassed Borland and became a large user of personal computer databases. Microsoft has developed Access for easy-to-use and low-load database applications, winning the hearts of developers. Of course, Oracle, Sybase, Informix, and other commercial databases in the same period became top leaders by focusing on enterprise-level database technology. Of course, Microsoft wants to become one of the high-end database vendors, so it develops a set of databases for enterprise-level applications on its own. However, soon the project died, and Microsoft was unwilling to purchase the underlying TDS Technology of Sybase, packaged as SQL Server, Microsoft's high ease-of-use features have also occupied many markets.

When many database products appeared on the market, Borland and Microsoft both found that they own a large number of database products and the market was not small. Different products brought different configuration tasks to users, this is not conducive to the promotion of all products. As a result, both of them began to develop database access specifications. Microsoft released ODBC, which gradually became recognized by developers, borland integrates IBM and Novell and also introduces IDAPI database interface specifications, that is, the core of BDE today, but later Novell and IBM quit, with only Borland alone. However, Borland is a company with strong technical strength, and its technology has always been ahead of Microsoft. BDE's performance is several times better than ODBC in the early stage. Later, Microsoft stole the skills to learn, by adding connection pools and other technologies to ODBC, when Delphi3.0 and its bde are infinitely good in the market, they are gradually catching up and exceeding. Until today, BDE is still the online database access standard for Borland products. If Microsoft does not embed ODBC and most database clients into Windows, it is estimated that BDE is still the winner in the market. However, Microsoft is a veteran of the market. Through its monopoly on operating systems, its database products and ODBC standards eventually occupy the majority of the Development Market.

1.2 Standard APIs from optional pack to JDK

After Java began to involve database applications, Sun made every effort to develop Java database specifications. JDBC APIs are similar to ODBC, and the underlying protocol for database access is basically packaged, then a unified data access interface is formed. database connection, SQL statement handle, and result set all have ODBC shadows. For the purpose of convenient configuration, Sun strongly recommends the TYPE 4 JDBC driver of a completely thin client. This is a driver specification that does not need to install the database client and is currently the most used. Of course, to maintain compatibility with the old database, the JDBC Specification includes the TYPE 1 driver dedicated to ODBC connection and the TYPE 2 driver that needs to be installed on the database client, and the TYPE 3 driver that the vendor can provide specifically for JDBC services on the database server.

When JDBC first appeared, it was not part of the standard JDK, but was downloaded as an additional package. Later, with the increasing number of database applications written in Java and the gradual maturity of JDBC specifications, JDBC was finally part of JDK.

JDBC is currently the latest version 3.0, and Version 4.0 is being discussed. In fact, the most frequently used API in development is the 1.0 API. In 2.0, APIs that can be rolled in two directions and updated in batches are added to improve availability and performance, 3.0 adds connection pools, updatable result sets, and other features. 4.0 Improvements will be made to manageability and connection pool standardization.

  2. object-oriented and database

Today's programmers have no idea about object-oriented. As a development concept close to the real and objective world, object-oriented makes the program code easier to read and design more reasonable. In the common database application field, developers' pursuit of Object-oriented has never been stopped. Since 1980s, many companies and research institutions have been conducting research on the combination of object-oriented and database.

2.1 SmallTalk, C and C ++, Delphi-Object Pascal, and Java

The object-oriented language has several prototypes at the earliest. IBM's SmallTalk is the most popular among them. In SmallTalk, everything is an object and everything is a class, it brings the object-oriented concept to the extreme. Compared with the traditional process-oriented approach, object-oriented programming makes a huge step forward, enabling people to realize that the original software can be written in this way. However, due to the limitations of the basic structure of the computer and the underlying hardware system and system software, SmallTalk cannot be extended to common applications with ideal performance, this temporarily limits the development of SmallTalk. Then, the object-oriented C ++ of C language emerged. Many people use the C language, C ++ soon became the mainstream language for object-oriented programming. However, to ensure compatibility with C, C ++ retains a lot of process-oriented traces, such as disgusting pointers and global variables. Pascal's simplified version of Object Pascal is relatively secure. Later, Borland simply changed the name of Object Pascal, called Delphi. From then on, Borland created a new world of object-oriented programming, delphi's rigorous syntax and rapid compilation attract a large number of application developers. with Borland's perfect VCL component system, it is easier than MFC. In addition, Delphi's complete database component, it also makes database development simple and easy. Delphi once again becomes a mature object-oriented development language. Of course, Microsoft will not let go of this. By building MFC into the operating system, Microsoft's VC ++ has also taken back some markets. This is why the applications developed by Delphi are larger than those developed by VC and VB after compilation.

In 1995, a Sun development team originally developed the OAK language for a small embedded system. The result was unintentional, And the Java language was developed, it is an object-oriented language that completely removes the burden of traditional languages. Of course, it also retains some non-object-oriented core (original type) to ensure speed. Java is also one of the most popular object-oriented languages. Of course, Microsoft will not let it go. Microsoft, which is good at imitating it, immediately creates a C # To compete with it, and retains some variant pointers in C) to attract traditional C developers. The features of these languages are not described here.

2.2 database and data visualization

Databases are indispensable for enterprise-level applications. Therefore, database vendors are also studying data objectization when Object-oriented approaches are popular. These studies emerged in the 1980s S.

There are two ways to visualize a database: one is to add the object feature to a mainstream relational database to provide object-oriented services, but the access language is based on SQL; another direction is to abandon relational databases and design databases with a new object-oriented concept. This is the object database ODBMS.

2.2.1 relational database objectization, SQL99 and JDBC3.0

As many relational database vendors begin to provide object-based services, their interfaces are not compatible with each other. After some troubles, relational database vendors feel the need for standardization, since the SQL92 standard played a major role when relational databases dominated the world, you can access high-performance commercial databases in a unified way.

Relational Database service providers are centralized to normalize the object-oriented service, forming the SQL99 specification, standardizing the object structure and other content, and starting a brand new object-oriented Relational Database Service (ORDBMS).

JDBC3.0 is introduced in this case. It standardizes the access API for object services in relational databases and provides a standard way for the Java platform to access ORDBMS. Of course, JDBC3.0 has also improved many functions for traditional SQL operations.

Oracle is a traditional relational database vendor. In terms of objectization, Oracle certainly adopts the path of adding objectization features to intrude into the market of Data objectization and maintain the leading position of Oracle in the database field. If Oracle7.4 enables Oracle to flourish, Oracle has become a pioneer in relational databases and object types since Oracle8. In Oracle8, we can define some data structures (Record), package common types into data elements, and then access them by Record structure on the client, initially, it provides object-oriented database services.

2.2.2 Object Database

An object database is a brand new database type designed with a brand new object-oriented concept. In this regard, it is mainly designed and developed by some university research institutions, and some have also formed products, however, due to market reasons (mainly the ease of use of relational databases and absolute market leadership) and some inherent weaknesses of ODBMS (such as the difficulty in optimizing the query engine ), this makes ODBMS not as popular as relational databases.

However, the object-oriented features of object databases are still unacceptable. At present, there are still some good products available in the market, from commercial to free. Currently, Versant, FastObjects, and ObjectStore are the leaders in the ODBMS field, and their market share is gradually expanding. Free Products include C ++-compiled Ozone and Java-only db4o. Other research institutions

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.