Discussion on Data Access Interface System and Data Object Model - [3]

zhaozj2021-02-16  61

Discussion on Data Access Interface System and Data Object Model (BEAT 1.0)

81_redstar81@163.com Tomhornson.student@www.sina.com.cn

Personal collection: http://www.9cbs.net/develop/author/neetauthor/redstar81/3.ole DB (Object Link and Embedding Database)

With the continuous development of network technology and database technology, the current application system is getting higher and higher. It is necessary to divide different places, different formats (such as documents, spreadsheets, and) in the relational database, and operating systems. Email, multimedia data, and directory service information or IMS and VSAM data in the host system. The traditional solution is to use large database systems to move all of these data to the database system, then follow the operations The database can be accessed by these data. Although the data can be made in a unified manner, this indirect access method brings a lot of problems, such as data update is not timely, the redundancy and access efficiency of space resources are low. and many more

At this time, Microsoft's General Data Access Technology (UDA) is born, which enables the data application system to access a wide variety of data by implementing the data provider of the standard OLE DB interface, regardless of where the data is resident, You do not need to perform data transfer or copying, conversion.

The OLE DB acts as a data access interface system that reflects the idea of ​​Microsoft's General Data Access (UDA) policy .UDA can access various types of data through standard interfaces. It also provides a set of standard APIs with an ODBC system. However, the OLE DB API is completely CoM, which features a multi-layer model. On the side of the COM communication layer is the data user. This COM-based communication can be summarized as an abstract object. (Such as DataSource, Session, Command, and RowSt), this will happen when the user connects to DataSource, open session, issue Command, and return data ROWSET, there will be this.

In fact, OLE DB is a system-level programming interface that defines a set of COM interfaces, which encapsulates various data.

The accesses of the system, this set of interfaces have established standards for data users and data providers, and OLE DB also provides a set of standards.

Service components, used to provide queries, cache, data updates, transaction, etc., so data providers only need to implement one

Some simple data operations. All data control capabilities can be obtained in the user.

The OLE DB system includes the following components (shown below):

Data Provider (Data Provider) Provides data stored components and data, data smaller to ordinary text files, large to complex databases on the host, or email storage, is an example of data providers. Some documents put these software The developer of the component is also known as the data provider.

Data Service Provider (Data Service Provider) is located on the data provider, separated from the past database management system, runs independently running function components, such as query processor and cursor engines, which make data providers The data provided is expressed in the form of Tabular Data (regardless of how the real physical data is organized and stored), and the data is queried and modified. SQL Server 7.0 query handler is this component Typical examples.

Business Component utilizes a data service provider to complete a specific service information, a functional component that can be reused. The middle layer (Middle-tier) in the distributed database application system is a typical example of such components.

Data Consumer Any system programs or applications that need to access data, in addition to a typical database application, include development tools or languages ​​that need to access various data sources.

Of course, the image is not a relational data system. Today, almost, the relational database manufacturers provide OLE DB Provider to invest OLE DB new system. Of course, for users who can only get ODBC Provider, as long as you get OLE DB-ODBC Bridge is also possible. As follows: Take the Oracle system as an example) Natural, the OLE DB Provider of each database vendor is generally equipped with ODBC Provider. Support for the unique function of each database system, optimize specific data access, etc. .

4.JDBC (Java Database Connectivity: Java Database Connection)

The development of the application system in the INTERNET / INTRANET, created today's Java. Nature In the Java data application system, JDBC is preferred. Similar to ODBC, JDBC provides a standard data access API for Java developers. .

JDBC is the standard API.JDBC of the Java data application proposed by SunMicrosystem's JavaSoft Division, which is based on X / OpenSQL-based interface (which is also the foundation of ODBC). JDBC ensures that JDBCAPI is implemented on other universal SQL level APIs. This also means that all databases that support ODBC do not add any modifications to work with JCBC. The JDBC design is much based on odbc: 1.jdbc and ODBC are based on X / Open-based SQL call-level interface

2. Many design thoughts are followed by ODBC, including many abstractions and SQL CLI implementations.

3. The overall structure of JDBC is similar to ODBC, with four components: applications, driver managers, drivers, and data sources, and the original work is also large with ODBC. In addition:

1. JDBC maintains the basic characteristics of ODBC, also independent of a specific database.

2. Use the application of the same source code to access different DBMs by dynamically load different DBMs. When connecting different DBMs, each DBMS is identified only by different URLs.

3. JDBC's DatabaseMetAdata interface provides a range of methods to check the support of DBMS for specific features, and determine what characteristics, so that the characteristics of a particular database can be supported

4. JDBC also supports the establishment of multiple database connections in the application, using JDBC to easily access multiple heterogeneous databases with SQL statements, laying the foundation for interoperability between heterogeneous databases.

However, due to Java, there is a support for hardware platforms and operating system. This is mainly because ODBC is based on C, while JDBC develops .java language with Java language, has nothing to do with the platform, strong portability, high security, A wide range of stability, distributed, object-oriented, etc., JDBC makes "100% pure Java" solution. Using Java platform independence is more suitable for database applications on the Internet on the Internet. In addition, JDBC driver management The device can be built into, or automatically downloaded by web browsers, no need to install, configure, ODBC driver manager and ODBC driver must be installed, configured separately on each client.

The above mentioned above, JDBC is composed of ODBC, the working principle is basically the same, in fact, even if there is a difference, it is only because the driver has a difference. Generally, the Java driver solution has four: 1.jdbc-odbc bridge 2. This machine API / Group Java driver 3. Network protocol / full Java 4. Native Agreement / Full Java

Second, data object model discussions (to be continued) Appendix: US Famous Database Product Notepad (Reference)

Second, data object model discussion (to be continued)

------------------------------------------------statement- --------------------------------------------------

This document describes the development history of the data access interface and the data object model, which describes its trajectory. I hope to help the data system developer. In this article, For a long time (for myself), please refer to books, there is a mistake, please point out 81_redstar@163.com

This document is labeled, the purpose is to hope that after reading, discovery or need to be added, contact me, modify it, to improve it, make it a lasting online reference. Beat 1.0 2003.2.25 -----------------------------------

转载请注明原文地址:https://www.9cbs.com/read-23573.html

New Post(0)