Database vs Database and the Linux PATH variable

Last night I was doing some research on PostgreSQL and got as far as configuring the server, getting a Schema up, and creating my first functions. In terms of capability between SQL Server 2005 and PostgreSQL, so far PostgreSQL seems to offer a comparable alternative, at least with the requirements for our system. A lot of features that were recently introduced into SQL Server 2005 such as custom data types, language support outside of T-SQL, and support for new SQL syntax has been around in Postgre for awhile, but that doesn’t mean PostgreSQL is better. As usual, you have to look at your requirements for your system before deciding which database servers out there are a better match for your project.

For our project, the two crucial requirements that counted out SQL Server 2005 were the ability to run on Linux and low licensing fees. The licensing costs of SQL Server 2005 does not scale well. Even with volume license deals, the licensing costs still encourage companies to scale up their hardware to save on licensing fees. Part of our strategy involves scaling out over cheap redundant boxes, its the exact same strategy that most successful tech startups have chosen because its more economical in the beginning of the system’s or company’s life.

Last night while I was configuring Postgre on my local Ubuntu machine, I ran into a small problem regarding editing the ‘system’ PATH in the bash shell. The PATH variable in Bash is similar to the PATH entry in the Window’s System Variables. This variable allows a user to execute files in any location located in the directories referenced by the PATH variable. Like the Windows counter part, there is a global file that contains PATH entries for all users and a local file for the current user. The global file is located at ‘/etc/environment’. You may have to login as ‘su’ in order to access the file. The local file is located at ‘~/.bashrc’, which is actually in the user’s home directory.

To add an entry to the PATH variable for the local user, just add the following lines

First – Type: gedit ~/.bashrc

PATH=$PATH:/path_to_program_is/bin
export PATH

To add an entry to the PATH variable for the environment, just add your entry with a colon and the new entry to the end of the PATH definition.

First РType:  sudo gedit  /etc/environment

PATH="XXXXX:XXXXX/XXXX:XXXX:XXX/XXXX/XXXX:XXXXX:/path_to_program_is/bin"

For more information, consult this thread in the ubuntuforums.

Leave a Reply