Database applications are everywhere in our lives and work. Whether it is a small enterprise's OA system or China Mobile's operating system, it seems that database applications are inseparable. For most applications, whether they are Windows desktop applications or web applications, data storage and retrieval are their core functions. Therefore, database development has become a necessary skill for software development. In the past, if we say "learning data physics and chemistry well, we are not afraid to go all over the world", today's software developers will say "Learning databases well, and never go anywhere !".
ADO. NET is the access architecture of Microsoft's next-generation. NET database, and ADO is short for ActiveX Data Objects. Ado. Net is a bridge between database applications and data sources. It mainly provides an Object-oriented Data Access architecture for developing database applications.
To better understand ADO.. NET architecture model. net objects for graphical understanding, 5-3 shows the ADO.. net.
Figure 5-3 ADO. Net Object Model
We can understand each part of the ADO. Net object model in a visual and interesting way, as shown in Figure 5-4. We can see the status of these objects and the logical relationship between them.
Ado. Net interesting understanding
Interesting understanding |
Compared with the relational graph of database objects in ADO. net, we can use a comparative method to visually understand the role of each object, as shown in Figure 5-4. L databases store a large amount of data like water sources. L connection is like putting a connection in the water into a water cage to keep in touch with the water. Only when it is connected to the water can other objects draw water. L command is like a pumping machine. It provides power and execution methods for pumping water, and uses the "faucet" to return the water to the above "water pipe ". L dataadapter and datareader act as water transmission tasks and serve as bridges. Dataadapter is like a water pipe. It uses an engine to transport water from the water source to the reservoir for storage. Datareader is also a type of water pipe. Unlike dataadapter, datareader does not deliver water to a reservoir, but directly delivers water to a user or field in need of water, so it is faster and more efficient than transferring data in a reservoir. L dataset is a large reservoir that stores the extracted water in a pool with a certain relationship. Even if the "pumping device" is removed (disconnected, offline), the "water" can still exist. This is also the core of ADO. net. L datatable stores different types of water, just like each independent water pool in the reservoir. A large reservoir consists of one or more such pools. |
From section 5.1.2, Liang jian. net.. Net deep experience and practical needs.