Showing posts with label ontology. Show all posts
Showing posts with label ontology. Show all posts

Thursday, January 17, 2008

Can't live without it

In the world of pure data modeling, where data modelers develop data models specific to a domain and not to a technology, the Protege editor is a must have. A pure data model is a object model. This is different from a data model in a database. The data model in a database is normalized where certain object attributes are grouped together in a table. For example, the Person object look like this:
Person
Name
Height
Weight
Nationality(ies)

Now Instances of this object might look like:
Person
Enoch Moses
6 ft
180lbs
US
Person
Osama Bin Laden
6ft 2inches
160lbs
Saudi
Pakistani
Person
Barry Bonds
6ft 2inches
228lbs
US

However the Person object might be "shredded" across multiple tables in a database. This is done for performance reasons. In a transactional world, systems might just query certain attributes from various object instances since that is what the system is interested in. This approach is quick and logically however data modelers should not model their domain objects to a database since they might miss some implicit data relationships.

XML editors like Altova's XMLSpy, Stylus Studio and Oxygen provide graphical representations of XML schemas (xsd) which are great to create object models however it is a bit cumbersome to validate the data model with real data. To validate the data model with real data, an XML instance needs to be created with actual data and then the XML instance has to be validated with its xsd. This can be a painstaking process if the xsd's are quite complex.

For example lets look at the Person Object in a XSD



For the person called Enoch Moses, the xml instance should look like this:

For the person called Barry Bonds, the xml instance should look like this:

And lastly the Osama Bin Ladin, the xml instance should look like this:


The xml instance might make sense via its structure and data; however the xml instances are different documents and this could be a painstaking process to validate numerous instances. It can be done however it is not an enterprise data modeling solution.

UML is also used to model data however UML doesn't provide any way of validating the data model with the real data. UML can also be ambiguous.

The image does not have any methods since we are not discussing how to access various attributes in a class.

After creating database schemas, XML schemas and UML diagrams, I found an open source tool called Protege which was developed at Stanford University. Protege is an ontology editor which lets modelers create OWL documents (W3C approved XML language for ontologies) or ontologies in Protege frames. Since I think XML is not the best medium to develop ontologies or data models, I use Protege frames to develop data models. Protege lets the modeler create an ontology and its views where the modeler can input real data and see if the data model makes sense. This is how I created the Person class and the three instances on Protege.

Here is the overall Person class (please click on the image to see the larger version of it):


Here is the Name attribute(please click on the image to see the larger version of it):


Here is the Weight attribute(please click on the image to see the larger version of it):

Here is the Height attribute(please click on the image to see the larger version of it):

Here is the Nationality attribute(please click on the image to see the larger version of it):


Protege allows the modeler to validate the data model with actual instance data. It also allows the modeler to create views of the data model. Here are the three instances we have been working with:

Instance Enoch Moses (please click on the image to see the larger version of it):


Instance Barry Bonds (please click on the image to see the larger version of it):


Instance Osama Bin Laden (please click on the image to see the larger version of it):


Protege is a great tool since it lets you follow the MVV (not MVC) pattern which is:
  • Model - How the data entities are structured and are related to each other. The modeler models the data according to requirements or how he perceives the data (which is an ontology).
  • View - Since data models can be complex, it allows the modeler to create various views of the model.
  • Validator - This validates the model with real data. Most tools don't allow you do to this but it is a critical component of any modeling process. I see this akin to unit testing in programming.
In summary,
  • modeling data via a database can lead to incomplete understanding of the data. It only provides one view (the database view), an incomplete model but it does allow the modeler to validate the model in the database view.
  • modeling data via xml schemas is a great way however it can be extremely process heavy because xml is verbose and there is a variation between xsd validators. Some validators validate a complex instance while another validator may flag the same instance as a invalid instance.
  • modeling data via uml does not allow the modeler to validate the data or create various views on the data. UML is however quite useful when developers want to get the UML class diagram and generate skeleton programming classes.
  • modeling data via protege is quick, easy and it is free. It has a great modeling UI. It allows modelers to great various views and validate the model and views with data which is provided by the modeler.
As a modeler, I find it hard to model without Protege since I believe it is a pure data modeling tool.

Wednesday, November 28, 2007

Day 1 at the Ontology Conference

Today I went to an Ontology conference which was sponsored by the National Center for Ontological Research (NCOR). I heard talks from various vendors, implementors and subject matter experts in the field of Ontology. Before I get into what they talked about, let me first state the definition of what is an ontology. Wikipedia defines an ontology as, "... a study of conceptions of reality and the nature of being." What does that mean??!! Well it is basically an exercise where ontologists (people who create and work with ontologies) model existing systems into categories which then could be used by information systems to make inference relationship (relationships which are not obivious to the human). As you see it is a qualitative field, people will argue how data entities should be modeled so that they can accurately and precisely describe an existing entity. For example, Ontologist A says that every plane needs to have pilot while Ontologist B would say this is not true. He would say that there are drones which are small planes, that are controlled by a computer. One of them may be right or both of them can be right. The key for any ontology is that it needs to be in a domain to avoid confusion. So in theory both ontologist A and B are correct if it is assumed that both of them work in different domains. Ontologist A is creating an ontology for the airline industry while Ontologist B is creating an ontology for some country's military. Issues like this cause massive headaches to any organization's Chief Information Officer (CIO) since the data cannot easily be exchanged across organizations and across domains. If Ontologies are created well then they are quite powerful.
Currently the ontology is wonderful in the realm of philosophy and theoretical computer sciences. however there isn't much technology in the field. I have been off and on working with ontologies and they are not the easiest thing to implement. I, however, am a strong believer that a good ontology can be used to validate data architectures which pertain to the ontology's domain.

At the conference, I heard two great presentations on ontology. They are:
  1. Werner Ceusters - He gave a fascinating talk on what is ontology which incorporated Basic Formal Ontology (BFO).
  2. Steven Robertshaw - He gave a talk on the lessons learned in implementing complex ontologies.
These people understood how to use ontologies and how not to use ontologies. Both stated that the technology is lacking in this field. Werner and his team built an open source project which lets you play with ontologies. The project, which is a Java based application, can be found at http://sourceforge.net/projects/rtsystem. To get a better understanding on how ontologies work, I recommend downloading the Protege product. It, too, is an open source product maintained by Stanford University. Protege lets you build data models but at the same time it lets you validate your model with "instance" data. I got fascinated with field couple years ago when I was asked to validate a data model for one of the US government agencies. If you are totally lost about what I am talking about then please check out the following links:
The day one of the conference also consisted of vendors displaying their products which are based on the principles of ontologies. In my next blog entry, I will give a more detail summary on what happened at this conference. Stay tuned! (The image is a visual representation on an ontology)