Semantics Modeling and Representation Wendy Hui Wang CS Department Stevens Institute of Technology hwang@cs.stevens.edu 1
Consider the following data: 011500 18.66 0 0 62 46.271020111 25.220010 011500 26.93 0 1 63 68.951521001 32.651010 020100 33.95 1 0 65 92.532041101 18.930110 020100 17.38 0 0 67 50.351111100 42.160001 What do they really mean? How to model the meaning of data? How to represent the meaning of data? 2
Outline Semantics modeling Semantics representation SMSN: Semantics based mobile social networks Brief discussion of Semantics + SDR 3
In Database Context Semantic modeling is fundamental in database design Goal of semantics modeling: accurately model data relationships Evolution of semantic models Early years: representation of structural aspects of (static) business data Recent years: incorporating the behavioral (dynamic) aspects of data 4
Philosophical Roots of Semantic Modeling Semantic models should Provide a higher level of abstraction for modeling data, and Allow database designers to think of data in ways that correlate more directly to how data arise in the world. 5
Components of Semantic Modeling Explicit representation of objects, and relations between objects Type constructors for building complex types ISA relationships Derived schema components 6
Derived Schema Component World Traveler Example objects Type constructors for building complex types ISA Relation objects 7
Semantic Models Entity relation model (ER) Functional data model (FDM) Semantic data model (SDM) 8
Entity relation (ER) Model Proposed in 1976. One of the first true semantic data models in the literature. Still commonly used in database design. A graph based representation of abstract sets of entities, relationships between these entity sets, and attributes defined from both entity and relationship sets 9
An Example of ER Model 10
More Discussions of ER Model Restriction of the use of attributes and aggregation Attributes must be single valued Multi valued attributes require the use of a relationship. ISA relationships are not represented. 11
Functional Data Model (FDM) Proposed in 1976 the first semantic model centered around functional relationships, that is, attributes. FDM connects objects directly with attributes without the use of intermediate constructs such as aggregation and grouping. 12
FDM V.S. ER Attributes in FDM can be either single or multivalued defined on domains that are Cartesian products of the atomic entity sets. FDM supports ISA 13
An Example of FDM Model 14
Semantic Data Model (SDM) Proposed in 1981 The first model to emphasize grouping constructor, and the support of derived schema components. Derived schema components permit data relativism, that is, multiple perspectives on the same underlying data set. 15
Uniqueness of SDM It provides a rich set of primitives for specifying derived attributes and subtypes. Subtype relationships in SDM are broken into 4 categories: Those that are defined by attributes Those that are defined by set operations (e.g., intersection) on existing types Those that serve as the range of some attribute, Those that are user specified 16
Outline Semantics modeling Semantics representation SMSN: Semantics based mobile social networks Brief discussion of Semantics + SDR 17
Semantics Representation 1: Schema The semantics, i.e. the explanation of what data means, is called metadata or data about data. Metadata can be represented by schema. NAME LENGTH FORMAT LABEL instudy 6 MMDDYY Date of randomization into study bmi 8 Num Body Mass Index. obesity 3 0=No 1=Yes Obesity (30.0 <= BMI) ovrwt 8 0=No 1=Yes Overweight (25 <= BMI < 30) Height 3 Num Height (inches) Wtkgs 8 Num Weight (kilograms) Weight 3 Num Weight (pounds) 18
Semantics Representation 2: XML Semantic markup the extensible Markup Language (XML) XML supports self defined tags, which are used to describe the meaning of the data. XML represents the semantics as a layer of machine understandable specification built on top of common syntax. 19
An Example of XML <bioml> <organism name="homo sapiens (human)"> <chromosome name="chromosome 11" number="11"> <gene name="insulin gene"> <dna name="complete HUMINS sequence > agagcaccca acaccctcca... </dna>... </gene> </chromosome> </organism> </bioml> 20
Components in XML Semantics XML Semantics include The interpretation of element type names, attribute names, and, in some cases, content terms The processing rules (also known as business rules) for conducting transactions with valid documents The relationship between structured elements of one document and those of another 21
Beyond XML To describe the meaning of data on WWW, W3C recommend Resource Description Framework (RDF) Web Ontology Language (OWL) 22
The Resource Description Framework (RDF) RDF is a language for representing information about resources in Web. RDF is represented in XML, which provides machine understandable semantics. It provides better precision in resource discovery than full text search, assisting applications as schemas evolve, interoperability of metadata. 23
RDF Triples The semantics of RDF is determined by the set of triples <subject, predicate, object> that are explicitly asserted or inferred. subject object predicate 24
Web Ontology Language (OWL) OWL is based on RDF. OWL adds many new features to RDF: Functional properties Inverse functional properties (database keys) Local domain and range constraints General cardinality constraints Symmetric and transitive properties 25
Outline Semantics modeling Semantics representation SMSN: Semantics based mobile social networks Brief discussion of Semantics + SDR 26
Social Mobile Computing Integration of social networks with mobile computing Static case: use mobile devices to access the pre built social networks Dynamic case: construct social networks from mobile devices community oriented, self organizing, self adaptive 27
Necessity for Semantics Mobile devices store large amounts of personal data Address book, text messages, call logs, photos Personal data can be summarized to user profiles (describing interests, behavior, etc.) Goal: group users into social communities by their personal profiles Challenge: simple exact match of keywords in user profiles misses important semantics Same concern Wendy holds Hui Wang, for SDR resources Semantics Study in networks 28
My Current Work SMSN: Semantics based mobile social network computing Three components Ontology based user profile representation Semantics based user profile matching Semantics driven routing 29
Ontology based User Profiles (1/2) Ontology: Uses RDF and OWL The terminological box (T box): defines the common understanding for all the important concepts and their relationships. We adapt Friend of a Friend (FOAF) vocabulary 30
Ontology based User Profiles (2/2) User profiles Annotated instances of the reference T Box ontology <Person rdf:id="person_1"> <friendof> <Person rdf:id="person_2"> <eyecolorrdf:datatype= http://www.w3.org/2001/xmlschema#string">black</eyecolor> <weight rdf:datatype= "http://www.w3.org/2001/xmlschema#float">55.0</weight> <friendof rdf:resource="#person_1"/> </Person> 31
Semantics based User Profile Two phases Matching Phase 1: match user profiles at general concept level (T box level) Phase 2: match user profiles at detailed concept level (keyword level) Similarity metrics Relative distance of two concepts in the ontology 32
Semantics driven Routing Nodes distribute semantic summary of user/resource profiles within a certain range to their network neighborhood A node can make routing decisions by knowing only its immediate neighbors and limited resource information. A leap mechanism is used to expedite the searching process by skipping over the barren areas, i.e., the areas consisting of few resources/profiles. 33
Discussion: SDR + Semantics The challenges Identify the real meaning of semantics In database applications, semantics means metadata In Web, semantics means the definition of Web resources In social networks, semantics means the description of users and their social behaviors What does semantics mean in SDR? 34
Discussion: SDR + Semantics The challenges (continue) Identify the real meanings of semantics Design the semantic models Can any existing semantic model (ER, FDM, SDM, and others) be applied to SDR? Represent the semantics Can any existing semantic representation (schema, XML, RDF, OWL, and others) be applied to SDR? 35
Reference Richard Hull, Roger King. Semantic Database modeling: survey, applications, and research issues. XML: http://www.w3.org/xml/ RDF Primer: http://www.w3.org/tr/rec rdfsyntax/ OWL: http://www.w3.org/2004/owl/ 36