Extended referencing hybrid with selective duplication
In some scenarios, both entities involved in the relationship are considered important enough to exist independently, yet optimizing access patterns justifies duplicating certain attributes between them.
This approach follows the well-established Extended Reference Pattern, widely used in document modeling practices.
Repository of examples
The sample models used in the examples below can be found in this repository. They can be opened in the browser with the following links, provided proper license:
- 1-Polyglot.hck.json
- 4a-Extended referencing to normalization before modeler intervention-Oracle.hck.json
- 4b-Extended referencing to normalization after modeler intervention-Oracle.hck.json
Note also the naming convention applied to transform business names in the Polyglot model with Pascal case and spaces, into technical names int he physical models with lowercase and underscores)
Example of customer and product reviews with duplicated attributes
In this example:
- The
Customerentity contains:- Core customer attributes
- A
Reviewsarray, where each review includes:- The
Product identifieras a foreign key - The
Product nameduplicated for convenience - The
Rating
- The
- The
Productentity contains:- Product details
- A
Reviewsarray, where each review includes:- The
Rating - A nested
Customerobject containing:- The
Customer identifieras a foreign key - The
Pseudoduplicated for convenience
- The
- The
This structure allows efficient access to relevant information from both sides:
- From the
Customerdocument, you can see all written reviews with the product name directly accessible - From the
Productdocument, you can access reviews and key customer information without additional lookups
The attributes chosen for duplication depend entirely on the business context and access patterns.

Foreign key vs. foreign master relationships
In Hackolade Studio, the visual representation of relationships distinguishes between:
- Foreign key relationships (solid lines): These point directly to the primary key of another entity, representing classic foreign key behavior.
- Foreign master relationships (dotted lines): These indicate attributes that are duplicated from another entity but do not correspond to the primary key. Typically, they represent stable, descriptive fields selectively copied to improve performance or support application needs.
This visual distinction helps clarify which attributes are true relational keys, and which are duplicated for convenience within the extended reference pattern.
Derivation with normalization
When deriving this Polyglot Logical Model to a relational physical model with normalization, the following structure is generated:

- A
customertable containing customer details - A
producttable containing product details - Two separate
reviewstables:- One reflecting the
Reviewsarray embedded in theProductentity - One reflecting the
Reviewsarray embedded in theCustomerentity
- One reflecting the
- A
customer1table containing customer attributes duplicated within the product context
This behavior is expected given the structure of the Polyglot Logical Model and the selective duplication implemented using the extended reference pattern.
However, after derivation, some adjustments are required by the data modeler to align the physical model with relational best practices:
- Keep only a single consolidated
reviewstable, acting as a true join table betweenproductandcustomer. - Remove the redundant
reviewsandcustomer1tables generated during the derivation process. - Ensure the final
reviewstable contains the necessary foreign keys.

This step reflects the trade-off inherent to Polyglot Logical Modeling:
- The logical model prioritizes technology agnosticism and flexibility
- Minor adaptations are expected when translating to specific targets like relational databases
The data modeler plays a key role in refining the derived physical model to ensure both structural integrity and optimal performance.
Example of customer and order with duplicated attributes
In this example:
- The
Customerentity contains:- Core customer information
- An array of orders, with selected order details (
ordered dateandstatus) duplicated directly inside the customer entity
- The
Orderentity exists independently, containing:- Full order details
- Selected customer details (
lastnameandfirstname) duplicated directly inside the order entity

This structure ensures that frequently accessed or relevant attributes are immediately available within each entity, improving performance and simplifying common queries, while preserving the full source of truth within the related entity.
The choice of which attributes to duplicate depends on the access patterns and business requirements.
Typically, duplicated attributes are stable or immutable, but this is not a strict rule.
Derivation with normalization
When deriving this structure to a relational physical model, the following is generated:
- A
customertable containing core customer details - An
ordertable containing order details, including foreign keys tocustomerand duplicated customer attributes - A
customer1table generated from the nested duplication within theOrderentity - An
orderstable generated from the nested array within theCustomerentity

This behavior is expected given the structure of the Polyglot Logical Model and the selective duplication implemented using the extended reference pattern.
However, after derivation, some adjustments are required by the data modeler to align the physical model with relational best practices:
- Remove the redundant
customer1andorderstables - Maintain a single normalized
ordertable with foreign keys referencingcustomer

This illustrates:
- The flexibility of Polyglot Logical Modeling for mixed paradigms
- The importance of the modeler's expertise in refining derived physical models
- The trade-offs involved when applying extended referencing in one-to-many scenarios