Ontologies and DB Schema: What's the Difference?

  • 11,901 views
Uploaded on

"What is the difference between an ontology and a database schema"? Since the early days of the now maturing ontology field, this has been a persistent question that has never been adequately …

"What is the difference between an ontology and a database schema"? Since the early days of the now maturing ontology field, this has been a persistent question that has never been adequately answered. We define each concept for a high level comparison and then ask the following questions about each concept: 1) What is it for? 2) What does it look like? 3) How do you build one? 4) How is it implemented and used? and 5) Where are the semantics?
This gives rise to many other questions. For example: What is the role of constraints? of instances? Is there an analogy in ontology development for the process or database schema normalization? How is change management handled?

The differences between database schema and ontologies are many, varied and illuminating. Most arise from their different purposes and historical origins. There are also striking similarities. We wondered whether database schema and ontologies were more alike than different. We reached a surprising conclusion!

  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Be the first to comment
No Downloads

Views

Total Views
11,901
On Slideshare
0
From Embeds
0
Number of Embeds
3

Actions

Shares
Downloads
511
Comments
0
Likes
22

Embeds 0

No embeds

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
    No notes for slide

Transcript

  • 1. Ontologies andDatabase Schema:What’s the Difference? Michael Uschold, PhD Semantic Arts .
  • 2. ObjectiveEngineering, Operations & Technology | Phantom Works E&IT | Mathematics and Computing Technology To settle once and for all the question: What is the difference between an ontology and a database schema? What is the same?• Often asked. What is different?• Never adequately answered. Do we need both? Copyright © 2011 Michael Uschold. All rights reserved. Page 2
  • 3. Example OntologyEngineering, Operations & Technology | Phantom Works E&IT | Mathematics and Computing TechnologyHydraulics Copyright © 2011 Michael Uschold. All rights reserved. Page 3
  • 4. Example: Logical DB Schema (IDEF1X)Engineering, Operations & Technology | Phantom Works E&IT | Mathematics and Computing Technology PumpingHydraulics done-by Mechanical Device Hydraulic System Fuel System Pump Engine has-part Jet Engine supplies-fuel-to Hydraulic Pump Fuel Pump part-of connected-to Fuel Filter Aircraft Engine Driven Pump Copyright © 2011 Michael Uschold. All rights reserved. Page 4
  • 5. Example: HydraulicsEngineering, Operations & Technology | Phantom Works E&IT | Mathematics and Computing Technology Pumping done-by Mechanical Device Hydraulic System Fuel System Pump Engine has-part Jet Engine supplies-fuel-to Hydraulic Pump Fuel Pump part-of connected-to Fuel Filter Aircraft Engine Driven Pump Ontology Logical DB Schema: IDEF1X Is this similarity just superficial? Copyright © 2011 Michael Uschold. All rights reserved. Page 5
  • 6. The Basic Idea for EachEngineering, Operations & Technology | Phantom Works E&IT | Mathematics and Computing Technology For shared understanding.Ontology:• defines a set of concepts and relationships• that represent the content and structure• of some subject matter• in a formal language. For a database.Database Schema:• defines the structure of a database in a formal language. (loosely refers to any of: conceptual, logical, physical) Pumping done-by Mechanical Device Hydraulic System Fuel System Pump Engine has-part Jet Engine supplies-fuel-to Hydraulic Pump Fuel Pump part-of connected-to Fuel Filter Aircraft Engine Driven Pump Copyright © 2011 Michael Uschold. All rights reserved. Page 6
  • 7. Five Questions to get a Better UnderstandingEngineering, Operations & Technology | Phantom Works E&IT | Mathematics and Computing Technology1. What is it for? “it”: ontology or database schema2. What does it look like?3. How do you build one?4. How is it implemented and used? Quick Poll: more alike?5. Where are the semantics? Are they more alike or different? Quick Poll: more different? Copyright © 2011 Michael Uschold. All rights reserved. Page 7
  • 8. What is it for?Engineering, Operations & Technology | Phantom Works E&IT | Mathematics and Computing Technology DB Schema Ontology Focus Data Meaning Shared Understanding Core Structure Human communication, Purpose(s) instances for interoperability, search, efficient storage software engineering, … Single purpose. and querying. Also for structuring instances. By the way… Meaning lost. Instances optional. Copyright © 2011 Michael Uschold. All rights reserved. Page 8
  • 9. What does it look like? Notation Engineering, Operations & Technology | Phantom Works E&IT | Mathematics and Computing Technology DB Schema OntologyNotation: ER diagrams; Logic; syntax no standard no standard serialization diagram notation syntax. syntax.Notation: Minimal focus on Strong focus on semantics formal semantics. formal semantics. Copyright © 2011 Michael Uschold. All rights reserved. Page 9
  • 10. What does it look like? Expressivity Engineering, Operations & Technology | Phantom Works E&IT | Mathematics and Computing Technology DB Schema OntologyExpressivity overlap Entities Classes Attributes, Properties Relations Constraints AxiomsExpressivity differences No Taxonomy taxonomy. is backbone. Cardinality constraints. Constraints for Constraints for integrity, meaning, foreign key, consistency & delete. integrity. Copyright © 2011 Michael Uschold. All rights reserved. Page 10
  • 11. How to Build One? Engineering, Operations & Technology | Phantom Works E&IT | Mathematics and Computing Technology DB Schema OntologyStarting point: Scratch, Reuse if rarely reuse. possible. OntoCleanNormalization: Standard rules in No standard natural language, rules or little tool support. guidelines. Some tuning may be required. A black art.Optimization: Fundamental step. Ontology Toss expensive constraints. Manual, geared to independent; Lost meaning. specific queries Inference engine for specific DB. developers. Copyright © 2011 Michael Uschold. All rights reserved. Page 11
  • 12. How is it Implemented and Used? Engineering, Operations & Technology | Phantom Works E&IT | Mathematics and Computing Technology DB Schema OntologyChange Management, Locked into specific No query lock-in.Agility, Flexibility set of queries per Queries usable on DB. other systems. Semantics hardwired in Tight coupling. Looser coupling. procedural code. Lost meaning. Semantics explicit. Hard to evolve and Potentially easier to maintain. evolve & maintain. ETL tools to help. Few tools. Still no picnic! Copyright © 2011 Michael Uschold. All rights reserved. Page 12
  • 13. How is it Implemented and Used? Engineering, Operations & Technology | Phantom Works E&IT | Mathematics and Computing Technology DB Schema OntologyProcessing Engines SQL Engines Theorem Provers Queries Derive new information from Primary Focus: Reasoning with existing information. Views Consistency and Data integrity integrity Standardized on SQL Less standardization Both handle complex logical expressions. Copyright © 2011 Michael Uschold. All rights reserved. Page 13
  • 14. How is it Implemented and Used? Engineering, Operations & Technology | Phantom Works E&IT | Mathematics and Computing Technology DB Schema OntologyPerformance Highly tuned for Full inferencing: performance and much smaller scale. scale. Not work well with Reduced inferencing: too many joins. reaching large scale. Tradeoff: Performance vs. Function & Flexibility RDB and Triple Stores both have a Niche. Copyright © 2011 Michael Uschold. All rights reserved. Page 14
  • 15. How is it Implemented and Used?Engineering, Operations & Technology | Phantom Works E&IT | Mathematics and Computing TechnologyBuilding Databases & Applications• Gather Requirements• Build Conceptual Schema (e.g., ER or UML model)• Refine to Logical Schema (e.g., normalize, still ER or UML)• Refine to Physical Schema… Copyright © 2011 Michael Uschold. All rights reserved. Page 15
  • 16. How is it Implemented and Used?Engineering, Operations & Technology | Phantom Works E&IT | Mathematics and Computing TechnologyRefind to Physical Schema• Define tables, columns, keys.• Optimize to Specific Kinds of Queries.• Create Data Dictionary (semantics for humans).• Integrity Constraints • Domain, Referential & Semantic integrity • Do the best you can, little automation.• Where are the Semantics? Copyright © 2011 Michael Uschold. All rights reserved. Page 16
  • 17. Five Questions to get a Better UnderstandingEngineering, Operations & Technology | Phantom Works E&IT | Mathematics and Computing Technology1. What is it for? “it”: ontology or database schema2. What does it look like?3. How do you build one?4. How is it implemented and used?5. Where are the semantics? Copyright © 2011 Michael Uschold. All rights reserved. Page 17
  • 18. Where are the Semantics for Database Schema?Engineering, Operations & Technology | Phantom Works E&IT | Mathematics and Computing Technology• Mainly in Conceptual Schema and Data Dictionary• Designed for Humans• Semantics don’t evolve as DB and applications change• Conceptual Schema semantics thrown away when building Physical Schema.• Integrity constraints hardwired in procedural code Semantics are hardwired, lost, tossed, or out of date. You cannot maintain what you do not understand! Copyright © 2011 Michael Uschold. All rights reserved. Page 18
  • 19. Quick SummaryEngineering, Operations & Technology | Phantom Works E&IT | Mathematics and Computing Technology Database Schema Ontology Focus on DATA FOCUS on Meaning DB Constraints Ontology Axioms • to ensure integrity • to specify meaning • may hint at meaning • maybe for integrity No ISA hierarchy ISA Hierarchy is Backbone SQL Engines Theorem Provers • querying, views • infer new information • data integrity • ensure consistency Instances Central Instances Optional Data Dictionary Comments • separate artifact • part of the ontology Copyright © 2011 Michael Uschold. All rights reserved. Page 19
  • 20. More Detailed Summary: 24 Features/Aspects Engineering, Operations & Technology | Phantom Works E&IT | Mathematics and Computing Technology Core Secondary Unimportant for DB Schema for DB Schema for DB SchemaCore 1. Represented using a formal language. 4. Shared meaning of some 16. Abstract types w/nofor Ontology 2. Expressivity: types, properties, constraints. subject matter. instances. 3. Constraints for consistency checking. 5. Taxonomy. 17. Reused to build new ones. 6. Multi-purpose. 18. Reused in unexpected ways. 7. Embedded natural 19. Formal model-theoretic language definitions. semantics. 8. Constraints for meaning. 9. Constraints for ensuring self-consistency (not data).Secondary 10. Efficient querying and storage for data.for Ontology 11. Standardized diagram notation. More Alike? 12. Separate natural language definitions • Over 60% of features are common to both. (data dictionary). 13. Constraints for data integrity. • The 3 features core to both are the most 14. Industry-wide construction guidelines important: what is expressed and how. (normalization). 15. Scale to huge sizes.Unimportant 20. Cardinality constraints for getting foreignfor Ontology keys right and ensuring tables created for More Different? many-to-many relationships. 21. Toss semantics after conceptual modeling. Only 12% of features are core to both. 22. Optimization for specific set of queries. 23. Sophisticated tool support for migrating data when schema evolve (ETL). Can you convert one into the other? 24. SQL for querying data. Copyright © 2011 Michael Uschold. All rights reserved. Page 20
  • 21. More Alike? or More Different? Engineering, Operations & Technology | Phantom Works E&IT | Mathematics and Computing Technology Conversion? • Conceptual Schema & Ontology No harder than between two different ontology languages • Ontology & Logical Schema Some loss of information, a design artifact • Ontology & Physical Schema Much loss of information, an implementation artifactMy Big Fat Greek Wedding Toast:… even though we are apples and oranges, we are all fruit. Copyright © 2011 Michael Uschold. All rights reserved. Page 21
  • 22. ConclusionEngineering, Operations & Technology | Phantom Works E&IT | Mathematics and Computing Technology • They are similar beasts. • They evolved in different communities. Two cultures divided by a common idea?Speaking of weddings… What do you get if you cross:• DB schema technology/community?• Ontology technology/community? Copyright © 2011 Michael Uschold. All rights reserved. Page 22
  • 23. Ontology/Model-Driven Architecture & DevelopmentEngineering, Operations & Technology | Phantom Works E&IT | Mathematics and Computing TechnologyBasic Idea: Conceptual,• Explicitly capture the semantics as formal ontologies. Real world• Base design- and implementation-level artifacts on the ontologies.• Ontologies drive the applications, directly or indirectly. Logical, Design worldBenefits:• Looser coupling.• Semantics is explicit. Physical, Implementation• Integration/Interoperability by design. world• Inference gives automated consistency checking.• Easier to evolve and maintain: • Less hardwiring of semantics means easier to understand and change • Ontologies evolve with the DB and applications. Copyright © 2011 Michael Uschold. All rights reserved. Page 23
  • 24. AcknowledgementsEngineering, Operations & Technology | Phantom Works E&IT | Mathematics and Computing TechnologyFor answering countless questions as a cube-mate:• John ThompsonFor reviews of a companion unpublished paper:• Phil Bernstein,• Tim Wilmering,• Jun Yuan,• Anhai Doan,• Bill Andersen,• Amit Sheth.For ideas on model-driven development:• Simon Robe. Copyright © 2011 Michael Uschold. All rights reserved. Page 24