Defining Core Event Class Properties
An event class represents one type of event used by your Notification Services application. When you define your application, you define an event class for every type of event you maintain in the application database.
When you create the application, Notification Services creates tables, views, basic indexes, and procedures for the event class. A basic event class has a name, event fields, and a filegroup. You define a basic event class when you are defining the application. When you define a Notification Services application, you define all event classes used by the application. All event classes have some common properties, which are described in this topic.
The Core Event Class
All event classes have the following user-defined properties:
- An event class name.
- Event fields that describe the event data and define event table columns.
- A filegroup that specifies where Notification Services creates the event class objects in the application database.
You can also define additional indexes and event chronicle tables. For more information, see Defining Indexes for an Event Class and Defining Chronicles for an Event Class.
Notification Services automatically adds the following event table columns:
- EventID and EventBatchID columns.
- Standard indexes on identification columns.
To define the core event class
If you are defining an application through XML, define event classes in the application definition file (ADF). If you are defining an application programmatically, use Notification Services Management Objects (NMO) for to define event classes.
Event Class Name
Each event class in an application must have a unique name. This name is used to create application objects and for running administrative reports.
To name the event class
If you are defining an application through XML, define event class names in the application definition file (ADF). If you are defining an application programmatically, use NMO to define event class names.
Event Fields
Each event class has one or more event fields. These fields define columns for an event table and for event views. The resulting table columns will contain the event data.
You define event fields much like you define columns for a table. For each field, you must define the field name and the field data type. You can also define field type modifiers, such as whether the field can be null.
Notification Services automatically adds EventID and EventBatchID fields to the event class when Notification Services creates the application database.
To define event fields
If you are defining an application through XML, define event fields in the application definition file (ADF). If you are defining an application programmatically, use NMO to define event fields.
Event Class Filegroup
Each event class can be placed in a filegroup. If you do not specify a filegroup, the event table is automatically created on the default filegroup for the application database.
For more information about filegroups, see Using Files and Filegroups.
To define the event class filegroup
If you are defining an application through XML, define an event class filegroup in the application definition file (ADF). If you are defining an application programmatically, use NMO to define an event class filegroup.
See Also
Concepts
Defining Indexes for an Event Class
Defining Chronicles for an Event Class