Database Connection Technology-ole db, database connection oledb
The previous blog introduced ODBC and JDBC. This is a brief introduction to ole db. The ODBC summary does not know whether it is not posted on the blog or not on this blog. I will try again. If not, I will try again later. Okay. Let's get started.
Before that, we have introduced that the basic structure of ODBC and JDBC is the same, that is, they are essentially the same. It is a set of unified interfaces for accessing databases and a series of specifications and APIs for accessing databases. The difference is that ODBC is implemented by C ++ and JDBC is implemented by Java. The reason for JDBC is that the communication between Java program and C ++ ODBC is inconvenient. It can be said that the relationship between ODBC and JDBC is horizontal, while the relationship between ole db and ODBC is vertical. Why?
Why does the history of ole db mean that the relationship between ole db (Object Linking and Embedding, Database) and ODBC is vertical. This should start with ODBC. ODBC is a set of interfaces, but ODBC only supports access to relational databases, which are two-dimensional data databases. However, with the development of technology, we obviously need to face not only relational databases, but also non-relational and hierarchical row data that cannot be accessed using SQL, includes data in the mail system, text on the Web, directory services, and other forms. Therefore, from the data source perspective, the relationship between ole db and ODBC is as follows:
Based on the COM standard ODBC is API-based implementation, while ole db is based on the COM standard. In other words, ODBC must support almost all DBMS features and functions, while ole db can be partially implemented. I don't quite understand what the COM standard is.
Ole db Structure
Ole db includes several logical components. Because it is based on the COM standard, components are independent of each other and only communicate with each other.
Data Provider: a database Provider that provides Data through ole db. The concept of data provider can be compared with the driver in ODBC.
Data Consumer: a program or component that uses the Data provided by ole db.
Service Component: Performs data transmission between the data provider and the data consumer.
Bussiness Component: A function Component that can be reused to process specific business information.
The previous blogs of ole db and ADO have definitely introduced ADO. Here ADO is a further encapsulation of ole db. The relationship in the program is as follows:
In general: Ole db is an extension of ODBC. It is based on the COM standard and has higher flexibility than ODBC. However, it is still a set of standards for linking databases. It is more underlying than ODBC.
In the database connection in Dreamweaver, what are the usage differences between the ole db connection and the SQL connection? Which one is accessible?
Ole db: OLE means "Object link embedding", while DB means DataBase, that is, DataBase. The whole means object link embedding DataBase software.
The code for connecting ole db to ACCESS is:
Strconn = "DRIVER = Microsoft Access Driver (*. mdb); DBQ =" _ & Server. MapPath ("aspfree. mdb ")
Set conn = server. createobject ("adodb. connection ")
Conn. open strconn
Connect to the Database Using ole db in vc
You use the data source to bind the database, and then the program only has a relationship with the data source. After you change the database address, you only need to modify the data source ing on the control panel. You do not need to modify the source program!