Upload
louise-simon
View
242
Download
3
Tags:
Embed Size (px)
Citation preview
Frank HilhorstPresident Progressive Consulting Inc.
Open Source Data Sharing
Introducing myself • Started working with PROGRESS version 6
in 1993
• Principle Software architect
• PLATON mortgage loan system
• JAZZ hospitality billing system
• Started Progressive Consulting Inc in 2006
• Ahstanga yoga afficionado
Introducing Progressive Consulting
• Focus on integrating OpenEdge applications with other technologies
• UI integration
• Back end integration
• Motto
• Making the world as open to OpenEdge as OpenEdge is to the world
Published tools
• TurboCgi
• TurboComet
• TurboStomp
• TurboQuery
• Download beta release from
• http://www.progressiveconsultinginc.com/news
Dictionary meaning of data sharing
•The ability to share the same data resource with multiple applications or users
Sharing data between the PROGRESS environment and an Open Source
environment
• Copy data definitions and data
• From PROGRESS to Open Source environment
• From Open Source environment to PROGRESS
• Access and manipulate data definitions and data
• From PROGRESS in Open Source DB
• From Open Source enviroment in Progress DB
Structure of this presentation • Introduction to open source databases and
JDBC
• Project to create a data server for open source database
• Why and how
• Demo data server
• Architecture of data server
• Comparing Progress with other databases
• How to install and use the JDBC data server toolkit
Introduction to open source
databases and JDBC
Dominant open source databases
Database CharactaristicsSample
applicationsMySql •Connectors supported
•JDBC•ODBC•ADO.NET
•Drupal•Wordpress
Apache Derby •Connectors supported•JDBC•ODBC
•ActiveMQ•Apache service mix
PostgressQL •Connectors supported•JDBC•ODBC•ADO
•HoneyBird ERP•LedgerSMB
What is JDBC (Java Database connectivity)?
• OO Interface that supports
• SQL standard (create, update, insert, delete)
• Defines the following JAVA objects
• Statement
• PreparedStatement
• CallableStatement
• Resultset
OpenEdge support for JDBC
• Jars provided
• openedge.jar
• pool.jar
• sqlexp (SQL explorer)
• sqldump
• sqlload
• sqlschema
How to provide JDBC access to a PROGRESS database
• Create a user sysprogress
• Start up database with SQL server enabled
• Option 1: Use 1 broker
• Proserve -H .. -S .. -ServerType both
• Option 2: Use (separate) secondary login broker
• Proserver -H .. -S .. -m3 -ServerType SQL
Testing the JDBC connection with the SQL explorer
•sqlexp -url jdbc:datadirect:openedge://localhost:30201;databaseName=sports -user sysprogress -password sysprogress
•select name, address from PUB.customer
Project to create a data server for
open source database
Altisource Application environment
Progress DB
RabbitMq
Legacy Application
Transfor-mationEngine
MySql DB
Next Generation
Modules
Demo
What we are going to demo •Using the TurboQuery Dictionary
• Create database in mySql
• Copy sports database from PROGRESS to mySql DB
• Add a table and fields
• Copy mySql database back to a PROGRESS database
•Show how to populate a progress dataset from the mySql database
•Make changes to that dataset and commit those changes to the mySql database
•Commit the changes
Architecture of data server
Architecture of data server
MySql DB
Tomcat
Web Service
ABL/OOLayer
ProgressClient
SQLStatement
SQLStatement
JSONDataset
SQL ResultSet
How to get data from the foreign database
•Use TurboQuery dataset generator to get dataset definitions
•Instantiate QueryManager class
•Use QueryManager:GetData to populate dataset
What the code looks like
How to update the foreign database
•Populate the dataset
•Turn on tracking changes
•Make changes
•Commit the changes
What the code looks like
Classes of the ABL/OO layer
QueryManager
JdbcSchemaMapper ProgressSchemaMapper
JdbcToProStmntGeneratorProToJdbcStmntGenerator
•CreateTable•CreateIndex•DumpTableData
•Format•TransformFieldName•TransformTableName
•Format•TransformFieldName•TransformTableName
•getJdbcSchemaAttrName•TransformFieldName•TransformTableName
•InsertInto•DeleteFrom•FormatBufferFieldValue
•JdbcMode •JdbcMode
•JdbcMode •JdbcMode
•GetData•GetDataAndDefs•CommitChanges
•JdbcMode•jdbcSchemaMapper
Comparing Progress with open source databases
High level comparisonProgress database Open Source Databases
Strongly typed database Weakly typed database
• Variable record length• Block based
• Fixed record length (mostly)• Not block based
• Table & field name space rules• Hyphen allowed• Spaces not allowed• 32 character maximum length
• Table & field name space rules• Hyphen not allowed• Spaces allowed• Can be very long
No support for foreign keys constraints
Support for foreign keys constraints
Comparing data typesProgress mySql Apache Derby
Character • char• varchar• text• tinytext
• char• varchar• long varchar
Date Date date
Integer • Smallint• Smallint unsigned• Mediumint• Mediumint unsigned
• smallint• time • integer
Int64 • Int• Int unsigned• bigint• bigint unsigned
• bigint• double• real
DecimaL • float• double• decimal• numeric
• decimal• numeric
Datetime • timestamp• datetime
timestamp
Raw • binary• varbinary
• varchar for bit data• long varchar for bit data
blob • tinyblob• blob• mediumblob• longblob
blob
How to install and use the
JDBC data server toolkit
How to install TurboQuery beta version
•Download TurboQuery.zip from this Url
• http://www.progressiveconsultinginc.com/news.html
•Unzip file to c:\
• Should get the following directory structure
How to install TurboQuery beta version (continued)
•Make sure JAVA version 6 or higher is installed
• JAVA -version
•In C:\TurboQuery\ini\Progress.ini
•Point the DLC variable to your OpenEdge root directory
How to install TurboQuery beta version (continued)
• Using the Icons in the Shortcuts directory
• Start Sports DB database server
• Start Apache Derby server
• Start Jetty Servlet engine
What is next for TurboQuery?
• Batch update for data definitions
• Paged SQL queries
• Extending support for more OpenSource databases
• Externalization of database specific mappings
• SPRING/MAVEN based JDBC driver configuration
Questions?