arm
Table Name: arm
The arm table defines various arms or subgroups within a program. Each arm can be managed by specific users and is linked to a program for organizational purposes.
Columns
| Column Name | Data Type | Constraints | Description |
|---|---|---|---|
| armId | int(11) | Primary Key, Auto Increment | A unique identifier for each arm. |
| armName | varchar(255) | Nullable | The name of the arm, providing a descriptive label. |
| createdByUserId | int(11) | Nullable, Foreign Key | Links to the user table, indicating who created the arm. |
| lastEditedByUserId | int(11) | Nullable, Foreign Key | Links to the user table, indicating who last modified the arm. |
| programId | int(11) | Not Null, Foreign Key | Links to the program table, indicating the program to which this arm belongs. |
| reminderSMSAllowed | tinyint(1) | Not Null | Indicates whether sending reminder SMS is allowed (1 for yes, 0 for no). |
| enrollmentLimit | int(11) | Not Null | The maximum number of enrollments allowed for this arm. |
Indexes
- Primary Key: armId
- Ensures each arm has a unique identifier.
- Foreign Key Indexes:
- arm_lastEditedByUserId_user_mappedId_FK: Optimizes lookups for lastEditedByUserId.
- arm_createdByUserId_user_mappedId_FK: Optimizes lookups for createdByUserId.
- program_programId_arm_programId_FK_idx: Optimizes lookups for programId.
Foreign Key Relationships
- user table:
- createdByUserId: Links to user(mappedId) to identify the user who created the arm.
- lastEditedByUserId: Links to user(mappedId) to identify the user who last edited the arm.
- program table:
- programId: Links to program(programId) to associate the arm with a specific program.
Usage Notes
- Purpose:
- The arm table organizes entities or participants into subgroups within a program.
- Facilitates subgroup-specific configurations, such as enrollment limits and SMS reminders.
- SMS Reminders:
- The reminderSMSAllowed column governs whether participants in the arm can receive reminder SMS notifications.
- Enrollment Limits:
- The enrollmentLimit column ensures a controlled number of participants can be associated with an arm.
- Management:
- The table includes fields to track who created and last edited each arm for auditing and accountability.
- Integration:
- Heavily integrated with the program and user tables to maintain structured and hierarchical data relationships.