Pan-European infrastructure for Ocean & Marine Data management An EU Integrated research Infrastructure Initiative (I3) How to implement CDI ? M. Fichaut,

Slides:



Advertisements
Similar presentations
Connecting to Databases. connecting to DB DB server typically a standalone application Server runs on localhost for smaller sites –i.e. Same machine as.
Advertisements

Connecting to Databases. relational databases tables and relations accessed using SQL database -specific functionality –transaction processing commit.
OBSERVATIONS & PRÉVISIONS CÔTIÈRES 3 rd SeaDataNet training course – Ostende – June 2008 Tools for data management in the frame.
OBSERVATIONS & PRÉVISIONS CÔTIÈRES Training Workshop – Ostende – October 2009 REFORMATTING TOOLS Med2MedSDN and NEMO M. Fichaut.
WaveMaker Visual AJAX Studio 4.0 Training
OBSERVATIONS & PRÉVISIONS CÔTIÈRES 3 rd SeaDataNet training course – Ostende – June 2008 MIKADO tool M. Fichaut, V. Tosello, M.
UIC Data Conversion and Submission via CDX Node Client UIC Database V2 6/16/
Cruise Summary Report Content Management SDN2 1. Training Workshop - Ostend, Belgium.
Training course – Ostende – 2-6 July 2012 Training Workshop – Ostende – 1-4 March 2010 Practical work on NEMO Converting files M. Fichaut.
Distributed Application Development B. Ramamurthy.
DT228/3 Web Development Databases. Database Almost all web application on the net access a database e.g. shopping sites, message boards, search engines.
1 Design patterns Lecture 4. 2 Three Important skills Understanding OO methodology Mastering Java language constructs Recognizing common problems and.
ASP.NET Programming with C# and SQL Server First Edition Chapter 8 Manipulating SQL Server Databases with ASP.NET.
Chapter 12 Database Connectivity with ASP.NET JavaScript, Third Edition.
Attribute databases. GIS Definition Diagram Output Query Results.
Chapter 7 Managing Data Sources. ASP.NET 2.0, Third Edition2.
Pan-European infrastructure for Ocean & Marine Data management An EU Integrated research Infrastructure Initiative (I3) MIKADO : Java tool for XML Creation.
SDN2 First Training Course, Oostende IODE-PO, 2-6 July 2012 Metadata Directories Management Sissy Iona, HCMR/HNODC.
TUTORIAL (1) Software installation Written by: Eng. Ahmed Mohamed Abdel Ghafar, Edited by Eng. Muhammed Hammad, Eng. Hamdy Soltan & Eng. Osama Talaat.
Today’s Agenda Chapter 12 Admin Tasks Chapter 13 Automating Admin Tasks.
Advance Computer Programming Java Database Connectivity (JDBC) – In order to connect a Java application to a database, you need to use a JDBC driver. –
6/1/2001 Supplementing Aleph Reports Using The Crystal Reports Web Component Server Presented by Bob Gerrity Head.
Status of upgrading CDI service (user interface, harvesting via GeoNetwork, CDI interoperability options following SeaDataNet D8.7) By Dick M.A. Schaap.
Oracle8 JDBC Drivers Section 2. Common Features of Oracle JDBC Drivers The server-side and client-side Oracle JDBC drivers provide the same basic functionality.
OBSERVATIONS & PRÉVISIONS CÔTIÈRES 3 rd SeaDataNet training course – Ostende – June 2008 NEMO reformatting tool v1 M. Fichaut.
7 th TTG meeting – Trieste – 3-4 March, 2015 SeaDataNet tools, new developments IFREMER : M. Fichaut, A. Briand, M. Larour, T. Loubrieu, V. Tosello ALTRAN.
Training course – Ostende – 2-6 July 2012 Introduction to the 1 st training session of SeaDataNet 2 M. Fichaut, IFREMER, France.
Common Data Index CDI V1 How to proceed By Dick M.A. Schaap – technical coordinator Madrid, March 09.
Designing and Developing WS B. Ramamurthy. Plans We will examine the resources available for development of JAX-WS based web services. We need an IDE,
1 Working with MS SQL Server Textbook Chapter 14.
MAY SEA-SEARCH MEETING CYPRUS METADATA and XML in compliance with ISO Michèle FICHAUT, IFREMER/SISMER Gilbert MAUDIRE, IFREMER/ISI Mickaël.
NERC DataGrid NERC DataGrid Vocabulary Server Use Cases Vocabulary Workshop, RAL, February 25, 2009.
Database Design and Management CPTG /23/2015Chapter 12 of 38 Functions of a Database Store data Store data School: student records, class schedules,
TTG, March 2014, Barcelona WP3: Capacity building and training.
DT228/3 Web Development Databases. Querying a database: Partial info Search engines, on-line catalogues often need to allow user to search a database.
OBSERVATIONS & PRÉVISIONS CÔTIÈRES SeaDataNet annual meeting, Madrid, March 2009 How to prepare data for integration in SeaDataNet.
12/6/2015B.Ramamurthy1 Java Database Connectivity B.Ramamurthy.
OBSERVATIONS & PRÉVISIONS CÔTIÈRES Synthesis of the data management activities (NA) S. Iona (HCMR), R. Lowry (BODC), F. Nast (BSH),
Chemical lot - HOW: Infrastructure set up based on SeaDataNet V1 efficient distributed Marine Data Management Infrastructure; Principle of “ADOPTED AND.
Database Access Using JDBC BCIS 3680 Enterprise Programming.
JDBC CS 260 Database Systems. Overview  Introduction  JDBC driver types  Eclipse project setup  Programming with JDBC  Prepared statements  SQL.
Database Connectivity with ASP.NET. 2 Introduction Web pages commonly used to: –Gather information stored on a Web server database Most server-side scripting.
Product Description. XML file generation Fluidity in data transfer. Just-in-time integration and transformation Based on JAVA technology. Output formats.
Introduction – ORM, Helloworld Application
Training course 2, Ostende, May 2014 IFREMER work-flow for production of CDIs data Michèle Fichaut, IFREMER, SISMER M. Fichaut, IFREMER.
2 nd training course – Ostende – May, 2014 What’s new in NEMO 1.5?
Metadata generation, control and updating Peter Thijsse - MARIS.
3rd Training Workshop June 2008, Ostende Management of CSR Anne Che-Bohnenstengel, BSH  Metadata Formats  Defined Vocabularies  Content Management.
Metadata V1 By Dick M.A. Schaap – technical coordinator Oostende, June 08.
16 Copyright © 2004, Oracle. All rights reserved. Testing the Migrated Oracle Database.
9 Copyright © 2004, Oracle. All rights reserved. Getting Started with Oracle Migration Workbench.
Validation of Metadata XML files SeaDataNet Training, June 2008 Presented by with contributions from Karen Vickers (BODC) Presented by Michèle Fichaut.
CDI Data Discovery and Access Service Dick Schaap (MARIS) – SeaDataNet Technical Coordinator RDA – Paris - Sept 2015.
MIKADO – Generation of ISO – SeaDataNet metadata files
SeaDataNet tools NEMO, OCTOPUS, MIKADO
Introduction to the 1st training session of SeaDataNet 2
NEMO – Reformating tool
GML in CDI and CSR ISO using Ends&Bends
Practical work on NEMO Converting files
SeaDataNet tools NEMO, MIKADO, VALIDATOR
W04 Connecting 3rd Party Application to ODBC
JDBC Database Management Database connectivity
OCTOPUS – SeaDataNet Format conversion tool
MIKADO: Generation of CDI ISO19139 XML files
Vanessa Tosello (IFREMER), Flavian Gheorghe (MARIS)
Tools for generation of SDN NetCDF (CFPOINT) files
Hovedside.
Java Database Connectivity
Practical work on NetCDF - CFPOINT
Ch 1 .Installing and configuring SQL Server 2005
Presentation transcript:

Pan-European infrastructure for Ocean & Marine Data management An EU Integrated research Infrastructure Initiative (I3) How to implement CDI ? M. Fichaut, V. Tosello Training course - June 2007, Oostende, Belgium

09/06/2016 How to proceed with the files for training In the shared directory : With 2 files  CDI_implementation.ppt : this presentation  training2_programme.doc : programme sent by And 5 directories :  CDI documentation Detailed documentation on CDI and mapping  Example database 3 directories for ACCESS, MySQL and EXCEL database  Exercises  Mikado Mikado software and configuration files  Solutions Solution of the exercises, empty now, will be filled during the training after each exercises session Now : Copy the common directory on your computer

09/06/2016 Example database (1) 10 tables describing : the stations of datasets collected during cruises  5 cruises on 2 ships, 10 datasets, 1399 stations  the datasets are either CTD or Bottle stations (mikado_dataset.database_id)  Measured parameters are linked to the datasets (mikado_dataset_parameter)  Mapping with common vocabularies is made through mapping tables (mikado_map_…) Document : \example_database\example_database_description.rtf

09/06/2016 Example database (1) One database in several environments On Microsoft ACCESS  \access\cdi_training_course_2.mdb On MySQL  Name of the database : mikado, user : mikado, password : mikado On EXCEL  \excel\ cdi_training_course_2.xls

09/06/2016 First set of Exercises Manipulate the example database in different environments  Exercise 1 : MySQL database  Exercise 2 : ACCESS database  Exercise 3 : Excel file

09/06/2016 CDI implementation progress USER LOCAL DATABASE ACCESS MYSQL EXCEL EXCEL FILES STATION METADATA (CTDs, Bottles, Current meters, …)

09/06/2016 Generating the CDI - First STEP MAP YOUR DATABASE to THE CDI FIELDS

09/06/2016 Database mapping to XML schema (1) Using the documents :  \ CDI documentation\ CDI_XML_V0_documentation_3_00_June2007.doc: Metadata Format and full description of XML schema version 2.04 – as prepared in Sea-Search  \CDI documentation\ CDI_V1_04_mapping.xls : Excel file describing the mapping between the CDI fields, ISO and the local database  \example_database\example_database_description.rtf : Description of the tables of the example database

09/06/2016 On the right hand side : local database reference  Table_name.field_name Database mapping to XML schema (2) On the left hand side : CDI reference  For each : XML tree (XML tags, with ISO number)

09/06/2016 Database mapping to XML schema (3) Mandatory CDI fields in bold characters Example of mapping

09/06/2016 Second set of Exercises Map the local database to the CDI fields  Exercise 4 : Find all CDI fields mapping with MIKADO_CRUISE table  Exercise 5 : Find the mapping for the CDI field Data Coordinate system and Sampling Interval  Exercise 6 : Full mapping  Look at the final mapping file. Questions?

09/06/2016 CDI implementation progress ISO XML SCHEMA defined for the CDI by SDN – TTT USER LOCAL DATABASE ORACLE MSSERVER MYSQL … EXCEL FILES STATION METADATA (CTDs, Bottles, Current meters, …) MAPPING Common vocabularies MAPPING

09/06/2016 Principles of the CDI ISO XML SCHEMA defined for the CDI by SDN – TTT USER LOCAL DATABASE ORACLE MSSERVER MYSQL … EXCEL FILES STATION METADATA (CTDs, Bottles, Current meters, …) MAPPING Central CDI Common vocabularies MAPPING TOOLS Mikado Others Configuration Files Compliant to XML CDI files

09/06/2016 Configure Mikado - Second STEP MAP YOUR DATABASE to THE CDI FIELDS MIKADO CONFIGURATION

09/06/2016 MIKADO : Reminder MIKADO has been developed by IFREMER in the framework of the SEA-SEARCH project. MIKADO can be used to generate EDMED, CSR and CDI XML files. MIKADO can be used into 2 different ways :  One manual way, to input manually information for EDMED, CSR and CDI fields in order to generate XML files.  One automatic way, to generate these descriptions automatically if information is catalogued in a relational database.

09/06/2016 MIKADO principle MIKADO Java code JDBC Java DataBase Connectivity JVM – Java Virtual Machine Native Drivers MYSQL ORACLE POSTGRES SQLServer Bridge Drivers using Microsoft ODBC ( ACCESS, EXCEL, SQL SERVER) DATABASE Configuration Files (*.properties) Download drivers from web sites if not provided with Mikado

09/06/2016 List of drivers provided with Mikado ODBC Bridge (from Java JDK 1.5)  MS Access 97, 2000, 2003  MS Excel JTDS 1.1 (Open Source licence)  Sybase 10, 11, 12, 15  SQL Server MySQL (GPL licence)  MySQL 4.1, 5.x Oracle 14 (Oracle Technology Network Development and Distribution License)  Oracle 8.1.7, 9i, 10i (with restrictions) PostgreSQL (BSD licence)  PostgreSQL MS SQL server 2005 driver (Microsoft download)  SQL Server 2000 with Service Pack 1 or higher Please note that Mikado source level is JDK 1.5

09/06/2016 How to find the appropriate JDBC driver? Native drivers must be downloaded from the appropriate vendors websites (i.e Oracle, Sybase, MySQL, PostGres, …) It must fit with the database and the JDBC versions. This link may help you to find out the native drivers you need : For Oracle RDBMS, a native driver may be found on For Microsoft SQL server, a native driver may be found on Microsoft MSDN Bridge drivers (using Microsoft-ODBC Open DataBase Connectivity) are bundled with the Java 2 SDK. Drivers have then to be installed following the given recommendations The corresponding.jar files must be copied in the \mikado\dist directory

09/06/2016 MIKADO configuration files See Mikado user manual  \mikado\sdn_Mikado_Manual_V0.1.doc Mikado needs 2 configuration files in the \mikado\conf directory  files.properties file which contains all the information about the name and the location of the files used by the software  Cdi.properties file which contains: Database connection parameters Queries to retrieve data from the database Mapping between the queries results (SQL variables) and the CDI fields

09/06/2016 Mikado files.properties file All the information about the name and the location of the files used by the software  Name of the files containing the list of values for CDI [and EDMED and CSR] : Parameters codes, platforms codes, … ############## # CDI ############## #cdiPartnerCodes cdiPartnerCodes.file =./conf/cdi_partner_codes.csv #cdiMeasurementAreaTypeCodes cdiMeasurementAreaTypeCodes.file =./conf/cdi_measurement_codes.csv  Name of XML schemas used for CDI [and EDMED and CSR ] #xsd xsd.cdi =./conf/CDI_V1_04.xsd xsd.cdi_multirecords =./conf/CDI_V2_01_multirecords.xsd  Name of the files used for CDI XML automatic generation [and EDMED and CSR ] #mapping.cdi =./conf/cdi_training2_access.properties #mapping.cdi =./conf/cdi_training2_mysql.properties mapping.cdi =./conf/cdi_training2_excel.properties

09/06/2016 Mikado cdi.properties file 3 parts in the file  Database connection parameters Depending on the DATABASE : ACCESS, MySQL, ORACLE …  Queries to extract data from the database To be written from the mapping  Mapping between the queries results (SQL variables) and the CDI fields Must not be modified!!!

09/06/2016 cdi.properties file : database connection (1) DATABASE ACCESS JDBC (Java Data Base Connectivity) connection parameters ############################### JDBC parameters for querying database ############################### bdd.query.timeout = database connection time out bdd.className= driver Java Class Name (the *.jar file which implement this Class Name must exist in the mikado\conf\dist directory) bdd.connectURL = connect string to the database bdd.user.name = user name bdd.user.password = user password

09/06/2016 cdi.properties file : database connection (2) Examples of ODBC bridge drivers  ACCESS database bdd.className = sun.jdbc.odbc.JdbcOdbcDriver bdd.connectURL =jdbc:odbc:Driver={Microsoft Access Driver (*.mdb)};DBQ=N://example_database/access/cdi_training_course_2.mdb bdd.user.name = bdd.user.password =  EXCEL file bdd.className = sun.jdbc.odbc.JdbcOdbcDriver bdd.connectURL =jdbc:odbc:Driver={Microsoft Excel Driver (*.xls)};DBQ=X:/example_database/excel/cdi_training_course_2.xls bdd.user.name = bdd.user.password =  MS SERVEUR Not recommended, use native driver

09/06/2016 cdi.properties file : database connection (3) Examples of Native drivers  MySQL database bdd.className = com.mysql.jdbc.Driver bdd.connectURL = jdbc:mysql://localhost/mikado bdd.user.name = mikado bdd.user.password = mikado  ORACLE bdd.className = oracle.jdbc.OracleDriver bdd.connectURL = User and password must be provided Example : MS SERVER bdd.className = com.microsoft. jdbc.sqlserver. SQLServerDriver bdd.connectURL = jdbc:sqlserver://serverName;instanceName:portNumber;property=value[;property=val ue] User and password must be provided Example : jdbc:sqlserveur:// integratedSecurity=false;

09/06/2016 cdi.properties file : mapping Mapping of the query results to the CDI fields  Mapping table : SQL variables = CDI fields var1 = southLatitude var2 = westLongitude var3 = northLatitude ….. var42 = instrumentOrGearType var43 = typeOfPlatform var50 = parametersMeasured.value Must not be changed

09/06/2016 cdi.properties file : SQL queries (1) Main query  It is the query which identifies all CDI entries that must be exported. This request must return only one column which is the identifier of each entry and that will be used for sub-queries.  SQL syntax must be adapted to your local database ############################ # Main query (station identifier list) ############################ query.=select mikado_station.station_id from mikado_station

09/06/2016 cdi.properties file : SQL queries (2) Sub-queries  For each row of the main query, it is possible to define single or multi sub-queries. Single sub-queries : return one row for each row of the main query (ex: dataset_id, cruise_name) Multi sub-queries : return several rows for each row of the main query (ex: parameters).  The links between the fields of the database and the variables of the mapping (var1 to varN) table have to be defined in theses sub-queries as synonyms of the selected columns

09/06/2016 cdi.properties file : SQL queries (3) Single Sub-queries : return one row  The number of single sub-queries must be defined queries.single.number=5  The keyword for single sub-queries is : queries.single.i= where i varies from 1 to queries.single.number  Example : queries.single.1 = select tabA.colX var1 from tabA where tableA.colY= :$ var1 = synonym for the column name from the mapping table :$ = the identifier of the row returned by the main query

09/06/2016 cdi.properties file : SQL queries (4) Multiple Sub-queries : return several rows  All the names of the multi sub-queries are defined and must not be changed For CDI one multi sub-query is defined  The keyword is : queries.multi.parametersMeasured =  Example : queries.multi.parametersMeasured =select tabA.colX var50 from tabA, tabB where tabB.colX = :$ and tabB.colY = tabA.colZ var50 = synonym for the column name from the mapping table :$ = the identifier of the row returned by the main query

09/06/2016 Third set of Exercises Write the cdi.properties files for ACCESS or MY SQL or EXCEL files In the exercises only the stations of the Cruise « CITHER2 LEG 1 » will selected to have a smaller number of stations  Exercise 7 : Look at the main query. Questions?  Exercise 8 : Fulfil the missing information in query.single.1. Query on MIKADO_DATASET table  Exercise 9 : Fulfil the missing information in query.single.2. Query on MIKADO_STATION table  Exercise 10 : Write the query.single.4 to find the datum coordinate system  Exercise 11 : Have a look at the final property file, questions?

09/06/2016 ISO date format Date format must have the following syntax  YYYY-MM-DD  YYYY-MM-DDTHH24:MI  YYYY-MM-DDTHH24:MI:SS

09/06/2016 CDI implementation progress ISO XML SCHEMA defined for the CDI by SDN – TTT USER LOCAL DATABASE ORACLE MSSERVER MYSQL … EXCEL FILES STATION METADATA (CTDs, Bottles, Current meters, …) MAPPING Common vocabularies MAPPING TOOLS Mikado Others Configuration Files

09/06/2016 XML files generation - Third STEP MAP YOUR DATABASE to THE CDI FIELDS MIKADO CONFIGURATION Generate the XML files

09/06/2016 XML CDI files generation Use the Mikado software to create the XML CDI files  Make sure that you have the right « properties » files in the \mikado\conf directory files before running the software  Change the connection to the database in the CDI.properties file, with the path to your local database  Run Mikado  Import the common vocabularies lists for CDI using Mikado : Menu configuration, library, CDI  Create and output directory for your XML files

09/06/2016 XML files check - Fourth STEP MAP YOUR DATABASE to THE CDI FIELDS MIKADO CONFIGURATION Generate the XML files Check the XML files

09/06/2016 CDI implementation progress ISO XML SCHEMA defined for the CDI by SDN – TTT USER LOCAL DATABASE ORACLE MSSERVER MYSQL … EXCEL FILES STATION METADATA (CTDs, Bottles, Current meters, …) MAPPING Common vocabularies MAPPING TOOLS Mikado Others Configuration Files Compliant to XML CDI files

09/06/2016 Send XML files - Fifth STEP MAP YOUR DATABASE to THE CDI FIELDS MIKADO CONFIGURATION Generate the XML files Check the XML files Send the XML files to central CDI

09/06/2016 Fourth set of Exercises Generate the XML CDI files and check them  Exercise 12 : Generate the XML files with Mikado  Exercise 13 : Check the XML files