Extended By

19 Views


Okay, let’s focus just on “Extended By” in Synon/2E (Cool:2E).


๐Ÿงพ What Does Extended By Mean?

In Synon/2E, an “Extended By” relationship is:

  • A 1-to-1 relationship between two files.

  • The child file extends the parent file by adding more fields.

  • Both files share the same primary key.

  • A record in the child file cannot exist without its corresponding parent record.

๐Ÿ‘‰ Think of it as splitting a record into two files: the parent holds base data, the extension holds optional or additional data.


๐Ÿ“˜ Example

Files

  • CUSTOMER file → stores basic customer info:

    • CUSTOMER_ID

    • NAME

    • ADDRESS

  • CUSTOMER_EXT file → adds extra details:

    • CUSTOMER_ID (same key)

    • LOYALTY_POINTS

    • PREFERRED_LANGUAGE

Relationship in Synon

CUSTOMER_EXT *is extended by* CUSTOMER

So:

  • Every CUSTOMER record may or may not have one CUSTOMER_EXT record.

  • But an EXT record cannot exist without a base CUSTOMER.


๐Ÿ”‘ Key Characteristics

  • Cardinality: 1-to-1 (not 1-to-many like Is Owned By).

  • Access Path: Always keyed by the parent’s primary key.

  • Referential Integrity: Parent must exist first. If parent deleted, extension is deleted too.

  • Usage:

    • Separate infrequently used fields.

    • Store sensitive info separately.

    • Bypass record-length limits in large files.


๐Ÿ†š Comparison

Relationship Cardinality Purpose
Is Owned By 1-to-Many Child/transactional records (e.g., CUSTOMER → ORDERS)
Is Extended By 1-to-1 Extra attributes or optional data (e.g., CUSTOMER → CUSTOMER_EXT)

โœ… In Real-World Synon Projects

  • Very common when a base master file (like POLICY, MEMBER, PROVIDER) is extended with a secondary file for additional attributes.

  • Keeps the main file lightweight while still linking extra fields tightly to it.


 

Post Comments