On Day 8, you learned some power tools that relational database servers have to offer. You learned about transactions, triggers, aggregate functions, and views. These tools can enable you to build highly advanced database applications. Transactions enable reliable changes to the data. Triggers make the database react automatically to changes in the data. Aggregate functions cause the bulk of the data processing to happen at the server. Finally, views enable you to customize the way people see your database.In Day 9s lesson, you learned the basics of COM. You learned that COM is based on C++ abstract base classes, called interfaces. You also learned that the COM libraries (part of the Win32 API) provide a way to create instances of classes indirectly, thereby avoiding any build-time dependencies between clients and servers. Traditional DLLs are good for sharing common code among concurrently running applications. However, to build real component-based software, the capabilities afforded by COM are essential.
You learned in Day 10 how to program Microsoftís database client technologies. Several database client technologies are available to C++ programmers. Each technology has its own strengths and weaknesses, and each one has an historical context that defines how it relates to the other technologies. The two database client technologies that will be updated and improved on in the future are OLE DB and ADO. ADO offers a good balance of code size, performance, and ease of use. You can best understand the ADO object model by examining the MSADO15.TLH file and the MSADO15.TLI files, coupled with the ADO documentation.
On Day 11, you learned how multitier applications promise easier updates and maintenance than traditional client/server applications. The tools for building multitier applications have evolved rapidly over the past few years. XML is a technology that in the future will be widely used to transmit data in multitier applications. Some of the more recent developments, such as ActiveX controls and RDS, promise to enable client/server-type development in an intranet environment.
In Day 12s lesson, you learned that the infrastructure necessary for multitier applications is difficult and time-consuming to build yourself. MTS can do most of that work for you. MTS components are COM DLLS that you can build with ATL. In your component code, you can create ADO Recordsets from database queries and send the Recordsets to applications on the client tier. IE4 can host ActiveX controls and, with RDS, can instantiate and communicate over COM, DCOM, and HTTP with MTS components that you build.
You learned, on Day 13, that melding an object-oriented application with a relational database requires you to write a translation layer between the object code and the relational database. This translation layer can be difficult and time-consuming to write. However, your application and your database can derive great benefit from the synergies of these two technologies.
On Day 14, you learned a history lesson in technology progression. ODBC was the first good attempt at shielding the application programmer from all the nitty-gritty associated with developing database applications. DAO was the follow-up API that was aimed at closely matching the object-oriented programming nature of C++ with the relational nature of databases. Hopefully, after reading this chapter, you can come closer to understanding the big picture of the two APIs. By understanding the steps and environment of these APIs, you will become more proficient at migrating to the newer OLE DB and ADO technologies.
© Copyright, Sams Publishing. All rights reserved.