Data Model¶
Comprehensive overview of the Danish Parliament API data structure, relationships, and classification systems. Understanding the data model is essential for effective API usage.
Core Concepts¶
The Danish Parliament API represents the complete parliamentary ecosystem through interconnected entities:
📋 Parliamentary Entities¶
- Sag (Cases) - Legislative bills, proposals, and matters
- Aktør (Actors) - Politicians, committees, ministries
- Afstemning (Voting) - Parliamentary voting sessions
- Møde (Meetings) - Parliamentary and committee meetings
- Dokument (Documents) - Official parliamentary documents
🔗 Relationships¶
- Junction tables connect entities with semantic roles
- Role-based relationships define participation types
- Temporal relationships track changes over time
- Hierarchical structures represent organizational units
Data Model Components¶
📜 Entity Relationships¶
Visual diagrams and detailed explanations of how entities connect: - Core entity relationships - Junction table patterns - Hierarchical structures - Temporal relationships
📋 Classification Systems¶
Standardized categorization used throughout the API:
- Actor Types - 17 types including Person, Udvalg, Ministerium
- Case Types - 13 types from Lovforslag to Alm. del
- Case Status - 68 different status codes
- Vote Types - For, Imod, Hverken for eller imod, Fravørende
- Document Types - Various document classifications
📁 Role Systems¶
Semantic roles defining relationships between entities:
- Case-Actor Roles - 23 roles including Forslagsstiller, Minister
- Document-Actor Roles - 25 roles including Afsender, Modtager
- Other Roles - Additional role types across the system
📋 Parliamentary Process¶
How the data model represents Danish parliamentary procedures:
- Legislative Flow - From proposal to law
- Committee System - Committee structures and work
- Voting Procedures - Voting types and processes
Key Design Principles¶
1. Temporal Integrity¶
Every entity includes opdateringsdato for tracking changes:
2. Semantic Relationships¶
Relationships carry meaning through role systems:
3. Classification Consistency¶
Standardized type systems across all entities: - Type IDs are consistent and never change - Classifications are comprehensive and mutually exclusive - Historical classifications are preserved
4. Open Data Principles¶
- All data is publicly accessible
- No authentication required
- Complete historical records preserved
- UTF-8 encoding throughout
Understanding Junction Tables¶
Junction tables are the key to understanding relationships:
Simple Junction Pattern¶
Example:EmneordSag connects keywords to cases
Role-Based Junction Pattern¶
Example:SagAktør connects cases to actors with specific roles
Data Volume and Scale¶
| Entity | Record Count | Update Frequency |
|---|---|---|
| Sag | 96,538+ | Daily |
| Aktør | 18,139+ | Weekly |
| Dokument | Large | Daily |
| Afstemning | Thousands | During sessions |
| Stemme | Millions | During sessions |
Historical Coverage¶
- Start Date: 1952 (varies by entity)
- Coverage: 74+ years of parliamentary history
- Completeness: More comprehensive from 1990s onward
- Future Data: Some entities contain scheduled future events
Working with the Data Model¶
Essential Queries¶
-
Find all relationships for an entity:
-
Navigate hierarchies:
-
Track temporal changes:
Best Practices¶
- Understand relationships before querying - Review junction tables
- Use appropriate expansions - Don't over-fetch data
- Leverage classifications - Filter by type IDs for efficiency
- Respect temporal data - Use opdateringsdato for change detection
- Handle Danish characters - Ensure proper UTF-8 encoding
Next Steps¶
- Explore Entity Relationships for visual understanding
- Review Classification Systems for data categorization
- Study Role Systems for relationship semantics
- Learn Parliamentary Process for context