Learning SQL Exercise
MacLochlainns Weblog
by maclochlainn
2w ago
I’ve been using Alan Beaulieu’s Learning SQL to teach my SQL Development class with MySQL 8. It’s a great book overall but Chapter 12 lacks a complete exercise. Here’s all that the author provides to the reader. This is inadequate for most readers to work with to solve the concept of a transaction. Exercise 12-1 Generate a unit of work to transfer $50 from account 123 to account 789. You will need to insert two rows into the transaction table and update two rows in the account table. Use the following table definitions/data: Account: account_id avail_balance last_ ..read more
Visit website
Ubuntu Pro Upgrade?
MacLochlainns Weblog
by maclochlainn
1M ago
There wasn’t a choice when I chose to update the Ubuntu instance. I was compelled to upgrade to Ubuntu Pro. According to the upgrade I have five free installations. You can read more about Ubuntu Pro on this web page, and find their pricing schedule on this page ..read more
Visit website
MongoDB on Ubuntu
MacLochlainns Weblog
by maclochlainn
1M ago
This post shows how to install, configure, and use MongoDB with JavaScript programs. You need to complete each section in the order provided (based on Cherry Server post). Step #1: MongoDB Installation Install the prerequisite packages with the following command: sudo apt install -y software-properties-common gnupg apt-transport-https ca-certificates Display detailed console log → Reading package lists... Done Building dependency tree... Done Reading state information... Done ca-certificates is already the newest version (20230311ubuntu0.22.04.1). ca-certificates set to manually installed ..read more
Visit website
Parametric Queries
MacLochlainns Weblog
by maclochlainn
1M ago
In 2021, I wrote a MySQL example for my class on the usefulness of Common Table Expressions (CTEs). When discussing the original post, I would comment on how you could extend the last example to build a parametric reporting table. Somebody finally asked for a concrete example. So, this explains how to build a sample MySQL parametric query by leveraging a filter cross join and tests the parameter use with a Python script. You can build this in any database you prefer but I used a studentdb database with the sakila sample database installed. I’ve granted privileges to both databases to the stude ..read more
Visit website
Add PostGIS to PostgreSQL
MacLochlainns Weblog
by maclochlainn
2M ago
The following blog post shows you how to add PostGIS and PgRouting to your existing install of PostgeSQL 14 on the Ubuntu Desktop, Version 22.0.4. Generalized documentation on PostGIS exists at this URL. You install the postgis libraries: sudo apt install -y postgis Display detailed console log → Reading package lists... Done Building dependency tree... Done Reading state information... Done The following additional packages will be installed: gdal-data libaec0 libaom3 libarmadillo10 libarpack2 libblosc1 libboost-serialization1.74.0 libcfitsio9 libcharls2 libdav1d5 libde265-0 libfreex ..read more
Visit website
Sqlite on Ubuntu
MacLochlainns Weblog
by maclochlainn
2M ago
We decided to include some existing Sqlite databases in our AWS Ubuntu learning lab because they’re used by the Data Science courses (specifically, DS 250). Installing Sqlite is quite simple: sudo apt install -y sqlite You can check the install by using the which utility, like: which -a sqlite3 On Ubuntu, it should return: /usr/bin/sqlite3 There is a friendly help document online that can provide insight in how to use Sqlite. You can create a new student.db database with the following syntax from the Ubuntu CLI (Command-Line Interface): sqlite3 student.db It would return the following ..read more
Visit website
Git Hub Desktop on Ubuntu
MacLochlainns Weblog
by maclochlainn
2M ago
I need to install Git Hub Desktop on Ubuntu. It was quite straightforward: sudo wget https://github.com/shiftkey/desktop/releases/download/release-3.1.1-linux1/GitHubDesktop-linux-3.1.1-linux1.deb https://github.com/shiftkey/desktop/releases/download/release-3.1.1-linux1/GitHubDesktop-linux-3.1.1-linux1.deb Then, this: sudo apt update && sudo apt install github-desktop You can find it in the 9-dot menu’s second page or launch it from the command line, like: github-desktop Either will launch the GitHub Desktop, as shown below: As always, I hope this helps those looking for conci ..read more
Visit website
Ruby+PostgreSQL on Ubuntu
MacLochlainns Weblog
by maclochlainn
2M ago
This extends the earlier post on installing and configuring Ruby 3.3.0 on Ubuntu 22.0.4. Please refer to that earlier post to install Ruby. This post shows you how to install the necessary libraries and Ruby Gems for PostgreSQL. You need to install the libra-dev package, as shown: sudo apt install postgresql libpq-dev Display detailed console log → Reading package lists... Done Building dependency tree... Done Reading state information... Done postgresql is already the newest version (14+238). Suggested packages: postgresql-doc-16 The following NEW packages will be installed: libpq-de ..read more
Visit website
VSCode Package Error
MacLochlainns Weblog
by maclochlainn
2M ago
While running an update on Ubuntu 22.0.4 with the following syntax I got an error on finding the VSCode Package. I ran this to update before adding Ruby and Rails to an Ubuntu virtual machine instance. sudo apt-get update Display detailed console log → Hit:1 http://us.archive.ubuntu.com/ubuntu jammy InRelease Get:2 http://security.ubuntu.com/ubuntu jammy-security InRelease [110 kB] Get:3 http://us.archive.ubuntu.com/ubuntu jammy-updates InRelease [119 kB] Hit:4 https://dl.google.com/linux/chrome/deb stable InRelease Ign:5 https://packages ..read more
Visit website
Ruby+MySQL on Ubuntu
MacLochlainns Weblog
by maclochlainn
2M ago
This post goes through installing and configuring Ruby and Ruby on Rails for MySQL. The first step requires updating the Ubuntu OS: sudo apt-get update Interestingly, I found that the man-db service had inadvertently stopped. It raised the following error: E: dpkg was interrupted, you must manually run 'sudo dpkg --configure -a' to correct the problem. You run this command to find the problem with the dpkg utility: sudo dpkg --configure -a It returned: Setting up man-db (2.10.2-1) ... Updating database of manual pages ... man-db.service is a disabled or a static unit not running, not s ..read more
Visit website

Follow MacLochlainns Weblog on FeedSpot

Continue with Google
Continue with Apple
OR