SQL Databases are a Moving Target Juan F. Sequeda – Syed Hamid Tirmizi –

Slides:



Advertisements
Similar presentations
Three-Step Database Design
Advertisements

Data Definition and Integrity Constraints
ER to Relational Mapping. Logical DB Design: ER to Relational Entity sets to tables. CREATE TABLE Employees (ssn CHAR (11), name CHAR (20), lot INTEGER,
Logical DB Design: ER to Relational Entity sets to tables. Employees ssn name lot CREATE TABLE Employees (ssn CHAR (11), name CHAR (20), lot INTEGER, PRIMARY.
CH-4 Ontologies, Querying and Data Integration. Introduction to RDF(S) RDF stands for Resource Description Framework. RDF is a standard for describing.
Chronos: A Tool for Handling Temporal Ontologies in Protégé
Relational Database. Relational database: a set of relations Relation: made up of 2 parts: − Schema : specifies the name of relations, plus name and type.
Of 27 lecture 7: owl - introduction. of 27 ece 627, winter ‘132 OWL a glimpse OWL – Web Ontology Language describes classes, properties and relations.
The Entity-Relationship Model
Book Chapter 3 (part 2 ) From ER to Relational Model.
SQL Lecture 10 Inst: Haya Sammaneh. Example Instance of Students Relation  Cardinality = 3, degree = 5, all rows distinct.
Dr. Jim Bowring Computer Science Department College of Charleston CSIS 690 (633) May Evening 2009 Semantic Web Principles and Practice Class 5: 27 May.
Cs3431 Constraints Sections 6.1 – 6.5. cs3431 Example CREATE TABLE Student ( sNum int, sName varchar (20), prof int, CONSTRAINT pk PRIMARY KEY (snum),
Mapping an ERD to a Relational Database To map an ERD to a relational database, five rules are defined to govern how tables are constructed. 1)Rule for.
Department of Computer Science and Engineering, HKUST Slide 1 Notation Summary R, S: table schemas such as Branch (branch-name, branch-city, assets) Account.
SPRING 2004CENG 3521 The Relational Model Chapter 3.
Semantic Web The Web with Semantics. What is the Semantic Web?  Knowledge Representation on the (decentralized) web.  Definitions from Google Definitions.
1 Extracting RDF Data from Unstructured Sources Based on an RDF Target Schema Tim Chartrand Research Supported By NSF.
The Relational Model Codd (1970): based on set theory Relational model: represents the database as a collection of relations (a table of values --> file)
Exam 2 Review Dr. Bernard Chen Ph.D. University of Central Arkansas.
Oracle Data Definition Language (DDL)
1 Relational model concepts Key constraints Referential integrity constraint Steen Jensen, autumn 2013.
ER to Relational Mapping. Logical DB Design: ER to Relational Entity sets to tables. CREATE TABLE Employees (ssn CHAR (11), name CHAR (20), lot INTEGER,
인공지능 특강 프로젝트 - Development of Decision Tree Algorithm for Semantic Web data 전동규.
Chapter 4 The Relational Model.
13 Dec. 2006CmpE 583 Fall 2006 OWL Lite- Property Char’s. 1 OWL Lite: Ch. 13- Property Characteristics Atilla ELÇİ.
Semantic modeling of System Requirements Lunch Lieke Verhelst MSc Student for GIMA Feb 27 th 2009.
Ontology Development Kenneth Baclawski Northeastern University Harvard Medical School.
OWL and SDD Dave Thau University of Kansas
Logics for Data and Knowledge Representation
1 st Workshop on Intelligent and Knowledge-oriented Technologies, , Bratislava Scripting the Semantic Web Marian Babik, Ladislav Hluchy Intelligent.
RDF and OWL Developing Semantic Web Services by H. Peter Alesso and Craig F. Smith CMPT 455/826 - Week 6, Day Sept-Dec 2009 – w6d21.
Ultrawrap: SPARQL Execution on Relational Data Juan F. Sequeda, Daniel P. Miranker University of Texas - Austin ISWC 2009 Seoul National University Internet.
Building an Ontology of Semantic Web Techniques Utilizing RDF Schema and OWL 2.0 in Protégé 4.0 Presented by: Naveed Javed Nimat Umar Syed.
Database Management COP4540, SCS, FIU Relational Model Chapter 7.
Component 4: Introduction to Information and Computer Science Unit 6: Databases and SQL Lecture 2 This material was developed by Oregon Health & Science.
Master Informatique 1 Semantic Technologies Part 11Direct Mapping Werner Nutt.
OWL 2 in use. OWL 2 OWL 2 is a knowledge representation language, designed to formulate, exchange and reason with knowledge about a domain of interest.
1 The Relational Model. 2 Why Study the Relational Model? v Most widely used model. – Vendors: IBM, Informix, Microsoft, Oracle, Sybase, etc. v “Legacy.
Relational Data Model Ch. 7.1 – 7.3 John Ortiz Lecture 3Relational Data Model2 Why Study Relational Model?  Most widely used model.  Vendors: IBM,
Semantic Web - an introduction By Daniel Wu (danielwujr)
Slide Chapter 5 The Relational Data Model and Relational Database Constraints.
SQL: DDL. SQL Statements DDL - data definition language –Defining and modifying data structures (metadata): database, tables, views, etc. DML - data manipulation.
Deep integration of Python with Semantic Web technologies Marian Babik, Ladislav Hluchy Intelligent and Knowledge Technologies Group Institute of Informatics,
VICTORIA UNIVERSITY OF WELLINGTON Te Whare Wananga o te Upoko o te Ika a Maui SWEN 432 Advanced Database Design and Implementation Mapping RDB Schema to.
Artificial Intelligence 2004 Ontology
Web Information Systems Modeling Luxembourg, June VisAVis: An Approach to an Intermediate Layer between Ontologies and Relational Database Contents.
Organization of the Lab Three meetings:  today: general introduction, first steps in Protégé OWL  November 19: second part of tutorial  December 3:
Lecture 3 Book Chapter 3 (part 2 ) From ER to Relational.
Practical RDF Chapter 12. Ontologies: RDF Business Models Shelley Powers, O’Reilly SNU IDB Lab. Taikyoung Kim.
ONTOLOGY ENGINEERING Lab #2 – September 8,
Building an Operational Product Ontology System Written by Taehee Lee, Ig-hoon Lee, Suekyung Lee, Sang-goo Lee (IDS Lab. SNU) Dongkyu Kim, Jonghoon Chun.
Modeling Security-Relevant Data Semantics Xue Ying Chen Department of Computer Science.
Including Constraints. What Are Constraints? Constraints enforce rules at the table level. You can use constraints to do the following: – Enforce rules.
Chapter 3: Relational Databases
DATA MODELING AND DATABASE DESIGN DATA MODELING AND DATABASE DESIGN Part 2.
Semantic Interoperability in GIS N. L. Sarda Suman Somavarapu.
Database Management Systems 3ed, R. Ramakrishnan and J. Gehrke1 The Relational Model Chapter 3.
1 CS122A: Introduction to Data Management Lecture #5 (E-R  Relational, Cont.) Instructor: Chen Li.
Chapter Describing Individuals OWL Individuals ▫Ontological Primitive Layer  Mostly described with RDF ▫Instances of user-defined ontological.
COP Introduction to Database Structures
SQL: Schema Definition and Constraints Chapter 6 week 6
Ikan Software NV CWD4ALL
Translation of ER-diagram into Relational Schema
Model-Driven Ontology Engineering
From ER to Relational Model
ece 720 intelligent web: ontology and beyond
CS4222 Principles of Database System
Database Design: Relational Model
Mapping an ERD to a Relational Database
Presentation transcript:

SQL Databases are a Moving Target Juan F. Sequeda – Syed Hamid Tirmizi – Daniel P. Miranker – Department of Computer Sciences The University of Texas at Austin

2 My favorite slide DATABASES SEMANTIC WEB

3 The Semantic Web Vision DB Local ontology DB Local ontology DB Local ontology Semantic Query Engine User Layer: Users and agents interact with this layer and query the ontologies Ontology Layer: defines the semantic representation of RDB. Inference Database Layer: Data that needs to accessed semantically

4 So what should be done? Make it easy for existing databases to generate Semantic Web content. Research Problem(s): Generate Ontologies from Database Content (many systems already make RDF from database data) Mapping database restrictions to OWL –People don’t live past 120 years old Mining database content for additional domain knowledge –Professors earn more than teaching assistants

5 Finally: Can the Semantic Web Work? DB Local ontology DB Local ontology DB Local ontology Semantic Query Engine We see a big problem: –Who builds this? –Who generates these mappings?

6 The Semantic Web Vision Local ontology Table Content DB Schema/ Metadata generate translate SQL-query RDF Semantic Web Query Engines

7 Our Position SQL has semantics –SQL has been evolving  it is a moving target! –SQL DDL can be used to generate local ontologies –A Greatest Common Denominator like OWL-DL can aid with data integration

8 Why are SQL Databases Moving Targets? In the beginning we had… Relational Model Student(Juan, 22) SQL86-89 came out with Table Definitions CREATE TABLE employee ( name VARCHAR(100), age INTEGER) SQL92 added data integrity Constraints CHECK, PRIMARY KEY, FOREIGN KEY, UNIQUE SQL99 added Triggers

9 SQL DDL to Ontologies Requirements –To create the ontology automatically, we need to compare the technologies –We need to identify constructs with similar semantics Analysis –Our analysis leads to a layer cake for SQL with corresponding layers in the Semantic Web stack Implementation –We express our transformations as FOL and use SQL BNF as a guideline for completeness.

10 Relational Model to RDF Relational Model –Employee(name, age) –T1: Employee (Juan, 21) RDF <rdf:RDF xmlns:rdf=" xmlns:ex=" Juan 21

11 Table Definition to RDFS Table Definition CREATE TABLE employee ( name VARCHAR(100), age INTEGER) RDFS

12 Table Definition to RDFS <rdf:RDF xmlns:rdf=" xmlns:rdfs=" Employee <rdfs:subClassOf rdf:resource=" ns#Resource"/> Name of Employee Age of Employee Table Name Attributes Data type

13 SQL to RDFS Tables  rdfs:Class Columns  rdf:Property –Table  rdfs:Domain –Datatype  rdfs:Range Foreign Keys  rdf:Property –Table  rdfs:Domain –Referencing Table  rdfs:Range

14 SQL to RDFS SQL BNFShared Semantics rdfs:Class ::= CREATE [ ] TABLE [ … ] Tables are equivalent to classes rdf:Property rdfs:domain rdfs:range ::= [NOT NULL] [...] Attributes become properties having the domain as the current table and the range as the datatype. rdf:Property rdfs:domain rdfs:range ::= FOREIGN KEY REFERENCES [...] Foreign Keys are relationships

15 SQL to OWL CREATE TABLE employee( employee_id INTEGER PRIMARY KEY, employee_ssn VARCHAR(11) UNIQUE, employee_name VARCHAR(100) NOT NULL, employee_salary INTEGER NOT NULL, employee_type CHAR(8) CHECK ( employee_type IN ('TEMP', 'FULLTIME', 'CONTRACT')) dept INTEGER FOREIGN KEY (dept) REFERENCES department (dept_id)) CREATE TABLE department( dept_id INTEGER PRIMARY KEY, dept_name VARCHAR(100) NOT NULL, manager INTEGER FOREIGN KEY (manager) REFERENCES employee (employee_id))

16 SQL to OWL Table Name Foreign Key Attribute Data type

17 SQL to OWL Temp Fulltime Contract Enumerated Check Constraint

18 SQL to OWL SQL BNFShared Semantics owl:Class owl:ObjectProperty ::= CREATE [ ] TABLE [...] A table can be an Object Property if acts like a binary relation, or else it is a Class owl:oneOf ::= CHECK ::= [ NOT ] IN The enumerated check constraint represents owl:oneOf owl:DatatypeProperty owl:FunctionalProperty owl:maxCardinality owl:cardinlity ::= [NOT NULL] [...] An attribute is equivalent to a Datatype Property with their domain and range. Depending if the attribute is NOT NULL or not, it can have owl:maxCardinality or owl:cardinality. owl:ObjectProperty rdfs:domain rdfs:range owl:FunctionalProperty ::= FOREIGN KEY REFERENCES [...] Foreign Keys connect to relations, therefore they act as Object Properties with their respective domain and range.

19 Rules: SQL to OWL Binary Relation: a relation that only has two foreign keys (single or composite) referencing two relations. Class: A relation that is not a binary relation is a class. Object Property –A binary relation is an object property –A foreign key that references another relation is an object property, whose domain is the current relation and range is the relation that the foreign key references

20 Rules: SQL to OWL Data type Property: If an attribute is not an object property, then it is a data type property. Its domain is the current relation and the range is the data type.

21 SQL to Rules Triggers are business rules and it can not be expressed in OWL Should think about how this could be mapped to the rule layer of the Semantic Web And the final layer cake…

22 SQL Layer Cake

23 Greatest Common Denominator for Data Integration All ontologies generated by SQL should have similar semantic power to facilitate better data integration –Use of different technologies may cause problems in data integration –The constructs we use has OWL-DL as GCD OWL-DL is what SW people like the most. –Reasoning and Inference –Decidability –Computational Completeness Therefore OWL-DL should be the target for SQL to Semantic Web transformations.

24

25 Summary SQL has semantics –SQL has been evolving  it is a moving target! –SQL DDL can be used to generate local ontologies –A Greatest Common Denominator like OWL-DL can aid with data integration

26 Thank You

27 Other Slides…

28 Discussion Topics Hierarchy and Inheritance –SQL DDL doesn’t have it –How do database people model it –Not clear how to get the semantics CHECK Constraint –Has more semantics that OWL can handle –CHECK (value >0 AND value < 360) OWL Constraints –allValuesFrom someValuesFrom URI

29 Discussion Topics: Hierarchy and Inheritance Hierarchy and Inheritance –Integrate information that is spread across several relations (vertical partitioning) and can be either Integrated in one concept Inheritance But how do you decide! –Key Equality and Data Inclusion: two relations that share the same primary key and the child relation’s primary key is also a foreign key PKPK, FK Project Software Project

30 Discussion Topics: Hierarchy and Inheritance How do you represent Hierarchy and Inheritance in database? –Hierarchy: Hand - Finger PK FK HandFinger –Inheritance: Person - Student PK PersonStudent PK, FK ?

31 Discussion Topics: someValuesFrom vs allValuesFrom A(id, x) B(id, y) C(A_id, B_id) Can we say that A and B are classes? Yes Can we say that C represents an object property? Yes Can we say that B can only be connected to A using the object property? ¿? Can we say anything about the cardinality of this relation? ¿?

32 Discussion Topics: CHECK Constraint Embodies semantics and rules at the same time Enumerated CHECK constraint  owl:one of But what about: –CHECK (value >0 AND value < 360)

33 Translation BNF: SQL to OWL ::= | ::= CREATE TABLE :: = ::= CREATE TABLE ::= ::= [ { <property}...] ::= |