One-time database population from supplied CSV files
This workflow describes how the comprehensive skills, behaviours, knowledge areas, and activity data (supplied as CSV files) are imported into the database during initial setup.
Hierarchical taxonomy across 6 categories
Source: Skills-Skills.csv
Flat list of character traits
Source: Behaviours-Table 1.csv
Household, Society, Well-being, Travel, etc.
Source: Multiple [Category]-Table 1.csv files
Progressive activities with levels 1-3
Source: Multiple activity CSV files
Trigger: Developer runs database seed script or initial app setup
seedDatabase()Main orchestration function that calls all import functions in correct order
Dependencies: Skills must be imported before Activities (for FK relationships)
importSkillsFromCSV('Skills-Skills.csv')Fields: Skill ID, Name, Category, Sub-category, Description, Alternative names
importBehavioursFromCSV('Behaviours-Table 1.csv')Fields: Behaviour ID, Name, Description, Alternative names
importKnowledgeAreasFromCSV(csvPath, category)Called for each knowledge category CSV:
Extracts knowledge domains and links to related skills
Fields: Knowledge Area ID, Category, Sub-category, Description, Related Skills (array)
importActivitiesFromCSV(csvPath, knowledgeAreaId)Called for each knowledge area's activity CSV:
matchSkillNameToTaxonomy()matchSkillNameToTaxonomy(skillNameString)Fields: Activity ID, Knowledge Area ID (FK), Name, Description, Target Skills (array), Progression Level (1-3), Age suitability, Time/Location/Materials
Example: Cooking activities range from "Identify kitchen equipment" (Level 1) to "Cook a meal from a recipe book" (Level 3)
Application ready with complete skills/behaviours taxonomy and activity library
Columns:
Structure: Hierarchical (Category → Sub-category → Skill)
Columns:
Structure: Flat list (22 character traits)
Columns (vary):
Note: Some CSVs have merged cells (implied hierarchy)
Question: Should this be a one-time seed or an ongoing/updatable dataset?
Options:
Challenge: The "Skills used" column in activity CSVs contains comma-separated skill references, but names may not exactly match Skills-Skills.csv
Solution: Implement fuzzy matching with alternative names
Fallback: Log unmatched skills for manual review
Issue: Tech-Table 1.csv contains minimal data (12 bytes)
Options:
Challenge: Some CSVs have merged cells representing hierarchical relationships
Solution: Parser must forward-fill empty cells to maintain hierarchy