Using Non-relational Data Stores

When we talk about databases, we tend to automatically think of relational data sources like SQL Server, Oracle, DB2, Access, etc. However, as you saw in Chapter 1, there is a move towards a more universal data access approach—where the same techniques that we use with a relational database can be used with other data stores.

In this chapter, we've concentrated on how we work with relational databases, more specifically Microsoft SQL Server. However, the same basic ADO coding methods can be used with other types of data source, as long as a suitable driver (or provider) is available.

At the time of writing, the choice of driver was limited. One data store for which an OLE DB provider is available, however, is Microsoft Index Server. This provider is installed automatically when you install the latest data access tools as part of the NT4 Option Pack, and with NT5. There was also (again at the time of writing) a provider 'on the way' for Microsoft Exchange Server.

The Index Server Search Engine

The Wrox Web-Developer site includes a Search feature to allow visitors to find information quickly, both on our site and on the Web as a whole. To search our site, we use Index Server:

Index Server can expose the contents of its catalog (the information about the pages on disk that it has indexed) as a recordset. Using the Index Server OLE DB provider, we can manipulate this recordset using ADO, just like it was a normal relational database table.

While the techniques are very similar, the way we tackle the other issues, like building a query and dividing the results into pages, is quite a bit more complex than the database examples we've seen here. The syntax of the SQL statement that we use to extract the results is a lot more demanding. If you want to use Index Server on your site, take a look at the case study in Chapter 10 that covers our implementation, including the global Web searching feature.

© 1998 by Wrox Press. All rights reserved.