{"id":9275,"date":"2014-09-01T05:04:31","date_gmt":"2014-08-31T19:04:31","guid":{"rendered":"http:\/\/www.rjmprogramming.com.au\/wordpress\/?p=9275"},"modified":"2019-10-04T20:11:00","modified_gmt":"2019-10-04T10:11:00","slug":"libreoffice-jdbc-mysql-primer-tutorial","status":"publish","type":"post","link":"https:\/\/www.rjmprogramming.com.au\/ITblog\/libreoffice-jdbc-mysql-primer-tutorial\/","title":{"rendered":"LibreOffice JDBC MySql Primer Tutorial"},"content":{"rendered":"<div style=\"width: 230px\" class=\"wp-caption alignnone\"><a target=_blank href=\"http:\/\/www.rjmprogramming.com.au\/Mac\/LibreOffice\/Database\/JDBC\/\"><img decoding=\"async\" style=\"float:left; border: 15px solid pink;\" alt=\"LibreOffice JDBC MySql Primer Tutorial\" src=\"http:\/\/www.rjmprogramming.com.au\/Mac\/LibreOffice\/Database\/JDBC\/Libre_JDBC_MySql_Primer.jpg\" title=\"LibreOffice JDBC MySql Primer Tutorial\"  \/><\/a><p class=\"wp-caption-text\">LibreOffice JDBC MySql Primer Tutorial<\/p><\/div>\n<p>Over the last couple of days we&#8217;ve mentioned the big link between <a target=_blank title='LibreOffice from The Document Foundation' href='http:\/\/www.libreoffice.org'>LibreOffice<\/a> and <a target=_blank title='OpenOffice' href='http:\/\/www.OpenOffice.org'>OpenOffice<\/a>, and this link is very close when it comes to its database functionality, because the format of the database is shared between the two suites of programs.   It is the .odb extension and we talked about it with previous relevant <a target=_blank href='#omimpt' title='OpenOffice MySql Import Data Migration Primer Tutorial'>OpenOffice MySql Import Data Migration Primer Tutorial<\/a> as shown way below.<\/p>\n<p>Yesterday, with <a target=_blank href='#ldpt' title='LibreOffice Database Primer Tutorial'>LibreOffice Database Primer Tutorial<\/a> as shown below, we talked for a first time about LibreOffice databases, but in this tutorial we opened an existing LibreOffice (= OpenOffice) .odb database file, whereas, today, we delve into interfaces to other proprietary existant database formats, specifically, today, using a <a target=_blank title='Java Database Connectivity information from Wikipedia ... thanks' href='http:\/\/en.wikipedia.org\/wiki\/Java_Database_Connectivity'>JDBC<\/a> database connection to a <a target=_blank title='MySql database information from Wikipedia ... thanks' href='http:\/\/en.wikipedia.org\/wiki\/MySQL'>MySql<\/a> database, and for today we use an existant local <a target=_blank title='MAMP information from Wikipedia ... thanks' href='http:\/\/en.wikipedia.org\/wiki\/MAMP'>MAMP<\/a> MySql database as our database source.  JDBC is a Java Database Connectivity protocol.   Also available within LibreOffice are the means to connect to database sources via <a target=_blank title='Open Database Connectivity information from Wikipedia ... thanks' href='http:\/\/en.wikipedia.org\/wiki\/Open_Database_Connectivity'>ODBC<\/a> which is an Open Database Connectivity protocol.<\/p>\n<p>So, <a target=_blank title='Enjoy the tutorial' href=\"http:\/\/www.rjmprogramming.com.au\/Mac\/LibreOffice\/Database\/JDBC\/\">today<\/a>, here is a tutorial that shows you some database functionality of a great suite of office automation programs called LibreOffice, by The Document Foundation.  LibreOffice has functionality like the <a target=_blank title='Microsoft Office' href='http:\/\/office.microsoft.com\/'>Microsoft Office<\/a> suite of programs, bringing the user a lot of the feel of those well loved concepts to your document creation work, and integrated into the one place.  Today we do a bit of work that Microsoft Access database might do for you, but in LibreOffice the database functionality uses a JDBC database connection to create a LibreOffice .odf scenario to read and\/or write to an existant MySql database.<\/p>\n<p>During the course of the tutorial we:<\/p>\n<ul>\n<li><a target=_blank title='JDBC install for Mac OS X LibreOffice' href='http:\/\/www.rjmprogramming.com.au\/Mac\/LibreOffice\/Database\/JDBC\/Libre_JDBC_MySql_Primer-1of.jpg'>Install<\/a> JDBC to Mac OS X so that a mysql-connector-java-5.1.25.jar file is added to the Java Class Path (via a <a target=_blank title='Command + comma launch of LibreOffice' href='http:\/\/www.rjmprogramming.com.au\/Mac\/LibreOffice\/Database\/JDBC\/Libre_JDBC_MySql_Primer-10of.jpg'>Command + comma<\/a> launch of LibreOffice, after install &#8211;&gt;) &#8230; advice via Dan Lewis&#8217;s great <a target=_blank title='Great advice' href='http:\/\/nabble.documentfoundation.org\/JDBC-driver-for-Mac-OS-td4055376.html'>advice<\/a> and more good advice <a target=_blank title='Good advice' href='http:\/\/www.techrepublic.com\/blog\/diy-it-guy\/diy-connect-libreoffice-base-to-a-mysql-database\/'>here<\/a> and the download resource <a target=_blank title='Download resource' href='http:\/\/ftp.ntu.edu.tw\/MySQL\/Downloads\/Connector-J\/'>here<\/a> &#8230; thanks Open Source world!<\/li>\n<li><a target=_blank title='Reopen LibreOffice' href='http:\/\/www.rjmprogramming.com.au\/Mac\/LibreOffice\/Database\/JDBC\/Libre_JDBC_MySql_Primer-8of.jpg'>Reopen<\/a> LibreOffice via File-&gt;New &#8230; Database &#8230; Connect to an existing Database-&gt;JDBC &#8230; this way for our MAMP MySql <a target=_blank title='Reopen LibreOffice' href='http:\/\/www.rjmprogramming.com.au\/Mac\/LibreOffice\/Database\/JDBC\/Libre_JDBC_MySql_Primer-18of.jpg'>connection<\/a><\/li>\n<li>Create a new Invoice table using the <a target=_blank title='LibreOffice JDBC New Table Wizard' href='http:\/\/www.rjmprogramming.com.au\/Mac\/LibreOffice\/Database\/JDBC\/Libre_JDBC_MySql_Primer-29of.jpg'>New Table Wizard<\/a> that calls on the Microsoft Access <a target=_blank title='Microsoft Access Primer Tutorial' href='http:\/\/www.rjmprogramming.com.au\/wordpress\/?p=1365'>ideas<\/a> you can see here<\/li>\n<li><a target=_blank title='Reopen LibreOffice' href='http:\/\/www.rjmprogramming.com.au\/Mac\/LibreOffice\/Database\/JDBC\/Libre_JDBC_MySql_Primer-36of.jpg'>Sanity check<\/a> the arrangements by showing the same table, just created, via MAMP&#8217;s phpMyAdmin and MAMP in a Safari browser on a Mac laptop &#8230; via, typically, the address bar URL http:\/\/localhost:8888\/MAMP\/ webpage&#8217;s phpMyAdmin tab<\/li>\n<li>Use the (basic default) LibreOffice database <a target=_blank title='Reopen LibreOffice' href='http:\/\/www.rjmprogramming.com.au\/Mac\/LibreOffice\/Database\/JDBC\/Libre_JDBC_MySql_Primer-37of.jpg'>Form functionality (Wizard)<\/a> to be able to insert two records into the Invoice table we create on this MySql database<\/li>\n<li><a target=_blank title='Reopen LibreOffice' href='http:\/\/www.rjmprogramming.com.au\/Mac\/LibreOffice\/Database\/JDBC\/Libre_JDBC_MySql_Primer-47of.jpg'>Sanity check<\/a> the arrangements by showing the same table, with two records, via phpMyAdmin and MAMP in a Safari browser on a Mac laptop<\/li>\n<\/ul>\n<p>As you would imagine, LibreOffice has many parts to it, and we will explore some over time, but, as always &#8230;<\/p>\n<ul>\n<li>Feel free to explore yourself<\/li>\n<li>Visit search engines with more specific queries about specific topics, always add &#8220;LibreOffice&#8221; in there somewhere, and arrive at specialized forums and\/or blogs and\/or official sites<\/li>\n<li>Think of this tutorial as a way to learn a lot about <a target=_blank title='Access Primer Tutorial' href='http:\/\/www.rjmprogramming.com.au\/wordpress\/?p=1365'>Microsoft Access<\/a>, as well.<\/li>\n<\/ul>\n<p>Link to LibreOffice information &#8230; <a target=_blank href='http:\/\/en.wikipedia.org\/wiki\/LibreOffice' title='LibreOffice information via Wikipedia'>from Wikipedia<\/a>.<br \/>\nLink to LibreOffice &#8220;spiritual home&#8221; &#8230; <a target=_blank title='LibreOffice from The Document Foundation' href='http:\/\/www.libreoffice.org'>LibreOffice<\/a> via the Document Foundation.\n<\/p>\n<hr \/>\n<p id='ldpt'>Previous relevant <a target=_blank href='http:\/\/www.rjmprogramming.com.au\/wordpress\/?p=9260' title='LibreOffice Database Primer Tutorial'>LibreOffice Database Primer Tutorial<\/a> is shown below.<\/p>\n<div style=\"width: 230px\" class=\"wp-caption alignnone\"><a target=_blank href=\"http:\/\/www.rjmprogramming.com.au\/Mac\/LibreOffice\/Database\/\"><img decoding=\"async\" style=\"float:left; border: 15px solid pink;\" alt=\"LibreOffice Database Primer Tutorial\" src=\"http:\/\/www.rjmprogramming.com.au\/Mac\/LibreOffice\/Database\/Libre_Database_Primer-70of.jpg\" title=\"LibreOffice Database Primer Tutorial\"  \/><\/a><p class=\"wp-caption-text\">LibreOffice Database Primer Tutorial<\/p><\/div>\n<p>Over the last couple of days we&#8217;ve mentioned the big link between <a target=_blank title='LibreOffice from The Document Foundation' href='http:\/\/www.libreoffice.org'>LibreOffice<\/a> and <a target=_blank title='OpenOffice' href='http:\/\/www.OpenOffice.org'>OpenOffice<\/a>, and this link is very close when it comes to its database functionality, because the format of the database is shared between the two suites of programs.   It is the .odb extension and we talked about it with previous relevant <a target=_blank href='#omimpt' title='OpenOffice MySql Import Data Migration Primer Tutorial'>OpenOffice MySql Import Data Migration Primer Tutorial<\/a> as shown below.<\/p>\n<p>Here is a tutorial that shows you some database functionality of a great suite of office automation programs called LibreOffice, by The Document Foundation.  LibreOffice has functionality like the <a target=_blank title='Microsoft Office' href='http:\/\/office.microsoft.com\/'>Microsoft Office<\/a> suite of programs, bringing the user a lot of the feel of those well loved concepts to your document creation work, and integrated into the one place.  Today we do a bit of work that Microsoft Access database might do for you, but in LibreOffice the database has an .odb extension with a similar interface to the database to that of Microsoft Access.<\/p>\n<p>As you would imagine, such a project has many parts to it, and we will explore some over time, but, as always &#8230;<\/p>\n<ul>\n<li>Feel free to explore yourself<\/li>\n<li>Visit search engines with more specific queries about specific topics, always add &#8220;LibreOffice&#8221; in there somewhere, and arrive at specialized forums and\/or blogs and\/or official sites<\/li>\n<li>Think of this tutorial as a way to learn a lot about <a target=_blank title='Access Primer Tutorial' href='http:\/\/www.rjmprogramming.com.au\/wordpress\/?p=1365'>Microsoft Access<\/a>, as well.<\/li>\n<\/ul>\n<p><a target=_blank title='Enjoy the tutorial' href=\"http:\/\/www.rjmprogramming.com.au\/Mac\/LibreOffice\/Database\/\">Today<\/a>, we use some previously populated MySql database tables from the <a target=_blank title='MySql XML Import Primer Tutorial' href='http:\/\/www.rjmprogramming.com.au\/wordpress\/?p=1736'>MySql XML Import Primer Tutorial<\/a>  and migrate the data from these tables into a LibreOffice database (= OpenOffice database), and along the way create PDF outputs of some of the processing steps for your edification.<\/p>\n<p>Link to output PDF data file of form data of tutorial <a target=_blank href=\"http:\/\/www.rjmprogramming.com.au\/Mac\/LibreOffice\/Database\/country_state.pdf\" title='country_state.pdf'>country_state.pdf<\/a><br \/>\nLink to output PDF data file of report of tutorial <a target=_blank href=\"http:\/\/www.rjmprogramming.com.au\/Mac\/LibreOffice\/Database\/Country and State Report.pdf\" title='Country and State Report.pdf'>Country and State Report.pdf<\/a><\/p>\n<p>Link to LibreOffice information &#8230; <a target=_blank href='http:\/\/en.wikipedia.org\/wiki\/LibreOffice' title='LibreOffice information via Wikipedia'>from Wikipedia<\/a>.<br \/>\nLink to LibreOffice &#8220;spiritual home&#8221; &#8230; <a target=_blank title='LibreOffice from The Document Foundation' href='http:\/\/www.libreoffice.org'>LibreOffice<\/a> via the Document Foundation.\n<\/p>\n<hr \/>\n<p id='omimpt'>Previous relevant <a target=_blank href='http:\/\/www.rjmprogramming.com.au\/wordpress\/?p=4430' title='OpenOffice MySql Import Data Migration Primer Tutorial'>OpenOffice MySql Import Data Migration Primer Tutorial<\/a> is shown below.<\/p>\n<div style=\"width: 230px\" class=\"wp-caption alignnone\"><a target=_blank href=\"http:\/\/www.rjmprogramming.com.au\/Mac\/OpenOffice\/Access\/\"><img decoding=\"async\" style=\"float:left; border: 15px solid pink;\" alt=\"OpenOffice MySql Import Data Migration Primer Tutorial\" src=\"http:\/\/www.rjmprogramming.com.au\/Mac\/OpenOffice\/Access\/OpenOffice_Access_Primer-114of.jpg\" title=\"OpenOffice MySql Import Data Migration Primer Tutorial\"  \/><\/a><p class=\"wp-caption-text\">OpenOffice MySql Import Data Migration Primer Tutorial<\/p><\/div>\n<p>Here is a tutorial that shows you some database functionality of a great suite of office automation programs called OpenOffice, by Apache Software Foundation.  OpenOffice has functionality like the Microsoft Office suite of programs, bringing the user a lot of the feel of those well loved concepts to your document creation work, and integrated into the one place.  Today we do a bit of work that Microsoft Access database might do for you, but in OpenOffice the database has an .odb extension with a similar interface to the database to that of Microsoft Access.<\/p>\n<blockquote><p>Apache OpenOffice (AOO) is an open-source office productivity software suite. It descends from OpenOffice.org and IBM Lotus Symphony.[5]<\/p>\n<p>Apache OpenOffice contains a word processor (Writer), a spreadsheet (Calc), a presentation application (Impress), a drawing application (Draw), a formula editor (Math), and a database management application (Base).[6]<\/p>\n<p>Apache OpenOffice&#8217;s default file format is the OpenDocument Format (ODF), an ISO\/IEC standard, which originated with OpenOffice.org. It can also read a wide variety of other file formats, with particular attention to those from Microsoft Office.<\/p>\n<p>Apache OpenOffice is developed for Linux, OS X and Windows, with ports to other operating systems. It is distributed under the Apache License.[4] The first release was version 3.4.0, on 8 May 2012.[1]<\/p><\/blockquote>\n<p>As you would imagine, such a project has many parts to it, and we will explore some over time, but, as always &#8230;<\/p>\n<ul>\n<li>Feel free to explore yourself<\/li>\n<li>Visit search engines with more specific queries about specific topics, always add &#8220;OpenOffice&#8221; in there somewhere, and arrive at specialized forums and\/or blogs and\/or official sites<\/li>\n<li>Make sure you reset your body&#8217;s clocks &#8230; yes, clocks &#8230; to meet the day with the proper start involving getting out in the day and seeing the sunshine &#8230; if you are not in the dark in winter, that is &#8230; see <a target=_blank title='resetting your body clocks' href='http:\/\/www.shape.com\/lifestyle\/mind-and-body\/reset-your-body-clock'>here<\/a> and leave time aside to eat well &#8230; <a target=_blank title='Benefits of Mackerel' href='https:\/\/www.jenreviews.com\/mackerel\/'>Mackerel, anyone?<\/a><\/li>\n<li>Think of this tutorial as a way to learn a lot about <a target=_blank title='Access Primer Tutorial' href='http:\/\/www.rjmprogramming.com.au\/wordpress\/?p=1365'>Microsoft Access<\/a>, as well.<\/li>\n<\/ul>\n<p><a target=_blank title='Enjoy the tutorial' href=\"http:\/\/www.rjmprogramming.com.au\/Mac\/OpenOffice\/Access\/\">Today<\/a>, we use some previously populated MySql database tables from the <a target=_blank title='MySql XML Import Primer Tutorial' href='http:\/\/www.rjmprogramming.com.au\/wordpress\/?p=1736'>MySql XML Import Primer Tutorial<\/a>  and migrate the data from these tables into an OpenOffice database, and then we will export a report of that database to PDF and display on a local <a target=_blank title='PHP and MySql via MAMP Primer Tutorial' href='http:\/\/www.rjmprogramming.com.au\/wordpress\/?p=933'>MAMP<\/a> webserver, finishing off with an emailed report as well (we are on a Mac laptop &#8230; we have shrunk to a <a target=_blank title='small bee' href='http:\/\/standingoutinmyfield.wordpress.com\/2013\/09\/09\/the-largest-and-the-smallest-bee-in-the-world\/'>perdita minima<\/a> that you get near the top right of the keyboard&#8217;s &#8220;Shift&#8221; key (why so much there?) &#8230; <font size=\"1\">hello honey<\/font>).   Who could call this website <a target=_blank title='lame' href='http:\/\/lame.sourceforge.net\/'><strike>lame<\/strike><\/a> <a style=\"font-size:8px;\" target=_blank title='lame' href='http:\/\/oxforddictionaries.com\/definition\/english\/lame'><strike>lame<\/strike><\/a> <a style=\"font-size:6px;\" target=_blank title='lame' href='http:\/\/www.urbandictionary.com\/define.php?term=lame'>lame<\/a>?!!<\/p>\n<p>Link to some OpenOffice Macro programming source code data file <a target=_blank href=\"http:\/\/www.rjmprogramming.com.au\/Mac\/OpenOffice\/Access\/Main.xba_GETME\" title='Main.xba'>Main.xba<\/a> constructed to aid with the import of data using an OpenOffice Form&#8217;s database connection with some embedded SQL statements to insert records &#8230; aided and abetted by the initial MySql table export to SQL by the brilliant <a target=_blank title='phpMyAdmin interface to MySql and PHP Primer Tutorial' href='http:\/\/www.rjmprogramming.com.au\/wordpress\/?p=492'>phpMyAdmin<\/a> to <a target=_blank href=\"http:\/\/www.rjmprogramming.com.au\/Mac\/OpenOffice\/Access\/country_state.sql_GETME\" title='country_state.sql'>country_state.sql<\/a><\/p>\n<p>Link to output PDF data file <a target=_blank href=\"http:\/\/www.rjmprogramming.com.au\/Mac\/OpenOffice\/Access\/country_state.pdf\" title='country_state.pdf'>country_state.pdf<\/a><\/p>\n<p>Link to OpenOffice information &#8230; <a target=_blank href='http:\/\/en.wikipedia.org\/wiki\/Apache_OpenOffice' title='OpenOffice information via Wikipedia'>from Wikipedia<\/a> as used by quote above.<br \/>\nLink to OpenOffice &#8220;spiritual home&#8221; &#8230; <a target=_blank href='http:\/\/www.openoffice.org\/' title='The Free and Open Productivity Suite'>via Apache Software Foundation<\/a>.\n<\/p>\n<p>If this was interesting you may be interested in <a title='Click here to see topics in which you might be interested' href='#d4430' onclick='var dv=document.getElementById(\"d4430\"); dv.innerHTML = \"&lt;iframe width=670 height=600 src=\" + \"http:\/\/www.rjmprogramming.com.au\/wordpress\/?s=Microsoft+Office#content\" + \"&gt;&lt;\/iframe&gt;\"; dv.style.display = \"block\";'>this<\/a> too.<\/p>\n<div id='d4430' style='display: none; border-left: 2px solid green; border-top: 2px solid green;'><\/div>\n<hr \/>\n<p>If this was interesting you may be interested in <a title='Click here to see topics in which you might be interested' href='#d9260' onclick='var dv=document.getElementById(\"d9260\"); dv.innerHTML = \"&lt;iframe width=670 height=600 src=\" + \"http:\/\/www.rjmprogramming.com.au\/wordpress\/?tag=database\" + \"&gt;&lt;\/iframe&gt;\"; dv.style.display = \"block\";'>this<\/a> too.<\/p>\n<div id='d9260' style='display: none; border-left: 2px solid green; border-top: 2px solid green;'><\/div>\n<hr \/>\n<p>If this was interesting you may be interested in <a title='Click here to see topics in which you might be interested' href='#d9275' onclick='var dv=document.getElementById(\"d9275\"); dv.innerHTML = \"&lt;iframe width=670 height=600 src=\" + \"http:\/\/www.rjmprogramming.com.au\/wordpress\/?s=JDBC\" + \"&gt;&lt;\/iframe&gt;\"; dv.style.display = \"block\";'>this<\/a> too.<\/p>\n<div id='d9275' style='display: none; border-left: 2px solid green; border-top: 2px solid green;'><\/div>\n","protected":false},"excerpt":{"rendered":"<p>Over the last couple of days we&#8217;ve mentioned the big link between LibreOffice and OpenOffice, and this link is very close when it comes to its database functionality, because the format of the database is shared between the two suites &hellip; <a href=\"https:\/\/www.rjmprogramming.com.au\/ITblog\/libreoffice-jdbc-mysql-primer-tutorial\/\">Continue reading <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[8,9,12,37],"tags":[292,299,644,656,694,723,744,782,783,827,881,938,1319],"class_list":["post-9275","post","type-post","status-publish","format-standard","hentry","category-data-integration","category-database","category-elearning","category-tutorials","tag-data-integration-2","tag-database-2","tag-java","tag-jdbc","tag-libreoffice","tag-mac","tag-mamp","tag-microsoft","tag-microsoft-access","tag-mysql","tag-openoffice","tag-phpmyadmin","tag-tutorial"],"_links":{"self":[{"href":"https:\/\/www.rjmprogramming.com.au\/ITblog\/wp-json\/wp\/v2\/posts\/9275"}],"collection":[{"href":"https:\/\/www.rjmprogramming.com.au\/ITblog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.rjmprogramming.com.au\/ITblog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.rjmprogramming.com.au\/ITblog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.rjmprogramming.com.au\/ITblog\/wp-json\/wp\/v2\/comments?post=9275"}],"version-history":[{"count":3,"href":"https:\/\/www.rjmprogramming.com.au\/ITblog\/wp-json\/wp\/v2\/posts\/9275\/revisions"}],"predecessor-version":[{"id":46658,"href":"https:\/\/www.rjmprogramming.com.au\/ITblog\/wp-json\/wp\/v2\/posts\/9275\/revisions\/46658"}],"wp:attachment":[{"href":"https:\/\/www.rjmprogramming.com.au\/ITblog\/wp-json\/wp\/v2\/media?parent=9275"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.rjmprogramming.com.au\/ITblog\/wp-json\/wp\/v2\/categories?post=9275"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.rjmprogramming.com.au\/ITblog\/wp-json\/wp\/v2\/tags?post=9275"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}