Developer's Diary
Software development, with Terry Ebdon
08-Feb-2020 HSQLDB text tables

Table of Contents

HSQLDB

I haven't looked at HSQLDB since Monday. My immediate goal is to create a simple activity tracking database. The long term goal is to replace my Microsoft Access based apps. I have some "live" activity tracking data in CSV files, created with Libre Office Calc. I can use SQuirreL SQL Client to export CSVs but not to import them. I need to look at HSQLDB's SqlTool CLI for CSV imports.

Text tables

HSQLDB supports Text Tables, i.e. data that uses text files as backing store. I knew this was possible as a read-only table source in Libre Office Base. I hadn't realised that HSQLDB supported it natively, with read / write access. This is excellent; I should be able to use SQL select, insert and update statements on CSV files. This is a really nice feature.

HSQLDB text tables can be created using SQuirreL. The table files seems to have to be in the database's parent folder. I need to experiment with path names to confirm that. If I insert data, with SQL, it is written to the file. But data that's put in the file externally is not seen. Oddly if I close the session, replace the file, and reopen the session it sees the old data, not the new. It does seem to be using the correct file, so this is confusing.

13-DEC-2019 👈 Top of page 👉 09-FEB-2020

© 2020 Terry Ebdon.

Find me coding on GitHub, networking on LinkedIn, answering questions on Stack Exchange and hanging out on twitter.