MIAS User Manual

📘 ERD Diagram – Database Schema

This manual provides an overview of the database schema used in the system. Each section below includes:

  • An ER diagram of the table
  • A description of its purpose and usage
  • References to related entities

This document is intended for developers, administrators, and technical stakeholders to understand the structure of the application database.

📄 View Database Structure (PDF)

Table: Activity Status

Training Plan Master Screenshot

Purpose: The activity_statuses table is used to define and manage the current status of activities or tasks in the system. It helps track the workflow and lifecycle of projects or operations within the HP Forest system.

It stores status name and supports multiple udf_1 to udf_5 fields for additional metadata. The table also maintains created_at, updated_at, and deleted_at timestamps for auditing.

References:

  • created_by_id → links to users.id
  • team_id → links to teams.id

Table: beats

Training Plan Master Screenshot

Purpose: The beats table manages beat-level information under forest ranges and divisions. It contains beat_name, user-defined fields (udf), and links to divisions, ranges, and blocks.

References:

  • related_division_id → divisions.id
  • related_range_id → ranges.id
  • related_block_id → blocks.id
  • created_by_id → users.id
  • team_id → teams.id

Table: blocks

Training Plan Master Screenshot

Purpose: The blocks table stores information about forest blocks, which are subdivisions of ranges/divisions. It contains block_name, user-defined fields, and associations to divisions and ranges.

References:

  • related_division_id → divisions.id
  • related_range_id → ranges.id
  • created_by_id → users.id
  • team_id → teams.id

Table: compartments

Training Plan Master Screenshot

Purpose: The compartments table stores details of forest compartments, such as compartment_name and compartment_size. It is linked to specific forests and supports monitoring, reporting, and planning.

References:

  • related_forest_id → forests.id
  • created_by_id → users.id
  • team_id → teams.id

Table: cost_categories

Training Plan Master Screenshot

Purpose: The cost_categories table defines categories of costs used in financial and project management. Examples include plantation cost, maintenance, logistics, etc.

References:

  • created_by_id → users.id
  • team_id → teams.id

Table: cost_norm_codes

Training Plan Master Screenshot

Purpose: The cost_norm_codes table stores standard costing information for forestry projects. It includes unit costs, maintenance costs, total costs, and references models, sub-models, and financial years.

References:

  • model_name_id → project_models.id
  • sub_model_name_id → sub_model_masters.id
  • financial_costing_year_id → financial_years.id
  • created_by_id → users.id
  • team_id → teams.id

Table: cost_norm_masters

Training Plan Master Screenshot

Purpose: The cost_norm_masters table defines standard norms for project expenses. It includes costs like training, lodging, meals, travel, venue, and resource personnel.

References:

  • cost_cat_id → cost_categories.id
  • financial_year_id → financial_years.id
  • created_by_id → users.id
  • team_id → teams.id

Table: department_budget_heads

Training Plan Master Screenshot

Purpose: The department_budget_heads table defines budget heads for departments. It is used in financial planning and departmental fund allocation.

References:

  • created_by_id → users.id
  • team_id → teams.id

Table: department_masters

Training Plan Master Screenshot

Purpose: The department_masters table manages master records of departments. Each entry represents a department in the HP Forest system.

References:

  • created_by_id → users.id
  • team_id → teams.id

Table: department_sos

Training Plan Master Screenshot

Purpose: The department_sos table maintains Statement of Expenditure (SoE) numbers and names, linking them with budget heads for financial reporting.

References:

  • related_budget_head_id → department_budget_heads.id
  • created_by_id → users.id
  • team_id → teams.id

Table: divisions

Training Plan Master Screenshot

Purpose: The divisions table stores forest division details. Each division acts as a top-level administrative unit containing ranges, blocks, and beats.

References:

  • created_by_id → users.id
  • team_id → teams.id

Table: employee_category_masters

Training Plan Master Screenshot

Purpose: The employee_category_masters table defines categories of employees, such as permanent staff, contractual staff, agency workers, along with agency names and descriptions.

References:

  • created_by_id → users.id
  • team_id → teams.id

Table: employee_masters

Training Plan Master Screenshot

Purpose: The employee_masters table maintains detailed employee records including personal info, designation, contact, UAN number, posting location, and departmental associations.

References:

  • department_name_id → department_masters.id
  • employee_category_name_id → employee_category_masters.id
  • created_by_id → users.id
  • team_id → teams.id

Table: epa_category_masters

Training Plan Master Screenshot

Purpose: The epa_category_masters table manages EPA categories. It is linked with teams for collaborative management.

References:

  • team_id → teams.id

Table: epa_details

Training Plan Master Screenshot

Purpose: The epa_details table stores detailed information of EPA projects. It captures coordinates, quantity, number of beneficiaries (male/female), expenditure, project share, beneficiary share, and other metadata for effective monitoring.

References:

  • epa_name_id → epa_masters.id
  • epa_category_id → epa_masters.id
  • vfms_name_id → vfms_masters.id
  • user_group_name_id → user_group_masters.id
  • financial_year_impl_id → financial_years.id
  • created_by_id → users.id
  • team_id → teams.id

Table: epa_masters

Training Plan Master Screenshot

Purpose: The epa_masters table stores master records of EPA names and categories. It provides a reference list for EPA-related projects and links to EPA categories.

References:

  • epa_category_name_id → epa_category_masters.id
  • created_by_id → users.id
  • team_id → teams.id

Table: faq_questions

Training Plan Master Screenshot

Purpose: The faq_questions table contains the list of frequently asked questions and their answers, linked to categories for user guidance.

References:

  • category_id → faq_categories.id

Table: financial_years

Training Plan Master Screenshot

Purpose: The financial_years table defines financial years with start and end dates. It supports financial planning and cost allocation across forestry projects.

References:

  • created_by_id → users.id
  • team_id → teams.id

Table: material_masters

material_masters Table Screenshot

Purpose: The material_masters table stores a list of all materials used under various forestry projects. Each material record may include its name, unit, and additional custom fields (UDF1–UDF5) for category-specific data.

References:

  • project_sub_budget_head_id → project_sub_components.id
  • created_by_id → users.id
  • team_id → teams.id

Table: nursery_masters

nursery_masters Table Screenshot

Purpose: The nursery_masters table defines master records for nurseries under each division and range. It includes nursery name, location identifiers, and related metadata for plantation planning.

References:

  • division_id → divisions.id
  • range_id → ranges.id
  • created_by_id → users.id
  • team_id → teams.id

Table: nursery_costs

nursery_costs Table Screenshot

Purpose: The nursery_costs table manages the cost structure for different plant categories and rates by year. It helps in calculating plantation budgeting and financial estimates.

References:

  • financial_year_id → financial_years.id
  • created_by_id → users.id
  • team_id → teams.id

Table: participant_masters

participant_masters Table Screenshot

Purpose: The participant_masters table stores participant details for training sessions. It includes personal details such as name, designation, gender, contact, and training attended.

References:

  • training_attend_name_id → training_held_masters.id
  • created_by_id → users.id
  • team_id → teams.id

Table: physical_self_checks

physical_self_checks Table Screenshot

Purpose: The physical_self_checks table captures results of field-level self-verification for various forestry activities. It records measurements, costs, and validation details from officers during on-site inspections.

References:

  • cost_norm_name_id → cost_norm_codes.id
  • vfms_name_id → vfms_masters.id
  • plot_no_id → plot_masters.id
  • plot_activity_impl_data_id → plot_activity_impl_datas.id
  • financial_year_impl_id → financial_years.id
  • unit_id → cost_norm_codes.id
  • created_by_id → users.id
  • team_id → teams.id

This table provides traceable evidence for field activities ensuring transparency in physical progress verification.

Table: plot_activity_impl_datas

plot_activity_impl_datas Table Screenshot

Purpose: The plot_activity_impl_datas table stores detailed records of activity implementation at the plot level. It logs coordinates, measurements, incurred cost, and status of physical completion for each field operation.

References:

  • activity_status_name_id → activity_statuses.id
  • cost_norm_name_id → cost_norm_codes.id
  • vfms_name_id → vfms_masters.id
  • user_group_name_id → user_group_masters.id
  • plot_no_id → plot_masters.id
  • unit_id → cost_norm_codes.id
  • financial_year_impl_id → financial_years.id
  • created_by_id → users.id
  • team_id → teams.id

These records directly connect to physical field activities, forming the core data for MIAS monitoring and reporting modules.

Table: Audit_logs

Training Plan Master Screenshot

Purpose: The audit_logs table records all significant actions and events within the system. It stores description of the action, the user_id responsible, and subject details (subject_id & subject_type). This enables auditing, traceability, and accountability.

References:

  • user_id → links to users.id

Zoomed Image