Platform SDK: Broadcast Architecture

Guide Database Query Reference

The Guide database contains several queries that your loader application can run to remove unused or out-of-date data records. Your loader can run these queries programmatically by using a method such as CLoadApp::ExecuteActionQuery that executes the queries to clean 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.