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

Bryan Cheung bryan.cheung at metaweb.com
Tue Feb 26 20:59:21 UTC 2008


Chris is spot on with his assessment.  It is possible, through a  
sequence of MQL writes, to move types between your user domains.   
Promoting user types to root domains would require permission changes.

Through MQL, you would want to 1) add the new namespace key (and  
optionally remove the old namespace key if you wanted a permanent  
move), and then 2) update the domain for the type.

To reiterate what Chris said, we would encourage users, for now, to  
request the moves from us until we build client-side UI tools for  
these kinds of administrative functions.

I've gone ahead and moved those 2 types on sandbox - feel free to play  
around with it.  When you're satisfied, let me know, and I will make  
the change on www.freebase.com .

Bryan


On Feb 26, 2008, at 12:29 PM, Christopher R. Maden wrote:

> 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/ >
> _______________________________________________
> Data-modeling mailing list
> Data-modeling at freebase.com
> http://lists.freebase.com/mailman/listinfo/data-modeling



More information about the Data-modeling mailing list