Files
hpr-knowledge-base/hpr_transcripts/hpr1965.txt

138 lines
9.7 KiB
Plaintext
Raw Normal View History

Episode: 1965
Title: HPR1965: Adding SQLite as a datasource to SQLeo
Source: https://hub.hackerpublicradio.org/ccdn.php?filename=/eps/hpr1965/hpr1965.mp3
Transcribed: 2025-10-18 12:37:49
---
This in HPR Episode 1965 entitled, Adding SQI Tanninator Source to SQI O.
It is posted by Ken Fallon and in about 10 minutes long.
The summary is, using the graphical query build and from SQI O.
This episode of HPR is brought to you by Ananasthost.com.
Get 15% discount on all shared hosting with the offer code HPR15.
That's HPR15.
Better web hosting that's honest and fair at Ananasthost.com.
Hi everybody, my name is Ken Fallon and you're a listen to Acro Public Radio.
Today I want to talk to you about how to add SQI as a data source for SQI layout.
Just to give you some background here on this, I know it's kind of a weird one but bear
with me.
I have been looking for a tool that will graphically and programmatically track identifiers
as the pass through systems.
So this is where you have one system from one vendor and they've got their primary key
is called Bob and then the other systems primary key is called Sarah and there needs to
be a, you need to know that on this system I'm looking up Bob at 123 is equivalent to
Sarah 123 on the other systems.
Okay, that's sort of thing and I could have done this in Inkscape because I followed the
screen servers, screencasters that he the next Aurora link in the show notes but I wanted
to be able to do was take an image for inclusion and documentation but programmer programmatically
be able to describe it in documents as well.
So I was for a long time trying to remember what they were called because I had seen them
in Microsoft access and in some versions of other databases where you can drag a table
in so you can drag, I don't know, countries and then you can drag populations and you can
drag area so then you can, you know, country area, country populations and then you can
join on particular fields.
So the Netherlands is this area, it's got this number of people and then you can do calculations
on number of people per area, that sort of thing and I think you've all seen them before.
So the idea is like to show a table block and draw lines between like field x in system
A and field y in system B. So there's a lot of solutions out there but what I wanted
to be able to do is to obviously be able to give this to somebody which meant two things,
one, the license need to be free and open source and the other thing is I didn't want
people to have to be able to install a whole go of tools in order to get this run and
so you didn't have to install my Oracle or my SQL or something and I also wanted us
that it would run across platform for various different things.
So this choice of database led me to SQLite which if you read the website it says SQLite
is an in process library that implements a self-contained serverless zero configuration,
transactional SQL database engine.
The code for SQLite is in the public domain and thus free to use for any purpose commercial
or private. SQLite is the most widely deployed database in the world with more applications
than we can count including several high profile projects.
So it's probably on your phone, your house probably has at least ten of these databases
running right now.
So it's easy enough to install that, lots of instructions on the website.
For me it was a DNF install SQLite and at the same time I installed SQLite browser
and SQLite man.
If you've used PHP MyAdmin or mySQL console you kind of know how we're talking about something
that will allow you to create tables and databases but it's still all in this one tiny little
file that you can zip up and send to somebody.
It's really quite cool.
Ideal for if you're doing any databases and you can nursing them around the place it's
pretty nice.
So I made a small database using one of these tools with two tables and one field they
exact exactly what I said before.
So the next thing is you can download SQL Visual Query Builder which has support for a graphical
query builder and I'll give you the field.
This is a powerful SQL tool to transform a reverse complex queries generated by blah blah blah
blah blah blah blah into diagrams for easy visualization and analysis, a graphical
query builder that permits you to create complex SQL queries easily.
The GUI has multiple connectors supporting virtually all JDBC drivers including blah blah
blah blah blah blah, SQLite and up top of that everything is open source.
So it's a Java tool which is what the JDBC JDBC driver was all about there more about
that later.
And it's available on the website.
Now the version that you download from the website is limited to three graphs, three tables
per graph and only 100 rolls which is kind of fine for most things for what I want to
do with it.
It's absolutely fine.
But remember this is a GPLV2 program so you can download it, you can remove the restrictions
and do all that and I encourage you to do that.
And I also encourage you to go and pay the guy 10 euros and within five minutes I got
an email back with a zip file that I could just unpack and there I had a full version.
As Kevin who has often said support free software and just meant that today I didn't have
a cup of coffee.
Well not that I would spend 10 euros on a cup of coffee anyway but hypothetically speaking
if I was doing that.
All right so on zip the file I'll leave that up to you and then you can either run java
space dash jar space sq leo vqb.jar but I use the option dash default dot encoding equals
UTF8 because UTF8 rocks.
So there are read me files and you can see that it's all very very self explanatory except
to the point where I'm coming to now when I opened it up like there was a lot of options
to have a patchy oracle my sql firebird but I could not see anything for sql light.
And of course if I had bothered to read the documentation but I put a link into the show
notes where I found this then where I found somebody asking the very same question which
prompted me to write this blog post and also prompted me to record the show and it shows
you how to add them.
Basically it does not last to us you just click a new driver you add a library and then
you add in sql light jbc or dot sql light jbc.
But first you need to get the sql light jbc from the download that as a that's so that's
a separate option.
So you got this tool and then it has particular drivers for each of the database is once
you download that and put it somewhere you can add a new library and then you put in the
source sql light jdbc is what I called it in the driver's org dot sql light dot jdbc.
And then when you want to run out you will come to that later so you click next and so
that will add the data source then you can right click on that one and add a new data source
to the file and that will have to begin with jdbc colon sql light so it's the first part
tells us that it's a java database connector and then the sql light one is the sql light
and then colon and it couldn't be simpler than this slash path slash two slash where
a slash i slash pulse slash there okay the database that file yeah get the idea couldn't
be simpler so that's okay then you press connect to that and bam you're connected to
the database and now you've got like a fully functional very very clean okay java
sql but you know the cooler java one as opposed to the ugly ones for before you can drag
your two tables in and then you can link up the fields that you want to link up take
a screenshot of that and you're done but what's kind of cool is if you press save then
it'll save that query so you can have this is the query for doing this is the query for
doing that really kind of cool and it gives you then the programmatically how you do
that with sql so in this case it's select from system underscore b an inner space join
space from system underscore a arm system b dot field y is equal to system a dot field x so if
you're anyway familiar with sql at all that will be a nice little way to programmatically
know what's going on and so you've got an image that you can save as a binary blob and you've
also got this which you can save and plug into gate and then you can see you can you know filter
on that sort of stuff and you've got yourself a nice query browser so I think with the combination
of this tool and they sql like browser or sql like man you have the ability to have a nice
gooey replacement for something like Microsoft access in a company or something and the beauty
of it is is it's all are sinkable and it's all distributed for free I'll be 10 euros 10
euros will get you a year of downloads so I was extremely happy with this I must say and
hopefully it would be a nice tool obviously my use case is very very weird I get that I understand
that but your use case might be just I want something that will do a normal database for me or
I want to be able to get some information out of this Oracle database and I want to pump it into
a I just want to save it here in an sql like database so hopefully this was of some use to you
if it was yeah give us a comment or drop us a line all right tune in tomorrow for another
exciting episode of hacker public radio you've been listening to hacker public radio at
hackerpublicradio.org we are a community podcast network that releases shows every weekday
Monday through Friday today show like all our shows was contributed by an hbr listener like
yourself if you ever thought of recording a podcast and click on our contributing to find out
how easy it really is hacker public radio was founded by the digital dog pound and the
infonomican computer club and it's part of the binary revolution at binrev.com if you have
comments on today's show please email the host directly leave a comment on the website or record
a follow-up episode yourself unless otherwise status today's show is released on the creative
comments attribution share a light 3.0 license