PostgreSQL
Customer records
crm_customers(
customer_uuid, full_name, email
)- customer_uuid → Customer.id
- full_name → Customer.name
Mappings
A CatDB mapping states how entities, attributes, relationships, and paths correspond. Composition can reuse that meaning, but it cannot recover information that a mapping discards.
Source-to-domain integration
A retailer keeps customer records, orders, fulfillment links, and product search data in different systems. Four typed mappings connect those physical schemas to one domain.
Customer records
crm_customers(
customer_uuid, full_name, email
)Online orders
orders { orderNo, custRef,
lines: [{ sku, qty }] }Fulfillment graph
(Order {order_no})
-[:CONTAINS {qty}]->(Product {sku})Catalog search
{ product_id, embedding,
metadata: { sku, title } }Customer.orders.items.productComposed paths must remain typed. Identity and composition laws are checked at the finite semantic boundary covered by the shared fixtures.
The Lean library checks a selected subset of path and mapping invariants. It does not verify the complete database engine.
Every required source construct has a type-correct image.
Some source meaning has no declared target interpretation.
More than one target interpretation remains plausible.
The mapping discards distinctions needed for a later operation.