database 什么是本体(数据库?)?
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/2514713/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
What is an Ontology (Database?)?
提问by Robert Gould
I was just reading this articleand it mentions that some organization had an Ontology as(?) their database(?) layer, and that the decision to do this was bad. Problem is I hadn't heard about this before, so I can't understand why it's bad.
我刚刚读了这篇文章,它提到一些组织有一个本体作为(?)他们的数据库(?)层,并且这样做的决定很糟糕。问题是我以前没有听说过这个,所以我不明白为什么它很糟糕。
So I tried googling about databases and ontology, and came about quite a few pdfs from 2006 that we're full of incomprehensible content (for my mind). I read a few of these and at this point still have absolutely no idea what they are talking about.
所以我尝试在谷歌上搜索数据库和本体,并从 2006 年得到了相当多的 pdf 文件,其中充满了难以理解的内容(在我看来)。我读了其中的一些,此时仍然完全不知道他们在说什么。
My current impression is that it was some crazy fad of 2006 that some academics were trying to sell us, but failed miserably due to the wording of their ideas. But I'm still curious if anyone actually knows what this is actually all about.
我目前的印象是,2006 年一些学者试图向我们推销是一种疯狂的时尚,但由于他们想法的措辞而惨遭失败。但是我仍然很好奇是否有人真的知道这实际上是关于什么的。
回答by Daan
Karussell already provided the wikipedia definition:
Karussell 已经提供了维基百科的定义:
"a formal representation of the knowledge by a set of concepts within a domain and the relationships between those concepts".
“通过域内的一组概念以及这些概念之间的关系对知识的正式表示”。
In order to implement such a representation, several languages have been developed. The one that currently gets the most attention is probably the Web Ontology Language (OWL).
为了实现这样的表示,已经开发了几种语言。目前最受关注的可能是Web Ontology Language (OWL)。
In a traditional relational database, concepts can be stored using tables, but the system does not contain any information about what the concepts mean and how they relate to each other. Ontologies doprovide the means to store such information, which allows for a much richer way to store information. This also means that one can construct fairly advanced and intelligent queries. Query languages such as SPARQLhave been developed specifically for this purpose.
在传统的关系数据库中,可以使用表来存储概念,但系统不包含有关概念的含义以及它们如何相互关联的任何信息。本体确实提供了存储此类信息的方法,这允许以更丰富的方式存储信息。这也意味着可以构建相当高级和智能的查询。SPARQL等查询语言是专门为此目的而开发的。
For my masters thesis, I have worked with OWL ontologies, but this was as part of a fairly academic research. I don't know if any of this technology is currently used in practice very much, but I'm sure the potential is there.
对于我的硕士论文,我使用过 OWL 本体,但这是一项相当学术研究的一部分。我不知道目前是否在实践中大量使用了这项技术,但我确信潜力是存在的。
Update: example
更新:示例
An example of 'meaning' and reasoning over the ontologies: say you define in your ontology a class Pizza
, and a class Vegetarian Pizza
, which is a Pizza
that has no Ingredients
that belong to the class Meat
. If you now create some instance of a Pizza
that just happens not to have any meat ingredients, the system can automatically infer that your pizza is also a Vegetarian Pizza
, even if you did not explicitly specify it.
关于本体的“意义”和推理的一个例子:假设您在本体中定义了一个类Pizza
和一个类Vegetarian Pizza
,这是一个Pizza
没有Ingredients
属于该类的类Meat
。如果您现在创建了一个Pizza
恰好没有任何肉类成分的 a 实例,系统可以自动推断您的披萨也是 a Vegetarian Pizza
,即使您没有明确指定它。
回答by DNA
An ontology is a schema (model) describing the types (and possibly some individuals) in a domain, the relationships that may exist between types and individuals, and constraints on the way that individuals and properties may be combined.
本体是一种模式(模型),描述域中的类型(可能还有一些个体)、类型和个体之间可能存在的关系,以及对个体和属性组合方式的约束。
One analogy is with the UML class diagrams - but ontologies have formal semantics, so can be machine-interpreted, rather than just being diagrams for human consumption.
一个类比是 UML 类图 - 但本体具有形式语义,因此可以被机器解释,而不仅仅是供人类消费的图。
Example:
示例:
Classes: Project, Person, ProjectManager. ProjectManager is a subclass of Person (apparently). People and Projects are disjoint
类:项目、人员、项目经理。ProjectManager 是 Person 的子类(显然)。人和项目是不相交的
Relationships: worksOn, manages. Manages is a sub-property of worksOn
关系:工作,管理。Manages 是worksOn 的子属性
Constraints: People work on Projects, not the other way around. Only Project Managers can manage projects.
约束:人们在项目上工作,而不是相反。只有项目经理可以管理项目。
This simple example enables machine inferences, e.g. if X manages Y, then we can infer that Y is a Project, and X is a Project Manager and therefore a Person.
这个简单的例子支持机器推理,例如,如果 X 管理 Y,那么我们可以推断 Y 是一个项目,而 X 是一个项目经理,因此是一个人。
回答by Ramin
AI people at some point thought that in case we want to build a system to be able to somehow think we should enable the system to somehow know what we know about the world. In other words they wanted to impose our own understanding of the word to the computers by generating a database which almost contains information and concise definitions about concepts and entities we know. Such databases have been built with different algorithms but not very precise after all. You better have a look on a database which is known to be among the best called CYC. http://sw.opencyc.org/check few words in the box and see what you get as a return. Best wishes
AI 人员在某些时候认为,如果我们想要构建一个系统,以便能够以某种方式认为我们应该让系统以某种方式了解我们对世界的了解。换句话说,他们想通过生成一个几乎包含我们所知道的概念和实体的信息和简明定义的数据库,将我们对这个词的理解强加给计算机。这些数据库是用不同的算法构建的,但毕竟不是很精确。您最好查看一个数据库,该数据库是众所周知的最佳 CYC 数据库之一。 http://sw.openencyc.org/勾选方框中的几个字,看看你会得到什么回报。最好的祝愿
回答by agsamek
Once upon a time I have assigned such question to a good developer to answer as a task, because my superior believed in Ontologies. It didn't materialize to any sharp answer and my superior was fired after some time. I'm still curious.
曾几何时,我将这样的问题分配给一位优秀的开发人员作为任务来回答,因为我的上司相信本体论。它没有得到任何尖锐的回答,我的上司在一段时间后被解雇了。我还是很好奇。
My current understanding is that this is an idea of words in a natural language (or "entities") being connected to each other with different relations. Then we generalize that idea to any DB entities. And basically, we end up with nothing interesting and with no useful query language.
我目前的理解是,这是一种自然语言(或“实体”)中的单词以不同的关系相互连接的想法。然后我们将这个想法推广到任何数据库实体。基本上,我们最终没有任何有趣的东西,也没有有用的查询语言。
I may be wrong.
我可能是错的。
回答by Karussell
回答by MarkJ
I am a total layman, but it appears to me that artificial intelligence research has a 50 year historythat goes round in cycles.
我是一个彻头彻尾的外行,但在我看来,人工智能研究有50 年的历史,而且循环往复。
- Extravagant predictions by academics.
- Generous funding by government.
- Modest results are produced.
- Funding is cut savagely.
- Time passes. The previous cycle is forgotten. Return to step 1.
- 学术界的夸张预测。
- 政府的慷慨资助。
- 产生了适度的结果。
- 资金被野蛮地削减。
- 时间流逝。之前的循环被遗忘了。返回步骤 1。
We've been round the cycle twice. Possibly this time it will be different...?
我们已经循环了两次。或许这次会有所不同吧……?
回答by Stephen Enginr
Some of the comments above seem a bit dismissive. I've used an ontology database in a real product and it was the only way to solve the problem. An ontology can be used to create a database that can encompass the complexities of the real world much better than something like an relational database. More "information" than "data". It's especially good when the relationships are complex and the information set is large and incomplete. Especially neat is the query mechanism in a good ontology database - it intelligently uses the schema/ontology (such as any class hierarchies) to return answers that would not be found otherwise.
上面的一些评论似乎有点不屑一顾。我在实际产品中使用了本体数据库,这是解决问题的唯一方法。本体可用于创建一个数据库,该数据库可以比关系数据库之类的数据库更好地包含现实世界的复杂性。“信息”多于“数据”。当关系复杂且信息集大且不完整时,它尤其有用。一个好的本体数据库中的查询机制尤其简洁——它智能地使用模式/本体(例如任何类层次结构)来返回否则不会找到的答案。