Chapter 10: Getting Your Data into Shape

Team-Fly

Overview

NO, THIS CHAPTER IS NOT ABOUT thinning the fat rows out of your cursors—which might not be a bad idea. It is about using the ADO Shape syntax to manage hierarchical data. But what is "hierarchical" data? Most of us work with hierarchical data most of the time without knowing it. For instance, when you work with a Customers table that is tied to an associated Invoices table, which has an associated Items table, that's a hierarchy. The difference between a normal query and a hierarchical query is that the relationships are embedded in the hierarchy. That is, the schema of the relationship is part of the hierarchical structure. This way, the tool used to reference the data "knows" that there can be from zero to n orders for each customer and the Order table's CustID should point back to a valid row in the Customers table.

For some time now, the FoxPro and ADO teams have been working on creating a mechanism to handle the construction and management of data hierarchies. The goal was to facilitate maintenance of the underlying hierarchy tables. In other words, the new ADO technology I'm about to describe is used to fetch data as well as add, change, and delete rows without having to jump through flaming hoops to do so. The result of their work is a new OLE DB provider integrated into ADO and designed specifically to handle this fairly common data structure. This new OLE DB provider—the Shape provider—seems to make it easier to deal with a number of common data access problems, but as we'll see, the provider has a specific targeted audience, and that might not be you.


Team-Fly


ADO Examples and Best Practices
Ado Examples and Best Practices
ISBN: 189311516X
EAN: 2147483647
Year: 2000
Pages: 106

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net