Frequently asked questions

What Factum is, what it is not, and how it relates to the rest of the ORM world.

Object-Role Modeling

What is Object-Role Modeling?

ORM is a fact-based modeling method: you describe a domain as elementary facts — Person works for Company — rather than as tables, entities-with-attributes or classes. Because facts carry no attributes, every constraint must be stated explicitly, and the resulting model can be verbalized in plain language and checked with sample data. It was developed by Terry Halpin and the fact-oriented modeling community.

How is this different from an ER diagram or a UML class diagram?

In ER and UML you decide early what is an entity, what is an attribute and what is a relationship. That decision is a design commitment, and it is often wrong — attributes turn out to need their own properties, or to be many-valued, and the model has to be reshaped. ORM has no attributes at all, so those changes are additive rather than structural. ORM also expresses constraints ER cannot draw — external uniqueness, ring, subset, exclusion and equality constraints among them — and every one of them verbalizes.

Is ORM only for databases?

No. It is a way of agreeing what is true in a domain, which is useful for API design, event schemas and ontologies too. Factum's mappings are one use of a model, not its purpose — a model that is never mapped can still be the clearest statement of a domain you have.

Using Factum

Do I need NORMA or Visual Studio installed?

No. Factum is a self-contained VS Code extension with no external dependencies — no database engine, no Java, no Visual Studio.

Can it open my existing NORMA .orm files?

Yes. Run ORM: Import NORMA (.orm) File, or right-click the file in the Explorer. The importer reads objects, fact types, readings, constraints, subtypes, value restrictions and the diagram geometry, and writes an .orm.json beside the original. Anything it could not read is reported.

The import is one-way: Factum does not write NORMA XML back. Your original file is never modified.

Which databases can it generate?

SQL DDL for PostgreSQL, SQL Server, MySQL, SQLite and ANSI SQL, and Cypher DDL for LadybugDB. Other property graph databases will need small syntax adjustments to the generated script — the mapping itself is standard labeled property graph shape.

Does it work in VSCodium, Cursor or Windsurf?

The extension uses only stable VS Code APIs, so it runs in any recent VS Code-compatible editor. Editors that use Open VSX rather than the Microsoft Marketplace may need the .vsix installed manually until the extension is mirrored there.

Can I edit the model file by hand, or generate it from a script?

Yes — that is why the format is plain JSON. Ids are stable, references are by id, and missing collections are repaired on load. See the file format reference. The model, verbalizer, validator and mappers are plain TypeScript with no VS Code or DOM dependencies, so they can also be reused outside the editor.

How do I get a diagram into a paper or a README?

ORM: Export Diagram as SVG for print and documentation, or ORM: Export Diagram as PNG for a 2× raster image. Both render the diagram alone, without the editor chrome.

Behaviour

Why does it say my fact type needs a uniqueness constraint?

Every ORM fact type carries at least one uniqueness constraint, which says how often a fact may repeat. For an n-ary fact type each internal uniqueness constraint must span at least n−1 roles; a narrower one means the fact type is not elementary and should be split into two. Factum reports both cases. See the validation rules.

Why did my value type not become a node in the graph schema?

Because it is lexical and single-valued, so it belongs in a property. A value type is promoted to a node only when it is played many-to-many or in an n-ary fact type, where a single-valued property could not hold it. The mapping notes say which rule applied.

My generated graph node has a very long name. Can I change it?

Objectify the fact type. A reified n-ary fact type is named after its whole reading, which is unambiguous but verbose; objectifying it — ORM's own way of saying "this fact is a thing" — lets you name it, and the mapping uses that name.

Does undo work?

Yes. Diagram edits are written to the underlying text document, so Ctrl/Cmd + Z and the rest of VS Code's undo stack work as usual, as do the dirty indicator, file watching and source control.

Project

Is this affiliated with the ORM Foundation or NORMA?

No. Factum is an independent MIT-licensed implementation. Object-Role Modeling is the work of Terry Halpin and the fact-oriented modeling community; the ORM Foundation is the place to go for the method itself.

How do I report a bug or ask for a feature?

Open an issue on GitHub. A copy of the .orm.json that reproduces the problem helps enormously — it is a small text file.