Guide Database Query Reference

[This is preliminary documentation and subject to change.]

The Guide database contains several queries that your application can run to remove unused or out-of-date data records. These queries can be run programmatically from the loader library by using a method such as CLoadApp::ExecuteActionQuery that executes the queries for clena up the database.This method is implemented in the Load sample loader provided with Broadcast Architecture. For more information, see Writing a Custom Loader.

The Guide database contains the following cleanup queries.

Query Action
Delete Dangling Channel Deletes all records from the Channel table that do not have a matching entry in the Time Slot table.
Delete Dangling Episode Deletes all records from the Episode table that do not have a matching entry in the Time Slot table.
Delete Dangling Station Deletes all records from the Station table that do not have a matching entry in the Channel table.
Delete Dangling Theme Deletes all records from the Theme table that do not have a matching entry in the Episode table.
Delete Expired Time Slot Deletes all time slots with end times earlier than the specified time.
Delete Omitted Time Slot Deletes duplicate time slots. Duplicate time slots are identical or overlapping time slots specified for the same show. This query deletes the duplicate time slot with an earlier time in its Last Updated field. For efficiency, your application should pass the start time and end time of the period for which to eliminate duplicates, and also the tuning space.