I have been using Linux to host my Drupal based web applications for close to ten years now. Only in the last few years have I started using Linux exclusively as my desktop operating system(OS) on all my home computers. I still spend most of the time on MS Windows at work. Like a child in a toy shop I spent the first years searching for the greatest and the best distro. Every other month I was installing or upgrading to the latest version of Ubuntu, Kubuntu, Fedora and openSUSE. I never spent enough time using one distro to get the expert understanding of the distro that only comes with time.
These days I have a three year old daughter who keeps me busy and I have come to accept that computers are for doing work. You should not be doing work to get your computer to work. If you spend your time distro hoping you will spend hours getting your computer to work. I decided to stick to Kunbuntu 14.04 and will only upgrade when the next LTS version of Kubuntu is out. This will give me two years on the same version of Kubuntu. Its been a year now and I am beginning to appreciate some of the less obvious features of the applications in Kubuntu. For example, using the Dolphin file browser I can browse files on a remote server by typing fish://firstname.lastname@example.org:/path/to/file. In Windows you need to install third party software. Such features help me get work done using the default tools that come with the distro. No third party tools and no configuration or dependencies to worry about to start doing work.
Another feature I got to know just the other day was that Kate, the text editor included in KDE/Kubuntu has a SQL database plugin that is part default plugins. I discovered this plugin quite by accident. Whilst editing SQL scripts I was using in a blog post on formatting SQL I noticed the Kate interface change. Buttons appeared in the toolbar that made reference to connecting to a database. On closer inspection and after reading some documentation I discovered that Kate does comes with a built in plugin KateSQL.
I was excited by this discovery because I do most of my writing in a text editor including blogs, email drafts and other documents. I prefer writing in a text editor because they provide less cluttered interface and text files can be opened in different applications and different OS without any compatibility issues. I use Markdown to write my blog posts and the ability to connect to a database using the same tool I use for writing had a cool factor for me. Connecting to my Sqlite, MySQL and Postgresql databases was straightforward. I had to install the QPSQL driver to connect to Postgresql. Writing my blog was a pleasant experience because I was able to switch between two tabs in Kate. I was able to test my SQL in one tab and blog in the next tab.
- Distraction free, less cluttered than full featured SQL clients
- Light on resources
- Ability to tap into powerful text editing plugins that come with text editors. I used the following features:
- Encoding conversion which was useful working in mixed environments Linux and Windows
- Block selection mode for doing mass edits
- File tree to open my files
- Split file view allowed me to have different files open. Blog in one view and SQL in second view
- Ability to generate DDL and DML statements for each table
- Export SQL results to CSV
I have decided not to title this section cons because KateSQL does not aim to replace the traditional SQL editor. It would be unfair to compare it to traditional SQL clients. The limitations:
- Only tables and views are shown in the object browser tree. No stored procedures and functions.
- No field completion, although you can drag fields from the object tree view to the text editing area.
- No data import wizard, you have to write the SQL statement to import data into database. I have found this be tedious at times.
KateSQL is a simple but delightful tool for writing SQL statements in distraction free mode. It hasn’t replaced my go to SQL editors. I haven’t tried to be too ambitious with the tool and have kept my usage to working on small databases. The uncluttered interface along with the text editors plugins make for a distraction free interface for writing SQL.