Base: HSQLDB to Firebird migration for existing databases

Do any tools exist for migrating existing HSQLDB Base apps to Firebird? In the alternative, what are the current best practices for manual conversion?

There is a thread: HSQLDB to be replaced by Firebird. However, it has not been updated for quite a while.

Is there any more recent info answering this question (the thread references in the above comment does not work)? A comprehensive answer would be nice to help migrate some of my HSQLDB ‘split’ databases to Firebird in the not too distant future.

@frofa FYI, the Internet Archive, aka The Wayback Machine, is a really great resource https://web.archive.org/. They have that old thread archived, in case you want to see it https://web.archive.org/web/20160520090247/http://en.libreofficeforum.org:80/node/6062. If you are on Chrome or Firefox browsers, they have browser extensions you can use to both save pages so they won’t be lost forever, and to see archived versions of pages. It’s saved my bacon many times.

@frofa FYI, the Internet Archive, aka The Wayback Machine, is a really great resource https://web.archive.org/. They have that old thread archived, in case you want to see it HSQLDB to be replaced by Firebird | LibreOfficeForum.org. If you are on Chrome or Firefox browsers, they have browser extensions you can use to both save pages so they won’t be lost forever, and to see archived versions of pages. It’s saved my bacon many times.

I’m also wondering what the migration procedure would be for SPLIT HSQLDB databases (which I have been using without any trouble for many years). Is the migration procedure different from EMBEDDED HSQLDB databases?

That I cannot help you with. I believe @Ratslinger uses mostly split databases, as he often posts about the superiority of these. I would imagine his May 10 '18 post below is what he has found in testing the migration of split databases, but you could ask him directly.

See my question/comment above.

Coming back to the original question posed above - are there are any tools or a step-by-step guide on how to migrate HSQLDB databases to Firebird? For example does ‘drag and drop’ of tables in the Base interface work?

UPDATE: Looks like an auto-update mechanism is being trialled on LibreOffice v.6.1 alpha at the moment. Note the problems as described on the Base Bug List.

Don’t believe there has been any progress in months. (See Bug 51780). Saw, in a glancing comment somewhere (may have been on Nabble a month or two ago) that there is no one currently working on it.

My personal testing has show consistent problems importing data with date fields involved. May have a way to go yet.

I believe this is what I was referring to → from Nabble Users post

Doesn’t give one much confidence is getting anything done in Base.

Some significant work was done fixing FIREBIRD: Add those field types that are not available with FB while they are available with Hsqldb

@mariosv Thank you for post. It seems I hadn’t tested it in some time & now importing data with dates appears to work correctly. Had tried it so many times & using different methods before that I had just given up on it. However, have just discovered another importing error which will have to trace down & see if outstanding problem or if not file a new one.

Please do it, there is few people working on the matter, but I think there is some interest on gets FB working as main embedded database.

Bug reported → Bug #116893.

Error occurs when field type is numeric or decimal. Various sources - same results.

@Ratslinger:

Don’t believe there has been any progress in months.

Wow.

… and Thamas’ later posts.

… specifically:

Had somewhat the same concern as @frofa - need to migrate some existing data for testing. Entering data manually was out of the question. Months ago tried copy/paste method for tables. This had a problem with dates. Recently (see comment) tried again but this time problem with numeric/decimal data (Bug report filed). Have tried other methods including writing macros but problem persisted.

Have now come up with a solution which may not be likable to most users. It involves using Firebird 3 Server. It is for tables & views only. The rest seems to work with copy/paste from one Base file to another. The process was performed in Linux Mint 18.3 with LO v.6.0.2 & v6.1dev:

  • Installed Firebird 3 Server.
  • Created DB
  • Created Base file connected to server DB
  • copied tables (copy & paste) from MySQL Base file
  • created a View in Firebird Base file
  • Remove all table relationships
  • Used FlameRobin DB Admin tool to create backup of Firebird DB just filled with copied tables.
    This created a “xxx.fbk” file.
  • Renamed this to “firebird.fbk”
  • Using a created Base file (LO v6.0.2) with embedded Firebird, replaced “firebird.fbk” in “/database” folder with newly created one.
  • Can now re-apply table relationships

Opened the embedded Firebird Base file (tried both v6.0.2 and recent 6.1dev) and all tables & view were present. Was able to add, modify and delete records. This is certainly the very earliest stage of testing but promising nonetheless.

Basic stats:

17 tables; 1 view; over 6500 records total with largest table containing just over 2000 records & smallest was 3 records.

Edited 2018-05-11:

Added steps in above process to remove/replace table relationships. These do not transfer properly & will cause the Firebird embedded to hang if you attempt any relationships. By deleting prior to backup and creating anew in the embedded, all seems OK. No hanging of Base.

Another concern may be SQL. Over the past month have done some testing & some modifications may be needed in existing code. My existing statements needed quite a few changes. The Firebird 2.5 Language Reference is a big help → Firebird Documentation. This seems to be the latest version.

Hope this helps some.

Note on the relationships. The current (6.1dev - HSQL embedded to Firebird embedded) conversion also has a problem converting when relationships are present. This may be related to the hanging which occurred in testing.

Hi there, I was wondering if there’s a way to have a portable split firebird database. In my current setup I’m using LO 6.0, firebird 3.0 *.dlls and jaybird 2.x but I have to manually register the class path.

Uh, should this maybe be moved to a proper question thread?

@baseuser1001 This is not part of the original question. You should ask as a New question.