Steven Seida D2RQ Blog Integration Lab. Data to RDF Integration Approaches* 1 of 2 *Summarized from Ch 9 of Semantiic Web Programming, 2009, by Hebeler.

Slides:



Advertisements
Similar presentations
WordPress Installation for Beginners Sheila Bergman
Advertisements

PHP SQL. Connection code:- mysql_connect("server", "username", "password"); Connect to the Database Server with the authorised user and password. Eg $connect.
WordPress from Start to Finish Day 1: Installing and Using WordPress Looking at the WordPress database.
© 2006 Hewlett-Packard Development Company, L.P. The information contained herein is subject to change without notice Use Case: Populating Business Objects.
RDF and RDB 1 Some slides adapted from a presentation by Ivan Herman at the Semantic Technology & Business Conference, 2012.
Chapter 18 - Data sources and datasets 1 Outline How to create a data source How to use a data source How to use Query Builder to build a simple query.
1 Configuring Web services (Week 15, Monday 4/17/2006) © Abdou Illia, Spring 2006.
Multiple Tiers in Action
A complete web app using flex. You can use the flex builder to generate the php (server side) code for a flex-php application. As before, Php connects.
Programming for the Web Assignment 1 Help Mark Johnson.
Dynamic Web site With PHP and MySQL. MySQL The combination of MySQL database and PHP scripting language is optimum for building dynamic websites. MySQL.
Migrating to EPiServer CMS 5 Johan Björnfot -
ONTOLOGY ENGINEERING Lab #9 - November 3, Linking Relational Databases to Ontologies 2  Relational databases are still a common means of storing.
Phil Brewster  One of the first steps – identify the proper data types  Decide how data (in columns) should be stored and used.
© 2006 Hewlett-Packard Development Company, L.P. The information contained herein is subject to change without notice Publishing data on the Web (with.
Installing CiviCRM onto Wordpress. How does it work?
M. Taimoor Khan * Java Server Pages (JSP) is a server-side programming technology that enables the creation of dynamic,
WaveMaker Visual AJAX Studio 4.0 Training Studio Overview.
Session 5: Working with MySQL iNET Academy Open Source Web Development.
Rajashree Deka Tetherless World Constellation Rensselaer Polytechnic Institute.
SPARQL All slides are adapted from the W3C Recommendation SPARQL Query Language for RDF Web link:
INTERNET APPLICATION DEVELOPMENT For More visit:
Advanced Database Management System Lab no. 11. SQL Commands (for MySQL) –Update –Replace –Delete.
SQL HW1 Turn in as a hardcopy at the start of next class period. You may work this assignment in groups.
PHP Programming with MySQL Slide 8-1 CHAPTER 8 Working with Databases and MySQL.
Module 14: WCF Send Adapters. Overview Lesson 1: Introduction to WCF Send Adapters Lesson 2: Consuming a Web Service Lesson 3: Consuming Services from.
Improve the way you create, manage and distribute information INNOVATION INSPIRATION Relational database integration with RDF/OWL.
Chapter 7 Working with Databases and MySQL PHP Programming with MySQL 2 nd Edition.
CSC 411/511: DBMS Design Dr. Nan WangCSC411_L12_JDBC_MySQL 1 MySQL and JDBC.
CakePHP is an open source web development framework. It follows Model-View- Controller and is developed using PHP. IT is the basic for user to create.
Creating Dynamic Web Pages Using PHP and MySQL CS 320.
Using OUI to install Oracle9i Release 2 on an OpenVMS System.
Mr. Justin “JET” Turner CSCI 3000 – Fall 2015 CRN Section A – TR 9:30-10:45 CRN – Section B – TR 5:30-6:45.
Searching Business Data with MOSS 2007 Enterprise Search Presenter: Corey Roth Enterprise Consultant Stonebridge Blog:
Present :Arezoo Mollahasani. Step 1  Define your server connection Open MySQL WorkBench and click New Server Instance on the right of the window.
Open Source Server Side Scripting ECA 236 Open Source Server Side Scripting MySQL – Inserting Data.
JDBC Tutorial CSCI 201L Jeffrey Miller, Ph.D. HTTP :// WWW - SCF. USC. EDU /~ CSCI 201 USC CSCI 201L.
Efficient RDF Storage and Retrieval in Jena2 Written by: Kevin Wilkinson, Craig Sayers, Harumi Kuno, Dave Reynolds Presented by: Umer Fareed 파리드.
CODELABOR Shin Sang Jae Template Guide (codelabor-flex-lcds-template)
1 Chapter 20 – Data sources and datasets Outline How to create a data source How to use a data source How to use Query Builder to build a simple query.
Ontology engineering Lab #8 – October 20, 2014.
© 2006 Altova GmbH. All Rights Reserved. Altova ® Product Line Overview.
MyGrid/Taverna Provenance Daniele Turi University of Manchester OMII f2f Meeting, London, 19-20/4/06.
Microsoft FrontPage 2003 Illustrated Complete Integrating a Database with a Web Site.
Creating a simple database This shows you how to set up a database using PHPMyAdmin (installed with WAMP)
MySQL Getting Started BCIS 3680 Enterprise Programming.
RDF and Relational Databases
What is MySQL? MySQL is a relational database management system (RDBMS) based on SQL (Structured Query Language). First released in January, Many.
© 2012 LogiGear Corporation. All Rights Reserved FitNesseFitNesse Authors: Nghia Pham 1.
Mr. Justin “JET” Turner CSCI 3000 – Fall 2015 CRN Section A – TR 9:30-10:45 CRN – Section B – TR 5:30-6:45.
Intro to APACHE, MySQL, and PHP & freely available (hackable) Packages Aonghus Sugrue 04 Oct 2012.
CSCI 3327 Visual Basic Chapter 13: Databases and LINQ UTPA – Fall 2011.
CHAPTER 7 LESSON C Creating Database Reports. Lesson C Objectives  Display image data in a report  Manually create queries and data links  Create summary.
Lab 3.21 MySQL Database Lab Developing the Tools May 5 th, 2004 Montréal, Québec Dominik Gehl Hôpital Ste-Justine, Montréal.
Software-Projekt 2008 Seminarvortrag“Short tutorial of MySql“ Wei Chen Verena Honsel.
JAFER Toolkit Project Oxford University 1 JAFER Java-based high level Z39.50 toolkit Matthew Dovey; Colin Tatham; Antony Corfield; Richard Mawby Oxford.
WMarket For Adminstrators Manual Installation. Basic Dependencies To install your own WMarket instance, you are required to install the following software:
Building Your Own Website Using:. Install & configure LAMP. Download WordPress and run it as a local website on your Raspberry Pi. Configure WordPress.
9 Copyright © 2004, Oracle. All rights reserved. Getting Started with Oracle Migration Workbench.
COM621: Advanced Interactive Web Development Lecture 10 PHP and MySQL.
RDF and RDB 2 D2RQ.
, MS-Access, QBE, Access/Oracle
RDF and RDB 2 D2RQ.
Linked Data browsers.
Easy Way to Reset WordPress Admin Password on Localhost? Guided By: WPGLOBALSUPPORTWPGLOBALSUPPORT.
INTAKE OF NEW PORTFOLIO AND INVOICES
Chapter 8 Working with Databases and MySQL
MSIS 655 Advanced Business Applications Programming
8 6 MySQL Special Topics A Guide to MySQL.
RDF and RDB 2 D2RQ.
Presentation transcript:

Steven Seida D2RQ Blog Integration Lab

Data to RDF Integration Approaches* 1 of 2 *Summarized from Ch 9 of Semantiic Web Programming, 2009, by Hebeler et al.. Starting PointApproachNotes XML dataDevelop XSLT transformation code (RDF is, after all, XML) Code is generally short and simple, although learning curve is high and changes to source XML structure may cause need for new XSLT. XML dataUse Java XML bindings (JAXB) to get data into Java structures, then write a template for Velocity to write as RDF Provides Java to perform any transformations in data and moves RDF generation into configuration files although changes to XML structure likely to cause recompile. Relational Database Use D2RQ (or SquirrelRDF or OpenLink Virtuoso) to expose data via SPARQL Small learning curve, but RDF tends to mirror database structure.

Data to RDF Integration Approaches (2 of 2) Starting PointApproachNotes Custom dataDevelop Turtle (N3) writer for the structure (say in Java). Very flexible approach, but entirely custom and when kept simple does no data cleaning. Java structuresUse Java Reflection (ability to query classes for method names, etc) to auto create (serialize) classes of each object type and properties of each attribute. No configuration required, so very quick although little customization can occur in the output.

D2RQ Exercise Use D2RQ to provide access to a blog database in Jena.

D2RQ Review Database to RDF Query (D2RQ) Converts database information into RDF triples Generally wants to make classes and properties 1. Create mapping file (auto-generates a starter) 2. Use mapping file for conversion -Can convert entire database -Can leave database and provide SPARQL endpoint

Configure MySQL with a Blog DB 1.Add “blog” database to your mySQL database 1.Connect as root (lakers), create database blog; exit; 2.Load an example blog database with a schema (and data) from file wordpressdump.sql at windows command prompt* 1.mysql -u root -plakers blog < wordpressdump.sql 1.This command must result in an empty/blank response. 3.Download and install d2r-server (d2r-server-0.7) to c:\extra\ 1.Select Download from berlin.de/bizer/d2rq/ 4.Create a mapping file. In the D2R server directory issue the command to generate a mapping file*: 1.Syntax is: generate-mapping [-u username] [-p password] [-d driverclass] [-o outfile.n3] [-b base uri] jdbcURL 2.generate-mapping -u root -p lakers jdbc:mysql:// /blog > blog.n3 1.Specifying the mysql driver is optional 2.The result file is blog.n3 (inspect it) *A space or not a space after –p is very important and irritating.

D2RQ Concepts Top Line of Mapping File: “map:” Defaults to URL of output filename -> Change this to anything (because will be a prefix), but you probably don’t want it to match Vocab. “Vocab:” line -> This is your RDF ontology and instances prefix. Change to Two primary concepts in D2RQ are: 1. ClassMap -> what classes to create 2.PropertyBridge ->what relationships to create

MySQL tables in Blog The blog schema is for WordPress (i.e. wp) mysql> show tables; | Tables_in_blog | | wp_comments | | wp_links | | wp_options | | wp_postmeta | | wp_posts | | wp_term_relationships | | wp_term_taxonomy | | wp_terms | | wp_usermeta | | wp_users | rows in set (0.00 sec) Fields in wp_posts post_author post_date post_date_gmt post_content post_title post_excerpt post_status... In looking at your mapping file, what is D2RQ saying should be a class? What does it say should be RDF properties?

Browsing with D2RQ Open C:\extra\d2r-server-0.7\doc\index.html in a browser Scroll down that page about half-way: We have finished step 3, “generate a mapping file,” now perform steps 4 and 5: Start the server: d2r-server blog.n3 Test the Server -> Open in a web browser. Look around at the data (in html). -Who is the writer of the first two posts?

SPARQL Query in Jena Make a copy of your Lab3_2 project Make (and load) your model using: Model d2rqModel = new ModelD2RQ(mappingFile); -where mappingFile is the filename of the mapping file -Also add d2rq-0.7.jar from the d2r-server*/lib area to your project -Get rid of the model loading, timing, etc. Then issue a SPARQL query and output (useful) results to XML for*: 1.All the property data (and values) about all users**. 2.All the property data about users that have issued postings. *Hovering your mouse over the rdf:type for instances in the localhost:2020 web page can show the actual type names. *Does the d2r-server you started on the preceding page need to be running for your SPARQL to work?

Other Questions What steps are required to enable a database with D2RQ? What Jena constructs are required to access a D2RQ store? What do we do if we want joined tables to be the class instances (and properties)? Does D2RQ provide us a persistence mechanism?

Backup

Optional: MySQL with Non-Root User 1.Inside mysql Add “blog” database with user “blogger” with password “noise” to your mySQL database 1.Connect as root, create database BLOG; 2.create user blogger identified by ‘noise’; create databse blog; 3.grant all privileges on blog.* to identified by ‘noise' with grant option; 2.Load the blog database with a schema (and data) in file wordpressdump.sql (run at windows command line): 1.mysql -u blogger -pnoise blog < wordpressdump.sql 3.Install d2r-server to c:\extra\ (then run a shell in the d2r-server* directory) 4.Create a mapping file. In the D2R server directory issue the command to generate a mapping file: 1.generate-mapping [-u username] [-p password] [-d driverclass] [-o outfile.n3] [-b base uri] jdbcURL 2.generate-mapping -u blogger -p noise jdbc:mysql:// /blog > blog.n3 1.The mysql driver is optional 2.The result file is blog.n3

How to dump a MySQL database To Dump the blog database using credentials for user blogger (with password noise), run the following at a command line: mysqldump -u blogger -pnoise blog >wordpressdump.sql (Note: There is no space between –p and noise) How to restore same database and credential, run the following: mysql -u blogger -pnoise blog < wordpressdump.sql (Note: that the blog database must already exist with blogger as a user and there is not space between –p and noise.)