Hans explains the backend data architecture of a specific actuarial modeling software (likely an object-oriented system). His goal is to explain how to take raw data (from a client) and format it correctly so it can be imported into this software.
Here is a methodical, part-by-part breakdown of what Hans is teaching, including the sub-context and examples used.
Part 1: The Core Structure (The "Template")
Hans begins by teaching that the software is rigid. It cannot read random Excel files; it requires data to be formatted into a specific template or shape before it can be imported.
- The Lesson: regardless of what data you are importing (expenses, premiums, loans), the Header Structure is always identical.
- The Structure: Every table used for import must have these specific columns:
- Run ID
- Section (The category, e.g., Expenses)
- Shape
- Table Name
- Row Options
- Data Columns: C1, C2, C3... up to C100
- Sub-Context: Hans emphasizes that while the headers stay the same, the meaning of the columns changes based on the "Shape." In one table, C1 might be a dollar amount; in another, it might be a percentage
Part 2: The "Expense" Example (Practical Application)
To make this abstract concept concrete, Hans uses the example of an Expense Table.
- The Scenario: An insurance company incurs expenses (paying employees, rent, etc.) to maintain policies
- The Math: If a company spends $100,000 a year to maintain 1,000 policies, the expense is 100perpolicy(100,000 / 1,000).
- The Software Implementation:
- You don't just type "$100" anywhere. You must put it in Column C1 or C2 because the "Expense Shape" is programmed to read costs from those specific columns
- Hans notes that C1 and C2 are the most commonly used columns for expenses
Part 3: The Workflow (The "Credit Card" Analogy)
Hans explains the workflow of getting data into the system. You cannot usually go straight from a raw client file to the software.
- The Workflow:
- Raw Data (Excel): You receive a messy "data dump" from a client
- Intermediate Step (Database/Access): You must clean that data and put it into a Microsoft Access or SQL database that matches the "Template" described in Part 1
- Import (The Software): The software reads the Database and creates the objects
- The Analogy: Hans compares this process to applying for a credit card
- The Form: The Database Template. You must fill out the application form exactly right.
- The Bank Officer: The Database (Access). It receives your form.
- The Credit Card: The final Object in the software. Once the officer (Database) accepts your form, the bank (Software) issues the card (creates the table).
Part 4: Advanced Concepts (Switches and Compounds)
Hans introduces two complex features of the table shapes.
1. Negative Numbers as "Switches"
- Concept: In the data columns (C1, C2), a positive number (like 50) is a value. However, a negative number (like -1 or -4) is not a value; it is a switch or an option
- Example: If you see "-1" in a row, it tells the software to turn on a specific feature or look for a specific type of calculation logic rather than just reading it as "negative one dollar"
2. Compound Tables (Parent/Child)
- Concept: Some tables are "parents" that hold other tables inside them
- The Rule: You must create the Child Table first.
- The Link: The Parent table (Compound Table) doesn't hold raw numbers in C1 or C2. Instead, it uses special columns called Link Section and Link Table to point to the Child table you created earlier
Part 5: The Goal (Why are you learning this?)
The sub-context of the entire discussion is a development project you are working on together.
- The Problem: Clients give "data dumps" (messy Excel files) that the software can't read because they don't match the rigid "Shape".
- The Solution: You are trying to build an interface/tool.
- The Vision: A user should be able to drop a messy file into your tool, select a "Shape" from a dropdown (e.g., "Policy Loads"), and your tool will automatically map the messy data into the rigid "Run ID/Section/Shape/C1/C2" format required for import.
- Next Steps: Hans proposes starting with a small prototype using the "Term Product" data to manually map expenses, so the machine can eventually learn to do it automatically.
Notes
Shape vs. Template: Understanding the Logic Layer
In our recent discussion regarding database architecture, a crucial distinction emerged. To ensure clarity in our documentation and implementation, we need to distinguish between the physical Database Template and the functional Shape.
Here is the precise breakdown of why "Shape" is the defining term for this concept.
1. The Database Template is Fixed
The Database Template (or the "Form") is the static container. Regardless of the data being processed, the visual structure in the database remains identical.
- Consistency: It always contains the same headers:
Run ID,Section,Shape,Table Name, andRow Options. - Capacity: It provides a standardized grid of columns ranging from
C1throughC100.
2. The "Shape" Defines the Logic
If the template is the "hardware," the Shape is the "software" instruction. It tells the system how to activate and interpret that fixed template.
- Column Activation: The Shape dictates which columns are relevant. One shape might only require
C1andC2(e.g., an expense table), while another might utilize the full range up toC100. - Data Interpretation: As Hans noted, "Each shape has its own way of interpretation." The Shape defines the data type; in one instance,
C1is a currency value, while in another, it is a percentage or a binary switch. - Row Functionality: The Shape determines what the rows represent.
- Standard Values: Rows represent data points like years or ages.
- System Switches: Specific rows (often indicated by negative integers like
-1or-4) act as logic "switches" that fundamentally change how the table behaves.
