Activity Table
The Activity table stores all information relating to activities that take place in an organization. This table has foreign key relationships with the ActivityType, GradeScale, Group, Location, and PersonActivity tables.
The following illustration shows the column properties of the Activity table.
- The ActivityId column is the primary key for an activity. The Identity attribute guarantees that a unique number is generated for each new activity added to the table. The identity seed and identity increment are 1. The first ActivityId assigned is 1 and each subsequently added ActivityId is incremented by 1.
- The ActivityTypeId column defines the foreign key relationship to the ActivityType table. Its data type is int because the primary key in the ActivityType table is an int data type (the Identity attribute requires an int data type). Matching data types are required to create a foreign key relationship.
- The GroupId column defines the foreign key relationship to the Group table. Its data type is int to match the data type of the GroupId column in the Group table.
- The GradeScaleId column defines the foreign key relationship to the GradeScale table. Its data type is int to match the data type of the GradeScaleId column in the the GradeScale table.
- The LocationId column defines the foreign key relationship to the Location table. Its data type is int to match the data type of the LocationId column in the Location table.
- The Description column contains a brief description of the activity.
- The Weight column contains a numeric value (tinyint data type) that defines the importance of this particular activity. The weight is applied as a ratio among the activities that belong to a group. The default value is 1.
- The DueDate column contains the date and time an activity is due. Its data type is datetime, which SQL Server stores as as two 4-byte integers. Because the PT application can switch locales at run time, it can be necessary to transform date and time data to and from the Eval database. About the Formats Component describes how the PT application interprets and translates date and time data.
- The MaxScore column specifies the maximum number of points that can be assigned to the activity. The default value is 100.
- The Average column contains the average score for all persons who are assessed for this activity. This is a calculated value and it is updated by a trigger on the PersonActivity table. Triggers on Eval Tables describes in detail how this trigger works.
- The StandardDeviation column contains the standard deviation for scores of all persons who are assessed for this activity. This is a calculated value and it is updated by a trigger (insert, update, or delete) on the PersonActivity table. Triggers on Eval Tables describes in detail how this trigger works.
- The Comment column contains miscellaneous remarks about the activity. The data type for the column is ntext. Eval Database Columns with ntext Data Types contains more information about this data type.
Note Keep in mind that averages and standard deviations can be used only with numeric data. When only a letter grade (character data) is available from the Grade table, these aggregates cannot be calculated.