You might be interested in the SQL Library for Processing.
There are also interesting example sketches connected with the DB Manager for Processing (mentioned earlier):
- https://forum.processing.org/two/discussion/21440/db-manager-for-processing
- GitHub - vesolba/DBManager-for-Processing: Java DB Manager for Processing
- GitHub - vesolba/DBM4Processing-Examples: Examples of how to use Derby with Processing.
Also see: