[Developers] MQL Lite (was newbie: simple question)

Shawn Simister narphorium at gmail.com
Thu Feb 26 21:29:06 UTC 2009


Thanks Pito,

A lot of really good suggestions there. I like the idea of just thinking 
of MQL Lite as a subset of the cheatsheet. For me it would be the read 
syntax section of the first page + the property prefixes + the 
single-query syntax of the mqlread API.

As far as creating a "thoughtful collection of specific, annotated 
examples", Phil Gochenour has done a great job of collecting some of the 
more interesting examples in the MQL Cookbook 
<http://www.freebase.com/view/guid/9202a8c04000641f8000000008c0cbfb>. He 
also has a weekly column on the Freebase blog called MQL Monday 
<http://blog.freebase.com/tag/mql/> that showcases some sample queries 
with a more detailed description of how they work.

I think it would be really neat to mark up some sample queries in HTML 
so that you could hover over any part of them with your cursor and get a 
tool-tip describing its function. I'm not sure what type of queries are 
used the most often but I'd definitely be interested in seeing any stats 
the Metaweb folks have for that sort of thing. My guess is that simple 
name/description/image look-up queries get a lot of use.

Shawn

R. Pito Salas wrote:
> Shawn
>
> Maybe MQL Lite is not something different, just a simpler way to 
> describe what's there. A full SQL manual takes many pages too, but you 
> can live a good life in sql knowing a tiny subset of that. The MQL 
> 'cheatsheet' is 2 pages of very small type, for example. 
>
> It could be that my confusion came from not knowing the basics of 
> types, properties, and all the other core ideas.
>
> Another thing that often is very thoughtful collection of specific, 
> annotated examples designed to teach MQL.
>
> Take your example:
>
>> {"capital":null, "type":"/location/country", "name":"Peru"}
>
> Can you tease that apart? What's with the 'null? What's with the 
> "type":" "/location/country"? So annotating the examples are also a 
> good pedagogical tool.
>
> Do we know what the most common queries are that people may want to 
> do? Or are things too new to know? For one thing I bet there are far 
> more people who want to read than who want to write so off the bat 
> writing could be left out of MQL Lite.
>
> -- Pito
>
>
> On Feb 26, 2009, at 1:29 PM, Shawn Simister wrote:
>
>> Pito Salas wrote:
>>> MQL is crazy complex though; anyone consider creating an MQL-lite?
>>> Yeah I realize the complexity is probably justified so as to be
>>> completely general and not assume anything, but it creates a major
>>> barrier to use IMO.
>>>   
>> Pito,
>>
>> I dunno if I'd say MQL is really /that/ complex. It takes some time 
>> to get used to the JSON structure of the queries when you're used to 
>> writing SELECT queries but once you get the hang of that I find it's 
>> actually pretty straight-forward. There is very little mandatory 
>> syntax is MQL so a query can be as simple as:
>>
>> {"capital":null, "type":"/location/country", "name":"Peru"}
>>
>> For me, the hardest part is getting to know all the commons data 
>> types and which types/properties to use for which queries. Usually 
>> the best way to do that is to look up a couple sample topics in 
>> Freebase and see which schema it uses, then you can click through to 
>> the schema to find the property IDs.
>>
>> For the sake of argument, I'm sure it would be possible to write some 
>> wrapper code to query Freebase with a more traditional SELECT query 
>> syntax but the challenge of knowing which properties to use would 
>> still be there and as you said, more complex queries might not be 
>> possible.
>>
>> SELECT capital FROM /location/country WHERE name = 'Peru';
>>
>> What features would you look for in MQL Lite? What are the parts of 
>> MQL that you find the hardest to learn as a beginner?
>>
>> Shawn
>> _______________________________________________
>> Developers mailing list
>> Developers at freebase.com <mailto:Developers at freebase.com>
>> http://lists.freebase.com/mailman/listinfo/developers
>
> ------------------------------------------------------------------------
>
> _______________________________________________
> Developers mailing list
> Developers at freebase.com
> http://lists.freebase.com/mailman/listinfo/developers
>   

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.freebase.com/pipermail/developers/attachments/20090226/7999d200/attachment.htm 


More information about the Developers mailing list