Kagunda JM

/ Software Developer /

How to Transform SQL Queries to Crosstabs in PostgreSQL

A SELECT SQL query retrieves data from a database in a tabular form. The first row, or header row, has the column names, and all the other rows have the data that was retrieved. In a crosstab, the data is condensed and the names of one or more columns are rotated. You can add row and column totals to a crosstab. For example, a list of salesmen’s monthly sales may include the months into the column headers.

How To Install ODK Central on Ubuntu 20.04

Introduction Open Data Kit (ODK) is a set (components) of free, open-source software used for facilitating data collection using mobile devices. ODK Central or Central is the server component. Without the server, the process of data collection cannot proceed. Installing ODK Central on a DigitalOcean server is the recommended method and is well documented. Where situations demand installing Central on a different cloud provider, documentation of the process is either scanty or altogether lacking.

How to Drop Multiple Databases in PostgreSQL

Introduction While performing database integration tests, things went south, and I ended up with more than 15 (fifteen) temporary PostgreSQL test databases. I use OmniDB, an open-source application for managing databases. Version (3.0.2b) of OmniDB does not have an option for selecting and dropping multiple databases. To drop a database in OmniDB, you right-click on a database, select Drop Database from the context menu, run the query to drop the database, and finally close the query window.

How To Export Data From Database Query To XML

Introduction Extensible Markup Language (XML) has been in existence for more than two decades. XML is a markup language for encoding documents in a format that is both human and machine readable. In XML, you define your own custom tags, elements and attributes to meet your specific needs. XML is case sensitive, allows comments and hierarchy is important. An XML file is a text file and can be opened with any text editor.

Installing MS SQL Server 2019 on Parrot OS

Introduction Parrot OS is a light Linux distribution based on Debian. Microsoft SQL Server or SQL Server is a relational database management system (RDBMS) developed by Microsoft. Starting with SQL Server 2017, Microsoft added Linux support and thus making any newer versions cross platform. This post steps through the process of SQL Server 2019 Developer edition installation on Parrot OS and contains the following topics: downloading and configuring MS SQL Server 2019 package repository running the SQL Server setup process installation of SQL Server command line tools installation Azure Data Studio running queries in Azure Data Studio The commands used in this post will also work on any Debian based distribution like Ubuntu, MX Linux, Linux Mint, Knoppix among many others.