[Data-modeling] [data-modeling] "Subtypes" and Delegated Properties

Scott Meyer sm at metaweb.com
Wed Nov 5 22:58:09 UTC 2008


Vishal Talwar wrote:
> Hello data modelers,
> 
> So in Freebase, rather than a system of type inheritance, we use
> mixins/included types. We don't really create subtypes, we really create
> overlay types, which include the parent type and any extra properties or
> types. The issue I am running into is how to make this interacts
> favorably with delegated properties. If I understand them correctly
> (this is pretty questionable), delegated properties are a way of reusing
> properties so that data is added to old types/properties under the guise
> of new ones. The situation is as follows:
> 
> Types A and B are in some base
> Type A includes Fictional Setting
> Type B includes Fictional Work
> 
> Fictional Setting links to Fictional Work via the Fictional Works Set
> Here property
> Fictional Work reciprocates this link via the Setting property
> 
> I want this connection to hold (and display) for my types as well, so
> the obvious thing is to connect A and B by delegating to those
> properties. The problem is that you also inherit the expected type,
> which would be Fictional Setting or Fictional Work, but not A or B,
> despite the fact that they include the former. I could instead go and
> create a new property specific to A and B (i.e. with them as the
> expected types), but it would be redundant and I'd be including the
> commons types but not adding any useful information to them. Does anyone
> have any advice? Am I missing something really obvious?

No, our current delegation UI is broken.

In particular, you should be able to override the expected type of
a delegated property with any compatible type"  In particular,
you can replace any object type (type you created) with any other
object type.  Value types are less flexible.

Here's the sort of MQL write (use the query editor) which
will achieve what you intend:

{
  "id" : ".../A/works_set_here",
  "/type/property/expected_type" :
  {
    "connect" : "update",
    "id" : ".../B"
  }
}

-Scott


More information about the Data-modeling mailing list