PRM Data Model Overview
The PRM data model is built around three core concepts — Parties, Locations, and Brands — connected through a set of associations that capture how business entities relate to each other, where they operate, how to reach them, and which brands they carry. Understanding these relationships is the key to understanding how Raytio models the real-world business landscape.
The big picture
Parties
A Party is the central entity of the PRM model. Every business entity — whether an organisation, an individual person, or a group — is represented as a party. The party_type field distinguishes between these three kinds:
- ORGANIZATION — a company, government body, or other legal entity
- INDIVIDUAL — a natural person
- GROUP — a logical grouping of other parties
Parties are stored in the prm_parties view and carry standard identity fields (name, description) and lifecycle attributes (active flag, start and end dates). For the full details on how parties and their relationships work, see Parties and Party Relationships.
Locations
A Location represents a physical address. Locations store structured address fields (street lines, city, state, postal code, country) together with optional geolocation coordinates (latitude and longitude). Locations exist independently of parties — a single location can be shared by multiple parties through the Party Sites association.
For more on how locations are managed and linked to parties, see Locations and Party Sites.
Brands
A Brand represents a commercial brand identity. Brands support internationalised names and descriptions, and can carry logo and thumbnail images. A brand exists independently and is linked to one or more parties through the Party Brands association, making the relationship many-to-many.
For more detail, see Brands and Party Brands.
Associations
Beyond the three core entities, several associations capture the relationships between them:
| Entity | Purpose |
|---|---|
| Party Relationship | Directed relationship between two parties with a typed relationship (see Parties and Party Relationships) |
| Party Site | Links a party to a location with a use code describing the purpose (see Locations and Party Sites) |
| Party Contact Point | Stores phone numbers, email addresses, and URLs for a party (see Party Contact Points) |
| Party Country | Associates a party with one or more ISO-2 country codes (see Party Countries) |
| Party Brand | Many-to-many link between parties and brands (see Brands and Party Brands) |
Multi-tenancy
The entire PRM model is tenant-scoped. All data is isolated per tenant, ensuring that users only see data belonging to their own tenant.
Standard columns
All PRM entities share a consistent set of audit and lifecycle columns:
- created_by / created_date — who created the record and when
- updated_by / updated_date — who last modified the record and when
- owned_by — the user who owns the record
- active — soft-delete flag
- start_date / end_date — optional validity period for time-bounded records