Skip to content
Alex Cruise edited this page Jun 6, 2013 · 2 revisions

What?

Factoid is an experiment in building a metamodel for unreliable data.

What's a Metamodel?

A metamodel is a model in which you can express lower-level, often domain-specific, models. For example:

  • the RDBMS metamodel consists of concepts like databases, tables, columns, indexes, views, etc.
  • the Java metamodel consists of classes, fields, methods, interfaces, statements, etc.

Some metamodels don't have an explicit representation, they're just thought of as a language, with syntax and semantics tightly linked.

Background

This particular yak started to sprout hair when I decided I wanted to build an app that would help users shop for smartphones, mobile operators, plans, etc. I had realized that, with such a broad market, I would need to crowdsource the data.

Why Not Wikis?

If you want to get a bunch of humans to tell you about a subject, a wiki is a typical, and very successful, way to approach the problem. Unfortunately, wikis tend to be largely unstructured. The Wiki metamodel, at its most granular, tends to address sections, or maybe paragraphs if you're lucky. Below this level of description, a wiki is just a bag of CLOBs with sloppy validation rules. If you want to capture prose, wikis are great. But if you're trying to build a database, there's no obviously successful pattern to follow.

Why Not a Traditional or NoSQL Database?

I'm old enough to have learned through bitter experience that a complex domain model, when expertly and lovingly designed at the beginning of a project, will nearly always turn out to be wrong in depressingly expensive ways. But I still can't abandon the Olde Time Religion and do away with complex domain models entirely. For one thing, I'm a static typing bigot and it pains me to use a schema-less database. But RDBMSs are one of the major sources of inflexibility that drags us through those depressingly expensive refactoring death marches.

Key Concepts

Subjects

A subject is an entity (person, place, device, etc.) about which asertions can be made.

Subject Types

Subjects can be categorized according to a taxonomy of subject types. The primary role of a subject type is to restrict the properties that can be asserted about subjects of the type.

Properties

A property is a type of information asserted about a type of subject. For example, a smartphone has a model number and a diagonal screen size; a person has height and weight.

Property Types

Data types, e.g. model number, string, dimension, etc.

Assertions

An assertion is a statement by some Authority that some Subject has some Property, with a particular value.

Evidence

When an Authority makes an Assertion, s/he may offer evidence in support of the assertion. For example, an assertion that a particular smartphone has a 4" screen might link to the specifications page on the manufacturer's website.

Factoids

A factoid is the collection of assertions of a particular Property of a particular Subject. For instance, every assertion about a particular smartphone model's battery capacity, taken together, form a factoid.

A degenerate factoid, namely one in which every value is asserted to be equal, can be considered to be a fact. :)

Authorities

An authority is an entity who makes assertions.