Docs menu

Ontologies

An ontology gives your tables and relationships business names. Each table becomes an entity type with properties and a key, and each relationship becomes a relationship type between two entity types, with a binding to the table and columns it comes from. In Fabric this is Fabric IQ's ontology item (preview); the ontology agent and data agents use it as context.

A key is one property, a string or an integer. A table whose key is one such column gets it as the entity type's key. A composite key (two columns or more) cannot be one property, so a person chooses: pick one of its columns, or add a column that combines them. Krusgraph does not choose for you: the entity type is drafted without a key, and the draft's summary says why. On the shop schema that is order_items, whose key is order_id + line_no.

What the engine drafts from the shop schema: 7 entity types, 5 of them with a key, and 6 relationship types.

ProductsHasCategories: products.category_id → categories.idAddressesHasCustomers: addresses.customer_id → customers.customer_idOrdersHasCustomers: orders.customer_id → customers.customer_idOrderItemsHasOrders: order_items.order_id → orders.order_idOrderItemsHasProducts: order_items.product_id → products.product_idAuditLogHasCustomers: audit_log.customer_id → customers.customer_idCustomerskey customer_idCategorieskey idProductskey product_idAddresseskey address_idOrderskey order_idOrderItemsno key: compositeAuditLogno key
AddressesHasCustomersOrderItemsHasProductsOrderItemsHasOrdersAuditLogHasCustomersOrdersHasCustomersProductsHasCategoriesCategorieskey idCustomerskey customer_idAddresseskey address_idAuditLogno keyOrderskey order_idProductskey product_idOrderItemsno key: composite
Generated by the engine from the synthetic shop schema when this page was rendered. A solid frame has a key; a dashed frame has none yet. Arrows point from the entity type that holds the reference to the one that owns the key.
Entity typeTableKey
Customerscustomerscustomer_id (rule K2)
Categoriescategoriesid (rule K2)
Productsproductsproduct_id (rule K2)
Addressesaddressesaddress_id (rule K2)
Ordersordersorder_id (rule K2)
OrderItemsorder_itemsnone yet: the key order_id + line_no is composite (rule K5), so a person chooses
AuditLogaudit_lognone: no column is named like a key (rule K3), so nothing can point at it

Relationship types, each from a relationship in the plan:

  • ProductsHasCategories: Products → Categories, from products.category_id → categories.id (rule R1)
  • AddressesHasCustomers: Addresses → Customers, from addresses.customer_id → customers.customer_id (rule R1)
  • OrdersHasCustomers: Orders → Customers, from orders.customer_id → customers.customer_id (rule R1)
  • OrderItemsHasOrders: OrderItems → Orders, from order_items.order_id → orders.order_id (rule R1)
  • OrderItemsHasProducts: OrderItems → Products, from order_items.product_id → products.product_id (rule R1)
  • AuditLogHasCustomers: AuditLog → Customers, from audit_log.customer_id → customers.customer_id (rule R1)

Creating the ontology item from the plan: created live; reviewed in Fabric. The ontology item is in preview in Fabric, and its definition format can change. The example on /check offers the same ontology as an RDF/XML file to download for Microsoft's Ontology Playground (draft; Gustav tried a file from /check there on 2 November 2026, with a good result). How the draft maps to the ontology item, and why Krusgraph comes before it, is in Fabric IQ: the same graph as an ontology.