使用“JOINS”进行 Freebase 查询
...是的,是的,我知道传统的连接不存在。实际上,理论上我很喜欢 freebase 查询方法,只是在让它真正为我工作时遇到了一点麻烦:)
有人有一个通过 MQL 获取 Freebase 数据的简单示例,该数据从两个不同的“表”中提取吗?特别是,我正在尝试获取汽车数据......例如,从 /automotive/model_year 和 /automotive/trim_level 中提取字段。
我已经阅读了文档(实际上花了几个小时)。很可能我正在某处查看这样的示例,但没有看到它,因为我的 OLTP 大脑无法理解它所看到的内容。
* 注意* ...上面我正在处理的两种“类型”是兄弟姐妹,而不是父母/孩子。 freebase是否甚至允许在兄弟节点之间加入数据...我看到从父/子节点提取查询的示例,但不是从我不认为的兄弟节点(或者我忽略了它们)。
... Yeah, yeah, I know traditional joins don't exist. I actually like the freebase query methodology in theory, just having a little trouble getting it to actually work for me : )
Anyone have a dumb-simple example of getting Freebase data via MQL that pulls from two different "tables"? In particular, I'm trying to get automotive data... so for example, pulling fields from both /automotive/model_year and /automotive/trim_level.
I've read the documentation (for hours actually). There's a distinct possibility that I'm looking right at such an example somewhere and just not seeing it because my OLTP brain just doesn't comprehend what it's seeing.
* Note * ... that the two "types" I'm working with above are siblings, not parent/child. Does freebase even allow joining data between sibling nodes... I see examples of queries pulling from parent/child, but not from siblings I don't think (or I've overlooked them).
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
基本上,您不能只根据用户的输入限制查询吗?
当用户选择年份时,您将获得具有匹配型号年份的所有品牌:
如果选择了品牌并且您需要该品牌和年份的型号:
或者我只是没有正确理解您的问题?
Basically, could you not just restrict the queries according to the user's input?
When the user selects the year, you get all makes that have a matching model year:
If the make is selected and you need the models for that make and year:
Or did I just not understand your problem correctly?