[Data-modeling] How to move types to a new domain?

Christopher R. Maden crism at metaweb.com
Tue Feb 26 20:29:05 UTC 2008


Will Moffat wrote:
> As Jason said, I would be interested to know what's going on under the  
> hood.
> * Is there an understandable sequence of MQL writes involved?

It is understandable but fragile.

The main reason for us to have an internal script is permissions; a user 
would not normally be able to move a type to a domain of which he or she 
   was not an administrator.  This is not an issue for moving types from 
one domain to another owned by the same user.

However, it is also important to reliably execute the correct sequence 
of MQL writes; if it is done wrong, the system won’t break, but you may 
end up with things that are not recognizable as types or domains, which 
is not very useful.

So we would encourage users, for now, to request moves from us until we 
build client-side UI tools for these kinds of administrative functions.

> Some questions, after the move:
> 
> * Will the old types still appear as types in the Freebase.com client?

The old types *are* the new types; if you were to ask their GUIDs, they 
would be the same.

> * What type will MQL return? for example, I would expect
> {
>    "query" : {
>      "id" : "/topic/en/t_s_eliot",
>      "type" : []
>    }
> }
> to include: "/user/mikelove/influence/influence_node",
> but to no longer include: "/user/mikelove/default_domain/ 
> influence_node",

There are many possible IDs for a single object, if it has keys in many 
namespaces.  MQL has some rules for trying to figure out the 
“definitive” ID for an object; one of those rules is that the domain 
property of a type is a better place to look for a normative key.  So if 
a type has keys in two namespaces (.../default_domain and 
.../influence), and a domain property pointing to one of them 
(.../influence), MQL will try to generate an ID that goes by way of the 
domain (.../influence/influence_node).

> * Will old applications still work? For example will this query still  
> succeed?

Yes.  The sequence of keys root -> “user” -> “mikelove” -> 
“default_domain” -> “influence_node” is still a valid sequence of keys 
that ends up at a valid type.  It will no longer, however, be the 
sequence of keys that MQL prefers when *generating* an ID.

~Chris
-- 
Christopher R. Maden
Data Architect
Metaweb Technologies, Inc.
<URL: http://www.metaweb.com/ >


More information about the Data-modeling mailing list