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

zhaozj2021-02-16  52

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/netauthor/redstar81/

I. Discussion on the data access interface system

1. Open Client / Open Server

The middleware of the C / S structure is specifically configured in the client and server side (Note 2: :). Sybase Open Client / Open Server makes interoperability in the distributed heterogeneous environment. Here we are briefly Sybase C / S Middleware Working Principle. The Open Client is the client's API, which allows client applications and third-party tool software to send SQL statements and remote procedure calls (RPCs) to Sybase SQL Server over the network, or via Open Server application (to use Open Server development as a flag) Send to other data sources (database system or Objects Managents or normal data storage) or other types of servers. There are two kinds of servers from Open Client API to channel transmission. Important behavior occurs, TDS (same as Telnet, FTP, etc.) formatting program is responsible for converting the upper layer of API call SQL or RPC to the TDS message package to support a network library of multiple transmission procedures The TDS package is formatted by the corresponding client and the server-side communication protocol. Naturally, there are many behaviors with other network applications before the client, channel transmission behavior (detailed information on the relevant protocol model) .open server It is the server-side API that allows the client to send a request to a non-SQL Server data source or other type of server in the form of a SQL statement or RPC. Then, the data source or special server is returned to the client in a standard TDS format and Data. Open Server can constitute a more ideal C / S structural environment, that is, all clients can interact with all servers in a unified manner, and all servers can accept client requests in a unified manner, and standardized The format returns the result to the client. As an extension, we introduce the knowledge about OPEN Client / Open Server, so that the reader sees some historical factors in the ODBC system analysis of the following detailed discussion. In fact, as mentioned above All Open Client / Open Server is API, until Sybase System 11, the mature API contains client-library, client-library, and server-library with public CS-library. Important comparison enumerations

1.Client-Library is better than old DB-Library and Client-Library is independent of SQL.

2. DB-Library does not support the server-side cursor. Client-library function, support all types of cursors, including sensitive and insensitive cursors

3. Open Server is the server-side API to develop server-side applications. Provide consistent data access framework capabilities. Open Server applications can be used with Sybase SQL Server to connect to other data sources to use Open. Server API develops Sybase Open getway.

Here is a slightly, through the functionality implemented to the Open Client / Open Server, at that time, the interface system of the database system service characteristics, ODBC, etc., the comprehensive analysis of the current database system service characteristics, you will send

The Open Client Application (Open Client Application, the application of Sybase Open Getway, Normal DataSource Application, Mail Open Client, and other unified data access frameworks) can also achieve the same function but implemented in the later data interface system. The implementation of the function and its distribution are different. Although there are some shadows to now.

2.Odbc (Open Database Connectivity) ODBC is an important part of Microsoft Windows Open Standards Architecture (WOSA, Windows Open Services), which is released by Microsoft at the end of 1991, which has become an in fact industry in just a few years. Standard. It has established a set of specifications that provide a hierarchical API (support SQL) with a hierarchical API (supporting SQL), which solves the non-standard core, data of the embedded SQL interface. The application system uses it to access any database that provides the ODBC driver (a set of DLLs), ending the era of the past for different database system development must master the corresponding data access API. In fact, the ODBC system can be regarded as a unified data. Access interface, so that this unified data access is possible is the corresponding ODBC Provider (ODBC provider, ie ODBC driver) provided by each database product manufacturer, but ODBC generally only uses the relational database, it is difficult to access object databases or Other non-relational databases or data systems. The composition and working principle of the ODBC system are briefly described below. ODBC specification interpretation, the ODBC system has four components: Application, Driver Manager, Driver, Data Source. (As shown below). Combined with real-world The development work process is as follows:

1. Data application system first obtains DSN established in the ODBC Data Source Manager (stored with the data provider connection contains database locations, database types, and corresponding ODBC drivers, etc.), then Driver Manager relying on a kind of called Database Independent Communications Technology's technology is connected to the data source (which involves multiple Agent objects of the client and server side, details are not described, see the figure below).

2.Driver mangaer calls a specific ODBC driver converts the ODBC standard API to function calls for specific database systems (depending on the database feature, there is also a SQL syntax difference here), and then send it to the data source via the client REQUEST AGENT .

3. Data Source Database Agent Processing Actions Returns the results to the client's Request Agent, and then DRIVER (here there will be translation and standardized error code), Driver Mangaer returns to Application.

It should be noted that definition and operation cursor, maintenance, responsible for interacting with the necessary software layers to access the data source (including software with the underlying network or file system interface) is also completed by the driver.

Combined with the ODBC API call order description workflow: Initialization (allocated environment ---> Assigning connection handles ---> connection with server ---> Assigning clause handles) ------> SQL processing (statement processing And retrieval part) --------> Termination (release the clause handle ---> Disconnect with the server ---> Release the connection handle ---> Release Environment).

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 the user connects to DataSource, open the session, open the session, and return the data, and return data ROWSET, there will be this situation. In fact, OLE DB is the system. Level programming interface defines a set of COM interfaces, this set of interfaces package 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.

to be continued:

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

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

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

New Post(0)