locked
subscription with foreign key relationship - is it possible? RRS feed

  • Question

  • I have a following questions about notification services:

    I need to create a subscription with parent-child relationship. For example we have the following two tables to represent the subscription:

    <Subscription>
    - subscriberId
    - subscriptionId
    ,,, other details

    <SubscriptionState>
    - subscriptionId
    - stateId

    and event data has the following:

    <EventData>
    - EventBatchId
    - EventId
    - stateId
    ... other details

    and the matching rule (very simplified example) will be something along the lines ... AND <EventData>.stateId IN (SELECT stateId FROM <SubscriptionState>)

    As far as I can see there is no way to create a subscription rule like that. My guess is that I need to create custom tables, stored procedures, etc for tables like SubscriptionState. Is there another way?

    Wednesday, December 13, 2006 1:57 AM

All replies

  • Chronicles tables can be used to manage state. You can use chronicle rules or event query rules to add/update rows in the chronicles table without having to create other tables/sprocs/etc.

    HTH...

    Joe

    Wednesday, December 27, 2006 2:29 PM