How to install MongoDB

This post shows the yum command to install the MongoDB packages on Linux. More on setup and use will follow.

You install the MongoDB package with the following yum command:

yum install -y mongodb

You should see the following log file, which may also show a missing mirrored site:

Loaded plugins: langpacks, refresh-packagekit
cassandra/signature                                         |  819 B  00:00     
cassandra/signature                                         | 2.9 kB  00:00 !!! 
mysql-connectors-community                                  | 2.5 kB  00:00     
mysql-tools-community                                       | 2.5 kB   (more...)

Identity Columns Compared

It’s interesting to see the way different databases implement automatic numbering. Oracle Database 12c is the closest to PostgreSQL in some significant ways. However, its probably more accurate to say Oracle Database 12c copied PostgreSQL’s implementation. At least, that’s my conjecture because Oracle added a way to reset the START WITH value of the indirect sequence. However, I prefer the MySQL approach because the automatic numbering sequence is a property of the table and a (more...)

Cassandra Query Language

After installing Cassandra and reading Cassandra The Definitive Guide, it struck me that I should learn a bit more about the Cassandra Query Language (CQL). So, I setup a .bashcassandra environment file:

# Add the Java and JRE paths to the $PATH environments.
export set PATH=$PATH:/usr/lib/jvm/java-1.8.0-openjdk-1.8.0.45.x86_64:/usr/lib/jvm/java-1.8.0-openjdk-1.8.0.45.x86_64/jre

# Add the $JAVA_HOME and $JRE_HOME environment variables.
export set JAVA_HOME=/usr/lib/jvm/java-1.8.0-openjdk-1.8.0.45. (more...)

DevOps Handbook Review

DevOps: Is it a mindset or process? That’s a big question for managers because while you can’t manage a mindset, you can manage a process. DevOps is actually a framework of processes.

Some actually say DevOps is actually a lot like making a patchwork quilt. You need to design the patches before you figure out how to stitch them together. I believe this is true, and base that on my experience as a release engineer (more...)

Install Cassandra on Fedora

It was quite interesting to discover that DataStax no longer provides the DataStax Community version of Apache Cassandra or the DataStax Distribution of Apache Cassandra. Needless to say, I was quite disappointed because it means folks will get less opportunity to learn how to use Cassandra because it makes it more difficult for beginning developers.

I spent a good hour sorting through what was available and then figuring out the real requirements.

After installing and (more...)

Upgrade APEX 4 to 5.1.2

This blog post shows you how to upgrade APEX Version 4.0 on a default Oracle Database 11g XE instance to APEX 5.1.2. It divided into two parts. The first part confirms your starting point and the second installs and configures APEX 5.1.2. As a rule, you only should need to unlock the anonymous schema because these should be correctly set already.

Confirm Current Installation

  1. Verify the database version by connecting (more...)

SQL Logic Overkill, again …

It’s interesting to watch people try to solve problems. For example, in a lab exercise that I wrote the simple fix is to replace an external file value with a scalar subquery in an INSERT statement. There’s even a hint about how to fix the external file value in the CSV file.

The approach here was interesting and worked. However, it’s wrong on two levels:

INSERT INTO transaction
(SELECT   transaction_s1.nextval
 ,        tr.transaction_account
 ,         (more...)

Oracle SQL Strip Quotes

Somebody wanted to know how to strip double quotes from strings. Obviously, they’re playing with the DBMS_METADATA package. It’s quite simple, the TRIM function does it, like this:

SELECT TRIM(BOTH '"' FROM '"Hello World!"') AS "Message"
FROM   dual;

It will print:

Hello World!

As always, I hope this helps those looking for a solution.

Read list of a dictionaries

My students wanted a quick example of how to read a list of a dictionaries in Python. So, here it is:

#!/usr/bin/python

# Declare list of dictionaries.
cakes = [{'cake':"vanilla",'frosting':"chocolate"}
        ,{'cake':"chocolate",'frosting':"vanilla"}]

# Read the list of dictionaries.
for lkey, lvalue in enumerate(cakes):
  print lvalue['cake'] + " with " + lvalue['frosting'] + " frosting."

Naturally, a list can contain many things and you should ensure each value you read is a dictionary before trying (more...)

Installing PIP for Python

If you’re on a Mac running macOS Sierra, you can install PIP to add packages. PIP stands for either of the following:

  • PIP installs Packages
  • PIP installs Python

You use the following to install the PIP utility:

sudo easy_install pip

It should return the following:

Searching for pip
Reading https://pypi.python.org/simple/pip/
Best match: pip 9.0.1
Downloading https://pypi.python.org/packages/11/b6/abcb525026a4be042b486df43905d6893fb04f05aac21c32c638e939e447/pip-9.0.1.tar.gz#md5=35f01da33009719497f01a4ba69d63c9
Processing pip-9.0.1.tar.gz
Writing /tmp/easy_install-ryxjDg/pip-9.0. (more...)