[Developers] More information on '/type/reflect'
Sumit
shah.sumit at gmail.com
Fri May 23 18:01:26 UTC 2008
Hi John,
Thanks for getting back. Here's what I am trying to do. We have a database
of people names along with some facts like which company they work or worked
for, whats their profession, etc. I am working on a prototype to see if we
can resolve these names to freebase ids (or how many of them with the info
we have).
The CVT problem sounds like a 'foreign key' implementation in rdbms. In
rdbms you would have Peter Jackson related to a 'key' which is pointing to
an actual value. Here we have a relation between him and a guid (that holds
relation between Peter Jackson and Weta Digital). If it was a rdbms one
would do a join, I am not sure on how to solve it in this case. I am sure
MQL will have something like join one day (or may it has it already!!!!).
I tried the query below to find out if I can find a link between Peter
Jackson and his employment_tenure, to see if I can get an guid for the
relation. Thinking, I can query this guid again and see if it has Peter's
name mentioned in it for the resolution issue.
[
{
"master_property" : null,
"reverse" : null,
"source" : {
"id" : null,
"name" : "peter jackson",
"type" : "/people/person"
},
"target" : {
"id" : null,
"type" : "/business/employment_tenure"
},
"type" : "/type/link"
}
]
But it doesn't return anything. If I try the simple query below
[
{
"employment_history" : {},
"id" : "/en/peter_jackson",
"name" : "peter jackson",
"type" : "/people/person"
}
]
in the properties of employment history I do see the guid and type. So looks
like there is a link/relation between Peter Jackson and this object.
Would greatly appreciate if can help me to understand what am I missing
here? Is there a way to specify Peter Jackson and Weta Digital in a single
query (it is ok if i have to specify the link upfront).
Thanks again.
Sumit
On Thu, May 22, 2008 at 11:41 PM, John Giannandrea <jg at metaweb.com> wrote:
>
> Sumit wrote:
>
> My subject, Peter Jackson, a New Zealand national and a screenwriter, is
> married to Fran Walsh and works for Weta Digital. However if I try the
> generic query with these names rather than 'new zealand' or 'screenwriter' I
> don't get down to the subject. Fran Walsh and Weta Digital do not appear to
> be linked *directly *to Peter Jackson, it looks like there is a relation
> 'spouse' or 'employer' which has a value.
>
>
> This in general is called the CVT problem. Some relationships have an
> additional object modeling the relationship. Its possible to query for
> any link to any object with any link and so on, but you need to know which
> links you want to do this for. We have some code that can do this in
> general, but if you know which specific links you are trying to follow its
> easier.
>
> Could you describe some more what you are trying to do, from an application
> perspective, and then perhaps we can steer you in a specific query
> direction...
>
> -jg
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.freebase.com/pipermail/developers/attachments/20080523/534fc5f6/attachment.htm
More information about the Developers
mailing list