In the rapidly evolving telecommunications landscape, SMS aggregators serve as the critical bridge between Mobile Network Operators (MNOs) and enterprise brands. These platforms manage complex workflows involving the provisioning of short codes, the orchestration of high-volume messaging campaigns, and the rigorous tracking of delivery metrics. Without a robust data model, managing the lifecycle of a short code from application to activation, and then correlating millions of message delivery receipts to calculate real-time deliverability rates, becomes a chaotic endeavor prone to data inconsistencies and reporting errors.

Visualizing this intricate data ecosystem is essential for architects and database engineers. A well-structured Entity Relationship Diagram (ERD) not only documents the current state of the system but also serves as a blueprint for future scalability. By leveraging diagram-as-code methodologies with PlantUML, teams can maintain these diagrams as living documents, versioned alongside their codebases, ensuring that the data schema remains synchronized with the application logic. This tutorial walks you through constructing a professional ERD specifically tailored for an SMS aggregator platform, focusing on the entities that drive short code provisioning and deliverability analytics.
Understanding the Model: Purpose, Scope & Problem Framing
This diagram serves as the architectural backbone for a telecommunications data platform. Unlike a simple list of tables, this ERD models the dynamic relationships required to support a multi-tenant environment where multiple enterprises interact with various mobile network operators.
Diagram Abstraction & Representation
In the context of an SMS aggregator, the ERD must capture three distinct layers of data: Identity & Provisioning (who is involved and what resources are allocated), Operational Execution (the active campaigns and message flows), and Analytics & Reporting (the outcomes and performance metrics). The diagram abstracts complex business rules into clear cardinality relationships. For instance, the relationship between an MNO and a Short Code is one-to-many, reflecting that a single operator manages many codes. Conversely, the relationship between a Message and a Delivery Receipt is one-to-one (or one-to-many depending on retries, modeled here as strict), ensuring every sent message has a definitive outcome record.
Target Domain Scope & Scenario
The scope of this model covers the end-to-end lifecycle of an SMS campaign within an aggregator’s infrastructure. It begins with an Enterprise requesting a short code from a specific MNO. Once provisioned, the code is leased to the enterprise to launch a Campaign. As the campaign runs, the system ingests raw Messages and their subsequent Delivery Receipts. Finally, the system aggregates this data into DeliverabilityRate records to provide insights on performance per MNO and per campaign.
Key Takeaways & Educational Insights
By studying this model, readers will gain insights into:
- Decoupling Business Entities: How to separate the concept of a “Short Code” (the resource) from the “Provisioning Request” (the workflow) to allow for audit trails.
- Analytics Schema Design: The importance of denormalizing or pre-aggregating data (as seen in the
DeliverabilityRateentity) to optimize read performance for reporting dashboards. - Foreign Key Management: Understanding how to link disparate domains (Enterprise, MNO, and Campaign) through consistent foreign key constraints.
Complete Diagram & Full Source Code
Below is the final rendered blueprint of the SMS Aggregator ERD. This visualization clearly delineates the entities, their primary keys (PK), foreign keys (FK), and the cardinality of their relationships.

@startuml
/'
ERD for SMS Aggregator Short Code Provisioning and Deliverability Rate Analytics Platform
This diagram models the data foundation for an SMS aggregator platform that manages
short code provisioning and tracks message deliverability analytics. The context
centers on mobile network operators (MNOs), enterprises (brands), and the aggregator
that bridges them. Short codes are provisioned per MNO and leased to enterprises for
campaigns. Messages are routed through the aggregator, and delivery receipts are
captured to compute deliverability rates, failure reasons, and latency metrics.
The schema supports provisioning workflows, campaign management, message-level
tracking, and aggregated analytics for reporting.
'/
!theme sunlust
entity "MNO" as mno {
* mno_id : PK
--
name
country
status
}
entity "Enterprise" as enterprise {
* enterprise_id : PK
--
name
industry
contact_email
}
entity "ShortCode" as shortcode {
* shortcode_id : PK
--
code
type
mno_id : FK
status
}
entity "ProvisioningRequest" as provision {
* request_id : PK
--
shortcode_id : FK
enterprise_id : FK
requested_at
approved_at
status
}
entity "Campaign" as campaign {
* campaign_id : PK
--
enterprise_id : FK
shortcode_id : FK
name
start_date
end_date
}
entity "Message" as message {
* message_id : PK
--
campaign_id : FK
msisdn
submitted_at
status
}
entity "DeliveryReceipt" as receipt {
* receipt_id : PK
--
message_id : FK
delivered_at
status
error_code
latency_ms
}
entity "DeliverabilityRate" as rate {
* rate_id : PK
--
mno_id : FK
campaign_id : FK
date
total_sent
total_delivered
delivery_rate
}
mno ||--o{ shortcode
mno ||--o{ rate
enterprise ||--o{ provision
enterprise ||--o{ campaign
shortcode ||--o{ provision
shortcode ||--o{ campaign
campaign ||--o{ message
campaign ||--o{ rate
message ||--|| receipt
@enduml Step-by-Step Architectural Walkthrough
Building a complex ERD requires a methodical approach. We will deconstruct the diagram into four logical phases: configuration, entity declaration, relationship mapping, and visual refinement.
Phase 1: Canvas Configuration & Layout Directives
Before defining any data structures, we must set the stage for the diagram. PlantUML allows us to apply global themes and styles to ensure consistency. In this example, we use the sunlust theme, which provides a warm, professional color palette suitable for telecommunications documentation.
Additionally, we start with a comment block to document the diagram’s purpose. This is a best practice for maintaining documentation clarity.
@startuml
/'
ERD for SMS Aggregator Short Code Provisioning and Deliverability Rate Analytics Platform
[...context description...]
'/
!theme sunlust
Phase 2: Declaring Core Entities, Actors, and Boundaries
The core of the ERD lies in defining the entities. In PlantUML, we use the entity keyword. Each entity block defines the table name, primary keys (marked with *), and attributes.
Consider the MNO and Enterprise entities. These are the foundational actors. The ShortCode entity is critical as it links the MNO to the business use case. Notice the use of mno_id : FK to establish the link to the operator.
entity "MNO" as mno {
* mno_id : PK
--
name
country
status
}
entity "ShortCode" as shortcode {
* shortcode_id : PK
--
code
type
mno_id : FK
status
}
Phase 3: Mapping Data Flows & Key Interactions
Once entities are defined, we map the relationships. This phase is crucial for enforcing data integrity. We use specific PlantUML arrow syntax to denote cardinality.
- One-to-Many (||–o{): Used for
MNOtoShortCode. An MNO can have many short codes, but a short code belongs to only one MNO. - One-to-One (||–||): Used for
MessagetoDeliveryReceipt. In this specific model, we assume a strict 1:1 mapping for simplicity, though real-world systems might allow multiple retries (1:N). - Many-to-One: The
Campaignentity links back to bothEnterpriseandShortCode, creating a junction that allows us to track which brand used which code.
mno ||--o{ shortcode
enterprise ||--o{ campaign
campaign ||--o{ message
message |||| receipt
Phase 4: Grouping, Annotations & Visual Polish
The final phase involves ensuring the diagram is readable and the analytics logic is clear. The DeliverabilityRate entity is a specialized table designed for reporting. It aggregates data by MNO and Campaign on a specific date. This structure allows the system to quickly calculate the delivery_rate without scanning millions of raw message records every time a report is requested.
Syntax & Keyword Deep Dive
To master this diagram, it is essential to understand the specific PlantUML syntax elements used for ERD modeling.
entity: The primary keyword used to define a database table. It accepts a label (e.g.,"MNO") and an internal alias (e.g.,as mno) for use in relationship definitions.PKandFK: Standard database notation.PK(Primary Key) marks the unique identifier for a row.FK(Foreign Key) indicates a reference to a primary key in another table, establishing the relational link.||--o{(One-to-Many): The||represents the “one” side (mandatory), ando{represents the “many” side (optional). This is used forMNO ||--o{ shortcode.||--||(One-to-One): Both sides are mandatory and singular. Used here formessage |||| receiptto imply a strict one-to-one correspondence in this specific schema design.--(Separator): The double hyphen line inside an entity block visually separates the Primary Keys from the other attributes, improving readability.
Best Practices & Pitfalls to Avoid
When modeling telecommunications data, adherence to certain best practices ensures your ERD remains maintainable and accurate.
- Separate Workflow from State: Notice the
ProvisioningRequestentity. Do not store therequested_atorapproved_attimestamps directly on theShortCodetable. This preserves the history of provisioning attempts, which is critical for auditing in regulated industries. - Denormalize for Analytics: The
DeliverabilityRateentity is a denormalized summary table. While strict normalization suggests storing only raw data, creating summary tables like this is a standard practice in telecommunications to optimize query performance for dashboards. - Consistent Naming Conventions: Always use the internal alias (e.g.,
as mno) consistently when defining relationships. Mixing full names and aliases can lead to syntax errors and make the code harder to read. - Explicit Cardinality: Don’t rely on PlantUML’s default relationship drawing. Explicitly define the cardinality (e.g.,
||--o{) to communicate the business rules clearly to stakeholders.
Start Building Professional ERDs Faster with VPasCode
Instantly render and customize your SMS Aggregator schema online with VPasCode, the free PlantUML editor that requires zero local installation.