Generally, you create a new ontology and import the ontologies that provide the vocabulary or instance data that you want to extend.
For instance, suppose I have a "People" ontology that declares a Person class and a hasParent property. Then I'd create a new ontology, called, say, "MyPeople" that imports the "People" ontology. Then I can create new classes that are related to "People", e.g., Agent and Corporation with an axiom:
Agent ≡ Person ⊔ Corporation
and I can declare individuals of my classes or those imported from the "People" ontology:
BillGates : Person
Microsoft : Corporation
Then I can share my new ontology with whoever I like. When they process it, they'll see that it imports the "People" ontology, and they'll get a copy of that on their own, and put it all together on their end.
For the example that you propose, it would probably look like this:
- There would be a common MuseumExhibit ontology.
- Museum1 would define their own Museum1Ontology or dataset that imports the MuseumExhibit ontology and declares the information about the exhibits in Museum1.
- Museum2 would define their own Museum2Ontology or dataset that imports the MuseumExhibit ontology and declares the information about the exhibits in Museum2.
- Then, if Museum1 wants information about Museum2's works by an given painter, Museum1 would query Museum2Ontology, and they would know how to formulate the query and interpret the results because of the shared understanding of MuseumExhibitOntology.
- Note that this doesn't even require Museum1 to create a Museum1Ontology; it only required that Museum1 be able to understand MuseumExhibitOntology. You don't need to publish any data of your own in order to consume information from others.
Thank you, but still there is one unclear thing for me. How actually Museum1 can get information from Museum2? There is one generic way or there are several ways. e.g. If they want to get data, they have to get access to DB? How does data querying process works?
There's no universal way to do this. Some organizations may provide a SPARQL endpoint that users can query. For instance, DBpedia has a public endpoint, and so does the BBC. In other cases, the data might be available for browsing. For instance, DBpedia makes the data for a Wikipedia article X available as http://dbpedia.org/resource/X.ntriples (or .rdf, .n3, .ttl, etc.). For instance, the data on Johnny Cash is http://dbpedia.org/data/Johnny_Cash.ntriples. You can often download data dumps too (though these can be very large). Using DBpedia as an example, again, you can have a look at DBpedia's datasets section. But it really comes down to how an individual organization decides to make that information available. Museum2 could simply say, "if you want our data, send us an email and we'll mail you a USB stick containing the data." That would be inconvenient, but it would still allow data exchange.