<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Joe Lennon &#187; Tutorials</title>
	<atom:link href="http://www.joelennon.ie/category/tutorials/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.joelennon.ie</link>
	<description>Rants, Raves &#38; Recommendations</description>
	<lastBuildDate>Thu, 29 Jul 2010 12:27:45 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0</generator>
		<item>
		<title>CouchDB 1.0 on Windows</title>
		<link>http://www.joelennon.ie/2010/07/29/couchdb-1-0-on-windows/</link>
		<comments>http://www.joelennon.ie/2010/07/29/couchdb-1-0-on-windows/#comments</comments>
		<pubDate>Thu, 29 Jul 2010 11:31:49 +0000</pubDate>
		<dc:creator>Joe Lennon</dc:creator>
				<category><![CDATA[CouchDB]]></category>
		<category><![CDATA[Tutorials]]></category>
		<category><![CDATA[couchdb]]></category>
		<category><![CDATA[install]]></category>
		<category><![CDATA[windows]]></category>

		<guid isPermaLink="false">http://www.joelennon.ie/?p=476</guid>
		<description><![CDATA[In case you haven't heard by now, CouchDB 1.0 was released earlier this month. One of the questions I've been asked most about CouchDB is how can one go about installing it on Windows.]]></description>
			<content:encoded><![CDATA[<p>In case you haven&#8217;t heard by now, CouchDB 1.0 was released earlier this month. One of the questions I&#8217;ve been asked most about CouchDB is how can one go about installing it on Windows. Up until recently, there were a few hacked installers available, each of which would install CouchDB and its dependencies, but these far from perfect, with most of CouchDB&#8217;s test suite failing when run under this setup. Thankfully, there is now an official Windows binary available which will have you up and running with CouchDB in no time.</p>
<p><strong>Step 1:</strong> Grab the binary from <a title="Download CouchDB 1.0.0 for Windows" href="http://www.couch.io/get" target="_blank">http://www.couch.io/get</a><br />
<strong>Step 2:</strong> Unzip to your hard drive (I unzipped to C:\ and renamed the extracted folder to couchdb).<br />
<strong>Step 3:</strong> Go into the bin directory and run couchdb.bat. This will launch the Erlang command line and run CouchDB. You should see a DOS window with the message &#8220;CouchDB 1.0.0 &#8211; prepare to relax&#8230;&#8221;.<br />
<strong>Step 4:</strong> Open your browser and point it to <a title="Open Futon" href="http://127.0.0.1:5984/_utils/" target="_blank">http://127.0.0.1:5984/_utils/</a> to launch Futon<br />
<strong>Step 5:</strong> From the navigation bar on the right hand side, click on &#8220;Test Suite&#8221; and at the top of the test suite&#8217;s page, click the &#8220;Run All&#8221; button to start the tests. Leave your browser do its thing (it&#8217;ll lock up while it&#8217;s performing the tests) and all going well, each of 66 tests should return with a success message.<br />
<strong>Step 6:</strong> Click on &#8220;Overview&#8221; at the top right of the browser and start creating CouchDB databases!</p>
<p>Enjoy.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.joelennon.ie/2010/07/29/couchdb-1-0-on-windows/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Tags in Oracle Nested Tables</title>
		<link>http://www.joelennon.ie/2010/07/13/storing-tags-in-oracle-using-nested-tables/</link>
		<comments>http://www.joelennon.ie/2010/07/13/storing-tags-in-oracle-using-nested-tables/#comments</comments>
		<pubDate>Tue, 13 Jul 2010 14:12:44 +0000</pubDate>
		<dc:creator>Joe Lennon</dc:creator>
				<category><![CDATA[Oracle]]></category>
		<category><![CDATA[Tutorials]]></category>
		<category><![CDATA[arrays]]></category>
		<category><![CDATA[nested tables]]></category>
		<category><![CDATA[plsql]]></category>
		<category><![CDATA[sql]]></category>
		<category><![CDATA[tags]]></category>

		<guid isPermaLink="false">http://www.joelennon.ie/?p=395</guid>
		<description><![CDATA[Tags are a useful means of associating keyword metadata with a data structure such as an image, a video, audio or a piece of text. There are many ways of storing tags in a database - for example one could store a string of tags separated by a space, comma or semi-colon. Alternatively, one could store tags in a database table and then create another table to hold the list of tags for a given entity. My preferred method of storing tags, in an Oracle database at least, is to use the concept of nested tables.]]></description>
			<content:encoded><![CDATA[<p>Tags are a useful means of associating keyword metadata with a data structure such as an image, a video, audio or a piece of text. There are many ways of storing tags in a database &#8211; for example one could store a string of tags separated by a space, comma or semi-colon. Alternatively, one could store tags in a database table and then create another table to hold the list of tags for a given entity. My preferred method of storing tags, in an Oracle database at least, is to use the concept of nested tables.</p>
<p>Nested tables are a type of PL/SQL collection which may be compared to arrays or objects in other programming languages. One of the advantages of using nested tables over other PL/SQL collection types is that they don&#8217;t have a fixed size, and they can be stored in a database table (not just in a program unit, like regular PL/SQL tables or associative arrays). The best way to show how nested tables work is to use an example, so let&#8217;s dive right in and set up our database for the tags example.</p>
<p>The first thing we want to do is create the nested table type in our database. I&#8217;m going to keep it nice and simple and name my type &#8220;tags&#8221;:</p>
<div class="listing">
<pre><span class="keyword">CREATE TYPE</span> tags <span class="keyword">IS TABLE OF VARCHAR2</span>(50);</pre>
</div>
<p>If you are familiar with PL/SQL tables, the above should look very similar to the syntax for creating a PL/SQL table, but without the typical &#8220;index by binary_integer&#8221; bit stuck at the end. With our type created, we can now go ahead and use this in a database table. I&#8217;m going to create a table named &#8220;post&#8221;, which one might use to store blog posts. This table will have three columns &#8211; post_id, post_title and post_tags.</p>
<div class="listing">
<pre><span class="keyword">CREATE TABLE</span> post (
post_id            <span class="keyword">NUMBER</span>(11),
post_title        <span class="keyword">VARCHAR2</span>(50),
post_tags        tags
) <span class="keyword">NESTED TABLE</span> post_tags <span class="keyword">STORE AS</span> tags_table;</pre>
</div>
<p>Great &#8211; you now have a database table with a column of type &#8220;tags&#8221; which is itself a table. The next thing we want to do is insert some records into our new table.</p>
<div class="listing">
<pre><span class="keyword">INSERT INTO</span> post(post_id, post_title, post_tags)
<span class="keyword">VALUES</span>(1, 'First Post', tags('oracle', 'tags', 'example'));

<span class="keyword">INSERT INTO</span> post(post_id, post_title, post_tags)
<span class="keyword">VALUES</span>(2, 'Second Post', tags('oracle', 'tags'));

<span class="keyword">INSERT INTO</span> post(post_id, post_title, post_tags)
<span class="keyword">VALUES</span>(3, 'Third Post', tags('oracle'));

<span class="keyword">COMMIT</span>;</pre>
</div>
<p>As you can see from the above INSERT statements, inserting tags into our nested table is very straightforward, we simply tell Oracle that we are using the type &#8220;tags&#8221; and pass the VARCHAR2 values we want to store to it. If you try to insert a tag with over 50 characters you will get an error as we defined the tags table as a table of VARCHAR2(50) fields. So what does our new table look like when we go to retrieve data from it? Let&#8217;s take a look.</p>
<div class="listing">
<pre><span class="keyword">SELECT</span> * <span class="keyword">FROM</span> post;</pre>
</div>
<p>You should see output like the following</p>
<div class="listing">
<pre>     POST_ID POST_TITLE                                                  POST_TAGS
------------ ----------------------------------------------------------- ---------
           1 First Post                                                  &lt;Object&gt;
           2 Second Post                                                 &lt;Object&gt;
           3 Third Post                                                  &lt;Object&gt;
</pre>
</div>
<p>Hardly ideal is it? Fortunately, we can use the TABLE function to easily get back a list of tags for a given post quite easily. Try the following SQL statement:</p>
<div class="listing">
<pre><span class="keyword">SELECT</span> column_value
<span class="keyword">FROM TABLE</span>(
    <span class="keyword">SELECT</span> post_tags <span class="keyword">FROM</span> post <span class="keyword">WHERE</span> post_id = 1
);</pre>
</div>
<p>This outputs the following:</p>
<div class="listing">
<pre>COLUMN_VALUE
--------------------------------------------------
oracle
tags
example</pre>
</div>
<p>Try the statement again, but this time pass in the post_id value for another row. This is useful, as it gives us a means of getting the tag data out of the database, but what if we want to get back all the tags when retrieving the other columns in the table? This requires a bit more work, but it&#8217;s not exactly complex:</p>
<div class="listing">
<pre><span class="keyword">SELECT</span> p.post_id, p.post_title, t.column_value
<span class="keyword">FROM</span> post p, <span class="keyword">TABLE</span>(
    <span class="keyword">SELECT</span> post_tags <span class="keyword">FROM</span> post <span class="keyword">WHERE</span> post_id = p.post_id
) t;</pre>
</div>
<p>The above statement should produce the following:</p>
<div class="listing">
<pre>     POST_ID POST_TITLE                                              COLUMN_VALUE
------------ ------------------------------------------------------- ---------------
           1 First Post                                              oracle
           1 First Post                                              tags
           1 First Post                                              example
           2 Second Post                                             oracle
           2 Second Post                                             tags
           3 Third Post                                              oracle
</pre>
</div>
<p>A step in the right direction, but the post_id and post_title are duplicated for each tag for that record. Surely there&#8217;s a way of outputting all the tags on a single row, joining them together with a delimiting character such as a comma? There are a number of ways of doing this, from using a stored function to using 11g&#8217;s WITHIN GROUP feature. The method with the least code that works on 9i and above is to use the XMLAGG function to produce the concatenated result. The SQL to achieve the desired result in this manner is as follows:</p>
<div class="listing">
<pre><span class="keyword">SELECT</span> p.post_id, p.post_title,
    <span class="keyword">RTRIM</span>(<span class="keyword">XMLAGG</span>(<span class="keyword">XMLELEMENT</span>(e, t.column_value || ',')).<span class="keyword">EXTRACT</span>('//text()'), ',') tags
<span class="keyword">FROM</span> post p, <span class="keyword">TABLE</span>(
    <span class="keyword">SELECT</span> post_tags <span class="keyword">FROM</span> post <span class="keyword">WHERE</span> post_id = p.post_id
) t
<span class="keyword">GROUP BY</span> p.post_id, p.post_title;</pre>
</div>
<p>This produces the following result:</p>
<div class="listing">
<pre>     POST_ID POST_TITLE                               TAGS
------------ ---------------------------------------- -----------------------
           1 First Post                               oracle,tags,example
           2 Second Post                              oracle,tags
           3 Third Post                               oracle
</pre>
</div>
<p>So far we haven&#8217;t seen any particular reason why one would necessarily use a nested table to store tags over any other method. For me, the primary advantage is that it makes it very simple to perform group functions on the tags &#8211; making it ridiculously easy to generate tag clouds based on how many times a tag is used. In the above example, we can easily see that the tag &#8220;oracle&#8221; is used 3 times, &#8220;tags&#8221; is used twice and &#8220;example&#8221; only once. But in a scenario where you have many posts and many, many tags, it is impossible to do this counting in your head. Let&#8217;s take a look at just how easy it is to do this counting with our nested table.</p>
<div class="listing">
<pre><span class="keyword">SELECT</span> t.column_value, <span class="keyword">COUNT</span>(*)
<span class="keyword">FROM</span> post p, <span class="keyword">TABLE</span>(
    <span class="keyword">SELECT</span> post_tags <span class="keyword">FROM</span> post <span class="keyword">WHERE</span> post_id = p.post_id
) t
<span class="keyword">GROUP BY</span> t.column_value;</pre>
</div>
<p>And the output:</p>
<div class="listing">
<pre>COLUMN_VALUE                                         COUNT(*)
-------------------------------------------------- ----------
tags                                                        2
example                                                     1
oracle                                                      3
</pre>
</div>
<p>Want to order the results? Simply add an ORDER BY clause and Bob&#8217;s your uncle.</p>
<div class="listing">
<pre><span class="keyword">SELECT</span> t.column_value, <span class="keyword">COUNT</span>(*)
<span class="keyword">FROM</span> post p, <span class="keyword">TABLE</span>(
    <span class="keyword">SELECT</span> post_tags <span class="keyword">FROM</span> post <span class="keyword">WHERE</span> post_id = p.post_id
) t
<span class="keyword">GROUP BY</span> t.column_value
<span class="keyword">ORDER BY</span> 2 <span class="keyword">DESC</span>
</pre>
</div>
<p>The result:</p>
<div class="listing">
<pre>COLUMN_VALUE                                         COUNT(*)
-------------------------------------------------- ----------
oracle                                                      3
tags                                                        2
example                                                     1
</pre>
</div>
<p>For me, this is the main reason I store tags in a nested table &#8211; but there are other advantages, too. What if you are editing a post and you want to change one of the tags? Nested tables make this simple:</p>
<div class="listing">
<pre><span class="keyword">UPDATE TABLE</span>(<span class="keyword">SELECT</span> post_tags <span class="keyword">FROM</span> post <span class="keyword">WHERE</span> post_id = 1)
<span class="keyword">SET</span> column_value = 'sample'
<span class="keyword">WHERE</span> column_value = 'example'
</pre>
</div>
<p>Similarly, if you wanted to delete a tag from a row, this is also very straightforward:</p>
<div class="listing">
<pre><span class="keyword">DELETE FROM TABLE</span>(
    <span class="keyword">SELECT</span> post_tags <span class="keyword">FROM</span> post <span class="keyword">WHERE</span> post_id = 1
)
<span class="keyword">WHERE</span> column_value = 'tags';</pre>
</div>
<p>Nested tables are a powerful PL/SQL collection type, and you can do even more powerful things with them if you start using PL/SQL procedures and functions. But the beauty about nested tables for me is how powerful and flexible they are using nothing but raw SQL statements. For further information about nested tables and other PL/SQL collection types, see the following resources:</p>
<ul>
<li><a href="http://www.developer.com/db/article.php/10920_3379271_1/Oracle-Programming-with-PLSQL-Collections.htm" target="_blank">http://www.developer.com/db/article.php/10920_3379271_1/Oracle-Programming-with-PLSQL-Collections.htm</a></li>
<li><a href="http://www.dba-oracle.com/t_display_multiple_column_values_same_rows.htm" target="_blank">http://www.dba-oracle.com/t_display_multiple_column_values_same_rows.htm</a></li>
<li><a href="http://www.devshed.com/c/a/Oracle/Database-Interaction-with-PLSQL-Nested-Tables/" target="_blank">http://www.devshed.com/c/a/Oracle/Database-Interaction-with-PLSQL-Nested-Tables/</a></li>
<li><a href="http://soft.buaa.edu.cn/oracle/bookshelf/Oreilly/prog2/ch19_01.htm" target="_blank">http://soft.buaa.edu.cn/oracle/bookshelf/Oreilly/prog2/ch19_01.htm</a></li>
<li><a href="http://sql-plsql.blogspot.com/2007/05/oracle-plsql-nested-tables.html" target="_blank">http://sql-plsql.blogspot.com/2007/05/oracle-plsql-nested-tables.html</a></li>
<li><a href="http://download.oracle.com/docs/cd/B10501_01/appdev.920/a96624/05_colls.htm" target="_blank">http://download.oracle.com/docs/cd/B10501_01/appdev.920/a96624/05_colls.htm</a></li>
<li><a href="# http://www.smart-soft.co.uk/Oracle/oracle-plsql-tutorial-part-9.htm" target="_blank">http://www.smart-soft.co.uk/Oracle/oracle-plsql-tutorial-part-9.htm</a></li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://www.joelennon.ie/2010/07/13/storing-tags-in-oracle-using-nested-tables/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Schedule Twitter Posts</title>
		<link>http://www.joelennon.ie/2009/03/27/schedule-twitter-posts/</link>
		<comments>http://www.joelennon.ie/2009/03/27/schedule-twitter-posts/#comments</comments>
		<pubDate>Fri, 27 Mar 2009 15:14:46 +0000</pubDate>
		<dc:creator>Joe Lennon</dc:creator>
				<category><![CDATA[Tutorials]]></category>
		<category><![CDATA[Twitter]]></category>
		<category><![CDATA[at]]></category>
		<category><![CDATA[automate]]></category>
		<category><![CDATA[curl]]></category>
		<category><![CDATA[schedule]]></category>
		<category><![CDATA[tweet]]></category>
		<category><![CDATA[twitter]]></category>
		<category><![CDATA[twitter api]]></category>

		<guid isPermaLink="false">http://www.joelennon.ie/?p=258</guid>
		<description><![CDATA[Many people (myself included) often post an update to Twitter when publishing a new blog post. WordPress (the blog software I use) and most other blogging platforms include a nice feature that allows you to schedule blog posts to be published at a particular date/time. Wouldn’t it be great if we could also schedule our [...]]]></description>
			<content:encoded><![CDATA[<p>Many people (myself included) often post an update to Twitter when publishing  a new blog post. WordPress (the blog software I use) and most other blogging  platforms include a nice feature that allows you to schedule blog posts to be  published at a particular date/time. Wouldn’t it be great if we could also  schedule our tweets so that they are posted when our blog post is published? There are countless other potential uses for scheduled tweets. Maybe you&#8217;re launching a new product and want to announce it on Twitter on Monday morning at 9am, but are afraid you&#8217;ll get caught up on something else &#8211; set an automated Tweet and away you go.</p>
<p>Before I begin, I&#8217;ll start off by saying that this is a very simple example of scheduling tweets. It will give you a very simple introduction to the Twitter API, the curl tool and the Windows Task Scheduler. There is no pretty graphical user interface, and configuring your scheduled tweets is fairly manual to say the least. If you would like more features, why not incorporate them into your own little application? I&#8217;m certainly thinking of doing so. Also &#8211; I believe there is a WordPress plugin that will post a tweet when your blog post is published &#8211; if this fits your needs, great! Again &#8211; this is merely a simple example of what you can do with the Twitter API, it&#8217;s not intended to be the holy grail solution for scheduling tweets!</p>
<p>For the sake of this tutorial I am going to assume you&#8217;re using the Windows operating system. If you&#8217;re using Mac OS, Linux or another Unix variant, the technique used in this tutorial could be easily amended to work with cron. If enough people demand a Mac/Linux version of this tutorial, I&#8217;ll write one.</p>
<p>The first thing you&#8217;re going to need to do is download <strong>cURL</strong>. This command-line utility allows you to transfer files over a host of internet protocols, and is perfect for interacting with the Twitter API. It is free and open source, and is available for a wide range of platforms. Visit the <a title="cURL Win32 (2000/XP) Download Page" href="http://curl.haxx.se/dlwiz/?type=bin&amp;os=Win32&amp;flav=-&amp;ver=2000%2FXP" target="_blank">cURL download page</a> and download the No-SSL version provided by Daniel Stenburg. At the time of writing, the latest version available was 7.19.4. Once you have downloaded the ZIP file, extract the contents to c:\curl. If you need an archiving utility, download the excellent <a title="7-Zip" href="http://www.7-zip.org/" target="_blank">7-Zip</a>. That&#8217;s all there is to installing cURL! To test it out, open a command prompt (Start-&gt;Programs-&gt;Accessories-&gt;Command Prompt) and change to the curl directory (<strong>cd \curl</strong>). Enter the following command:</p>
<div class="listing">
<pre>curl http://www.google.ie</pre>
<p><em>Listing 1 &#8211; cURL&#8217;ing Google.ie</em></p>
</div>
<p>This should spit back a ream of continuous HTML code. This is the HTML source for the Google.ie home page. What you see should be similar to the screenshot below:</p>
<div id="attachment_259" class="wp-caption aligncenter" style="width: 310px"><a href="http://www.joelennon.ie/wp-content/uploads/2009/03/figure011.png"><img class="size-medium wp-image-259" title="Figure 1 - cURL'ing Google.ie" src="http://www.joelennon.ie/wp-content/uploads/2009/03/figure011-300x187.png" alt="Figure 1 - cURL'ing Google.ie" width="300" height="187" /></a><p class="wp-caption-text">Figure 1 - cURL&#39;ing Google.ie</p></div>
<p>Now that we have verified that cURL is working, let&#8217;s see how we can use it to interact with the Twitter API. The Twitter API is what is known as a RESTful web service, meaning that it can be queryed using a URI, and will return data in a particular MIME type. Twitter can return data in the XML, JSON, RSS or Atom MIME types. Let&#8217;s start working with Twitter by retrieving the Public Timeline in RSS format. In your command prompt, issue the following command:</p>
<div class="listing">
<pre>curl http://twitter.com/statuses/public_timeline.rss</pre>
<p><em>Listing 2 &#8211; cURL&#8217;ing the Twitter Public Timeline</em></p>
</div>
<p>This should bring back the RSS feed for the Twitter Public Timeline, as seen in the following screenshot:</p>
<div id="attachment_260" class="wp-caption aligncenter" style="width: 310px"><a href="http://www.joelennon.ie/wp-content/uploads/2009/03/figure021.png"><img class="size-medium wp-image-260" title="Figure 2 - cURL'ing the Twitter Public Timeline" src="http://www.joelennon.ie/wp-content/uploads/2009/03/figure021-300x187.png" alt="Figure 2 - cURL'ing the Twitter Public Timeline" width="300" height="187" /></a><p class="wp-caption-text">Figure 2 - cURL&#39;ing the Twitter Public Timeline</p></div>
<p>Great &#8211; but we&#8217;re not very interested in the public timeline are we? Let&#8217;s tell Twitter who we are and ask for the timeline of only the people we are following. This time, we will ask for a response in the JSON (JavaScript Object Notation) format. Please be sure to substitute your own Twitter username and password for the values below. And no, my Twitter password is not &#8220;password&#8221;!</p>
<div class="listing">
<pre>curl -u joelennon:password http://twitter.com/statuses/friend_timeline.json</pre>
<p><em>Listing 3 &#8211; cURL&#8217;ing our Friends&#8217; Timeline</em></p>
</div>
<p>In this example, we are using HTTP authentication to tell Twitter who we are, and asking it to return a JSON representation of our friends&#8217; timeline. For a sample of the output, see Figure 3 below:</p>
<div id="attachment_261" class="wp-caption aligncenter" style="width: 310px"><a href="http://www.joelennon.ie/wp-content/uploads/2009/03/figure031.png"><img class="size-medium wp-image-261" title="Figure 3 - cURL'ing our Friends Timeline" src="http://www.joelennon.ie/wp-content/uploads/2009/03/figure031-300x187.png" alt="Figure 3 - cURL'ing our Friends Timeline" width="300" height="187" /></a><p class="wp-caption-text">Figure 3 - cURL&#39;ing our Friends Timeline</p></div>
<p>At this point, you may be wondering what use all of the mumbo-jumbo we are receiving as a response is to us. In fact, in this tutorial, it&#8217;s not much use to us at all as we are only interested in updating Twitter. If we wanted to display our own, our friends or public tweets however, we would be able to parse this information and display it in a readable format. The Twitter API provides an array of methods for pulling back information like this, including:</p>
<ul>
<li>public_timeline</li>
<li>friends_timeline</li>
<li>user_timeline</li>
<li>show</li>
<li>replies</li>
<li>friends</li>
<li>followers</li>
<li>many more&#8230;</li>
</ul>
<p>If you would like to delve deeper into these methods, and the Twitter API in general, check out the <a title="Twitter REST API Documentation" href="http://apiwiki.twitter.com/REST-API-Documentation" target="_blank">REST API Documentation</a> on the <a title="Twitter API Wiki" href="http://apiwiki.twitter.com/" target="_blank">Twitter API Wiki</a>. It has a host of information and examples on how to use the Twitter API. Now let&#8217;s get back to the tutorial!</p>
<p>Up until this point, we have concentrated mainly on <em>retrieving</em> data from Twitter. But we want to <em>send</em> updates to Twitter! Luckily, cURL allows us to neatly send POST data along with our HTTP request. To post an update, issue the following command in your command prompt:</p>
<div class="listing">
<pre>curl -u joelennon:password -d status="Testing out using cURL for Twitter updates" http://twitter.com/statuses/update.xml</pre>
<p><em>Listing 4 &#8211; Update Twitter with CURL</em></p>
</div>
<p>As previously, you will receive a response in the format you specified in the request (in this case, XML). This should look similar to the screenshot below:</p>
<div id="attachment_263" class="wp-caption aligncenter" style="width: 310px"><a href="http://www.joelennon.ie/wp-content/uploads/2009/03/figure041.png"><img class="size-medium wp-image-263" title="Figure 4 - Posting a Twitter Update" src="http://www.joelennon.ie/wp-content/uploads/2009/03/figure041-300x197.png" alt="Figure 4 - Posting a Twitter Update" width="300" height="197" /></a><p class="wp-caption-text">Figure 4 - Posting a Twitter Update</p></div>
<p>But, more importantly, if you check out your Twitter page, you will see that your timeline has been updated with a new post &#8211; you guessed it, the one we just sent. To change the content of the post, simply change the text between the quote symbols in Listing 4 above. I think  you&#8217;ll agree, using the Twitter API with curl is pretty easy! Now let&#8217;s take things a step further and create a script that will post the update for us, so that we don&#8217;t have to issue the long curl command every time we want to post.</p>
<p>Open a text editor (Notepad will do fine) and add the command from Listing 4 above to it. Feel free to change the status text to something else! Now go to File -&gt; Save As and save it as &#8220;twitter.bat&#8221; in the C:\curl directory. Be sure to include the quotes when you are saving the file, otherwise Notepad will probably try to save it as .txt file, and you&#8217;ll end up with a file named twitter.bat.txt instead!</p>
<p>Now go back to your command prompt and ensure that you have changed in to the C:\curl directory. Enter the following command:</p>
<div class="listing">
<pre>twitter.bat</pre>
<p><em>Listing 5 &#8211; Running our Twitter script</em></p>
</div>
<p>Hey presto, your Twitter update has been posted! While this is nice and short, it&#8217;s still a bit of a pain as we have to modify the twitter.bat file everytime to change the status text. Let&#8217;s fix that. Re-open twitter.bat in Notepad, and change the contents to the following:</p>
<div class="listing">
<pre>@ECHO OFF
SET STATUS=%*
c:\curl\curl.exe -u joelennon:password -d status="%STATUS%" http://twitter.com/statuses/update.xml</pre>
<p><em>Listing 6 &#8211; Update twitter.bat file</em></p>
</div>
<p>We have changed the batch file so that it does not display the command each time it runs, and it sets a variable, <em>STATUS</em> to all the arguments entered when the command is executed. We then use this STATUS variable in our curl command instead of static text. This allows us to enter the status text we wish to update Twitter with when we run our script. This time, try running the command in Listing 7 below:</p>
<div class="listing">
<pre>twitter.bat Passing arguments to the batch file</pre>
<p><em>Listing 7 &#8211; Running our updated script</em></p>
</div>
<p>Well would you look at that, it&#8217;s submitted the Twitter update using the text we specified after the twitter.bat command! Take a step back and look at what you&#8217;ve just created &#8211; a Twitter updater client! Sure it&#8217;s basic, but it works! Now that we have the script to post our Twitter updates created, let&#8217;s look at how we can schedule it to automatically post an update at a specified date and time.</p>
<p>A feature of the Windows operating system that is often overlooked is the Task Scheduler. This allows you to create scheduled tasks that will run on a certain date and time. This tool has a GUI interface and a command-line interface for scheduling tasks, but it can be quite complex. Instead, we are going to use the <strong>at</strong> command, which is included with any NT-based Windows platform (NT/2000/XP/Vista/Server). This is a very basic and simple to use command-line scheduler.</p>
<p>I am writing this particular paragraph at 2:26pm. The line below will automatically send a tweet at 2:27pm. Change the time to the 24-hour value for a time that&#8217;s a few minutes into the future for you (otherwise it will send the next time 2:27pm comes around, and you might have to wait a long time to test it worked!)</p>
<div class="listing">
<pre>at 14:27 cmd /c c:\curl\twitter.bat This is a scheduled tweet!</pre>
<p><em>Listing 8 &#8211; Scheduling a tweet</em></p>
</div>
<p>The at command is quite simple, but it has some nice features that allow you to schedule tasks to run at set intervals &#8211; for example every Monday at 9.00am. For further information, see this <a title="The DOS at command" href="http://support.microsoft.com/kb/313565" target="_blank">Microsoft Knowledgebase article</a> on the at command. Note in the above example that we preceded our twitter script file with the command &#8220;cmd /c&#8221;. This might not mean anything to you, but it is required in order for the script to work, as we are running a batch file and not a regular executable. This basically tells the scheduler to start a command window, run the specified command and close the command window when done.</p>
<p>Congratulations, you now have a way of automating your tweets so that they are posted at a set date/time or even at a regular interval. It&#8217;s not the prettiest solution in the world, but it&#8217;s simple and you have probably learned a bit about the Twitter API (and batch files and the scheduling tasks!) in the process. If you have any questions or need some help with this, feel free to leave a comment and I&#8217;ll do my best to help you out!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.joelennon.ie/2009/03/27/schedule-twitter-posts/feed/</wfw:commentRss>
		<slash:comments>15</slash:comments>
		</item>
		<item>
		<title>Twitter for WordPress on 2.7</title>
		<link>http://www.joelennon.ie/2008/12/13/twitter-for-wordpress-on-27/</link>
		<comments>http://www.joelennon.ie/2008/12/13/twitter-for-wordpress-on-27/#comments</comments>
		<pubDate>Sat, 13 Dec 2008 01:14:51 +0000</pubDate>
		<dc:creator>Joe Lennon</dc:creator>
				<category><![CDATA[Tutorials]]></category>
		<category><![CDATA[WordPress]]></category>
		<category><![CDATA[bug]]></category>
		<category><![CDATA[fix]]></category>
		<category><![CDATA[plugin]]></category>
		<category><![CDATA[twitter]]></category>

		<guid isPermaLink="false">http://www.joelennon.ie/?p=168</guid>
		<description><![CDATA[Today, I upgraded my blog to WordPress 2.7, and while most of the upgrade went smoothly, I did notice that my Twitter plugin wasn&#8217;t showing new tweets anymore. I initially thought maybe it was a caching issue, or I had run out of API calls or something, but I returned hours later to find it [...]]]></description>
			<content:encoded><![CDATA[<p>Today, I upgraded my blog to WordPress 2.7, and while most of the upgrade went smoothly, I did notice that my Twitter plugin wasn&#8217;t showing new tweets anymore. I initially thought maybe it was a caching issue, or I had run out of API calls or something, but I returned hours later to find it in the same state. I tweaked with the function call to see if changing it would refresh the cache but nothing I tried made it work.  I looked for a solution on the official plugin website and on WordPress.org, but none was available, so I decided to try and fix it myself. The following will fix the bug, but it involves turning off the MagPie cache used by the fetch_rss function. I don&#8217;t really know what this means, but the cache is likely there for a reason and turning it off is probably not ideal, or recommended. However, this did get my new tweets appearing again, so it will have to do until an official fix is released.  If you want to do the same, here is how I did it:</p>
<ol>
<li>Log in to your WordPress Administration Interface (usually http://www.yoursite.com/wp-admin)</li>
<li>On the navigation bar on the left hand side of the page, click on the Arrow next to Plugins. You should see an expanded submenu.</li>
<li>From this submenu, click on &#8220;Editor&#8221; to bring up the Plugin Editor</li>
<li>You should now see a large text editor with the code for the first of your plugins showing in it (Akismet in my case). On the right hand side should be a list of plugins. Find &#8220;Twitter for WordPress&#8221; in this list and click on the link.</li>
<li>You should now be able to edit &#8220;twitter.php&#8221; in the text editor. Scroll down just below the copyright notice until you find the line:  <code>define('MAGPIE_CACHE_AGE', 120);</code></li>
<li>Add a new line under this and paste the following: <code>define('MAGPIE_CACHE_ON', false);</code></li>
<li>Click the &#8220;Update&#8221; button at the bottom of the page to update the plugin file. That&#8217;s it, your twitter plugin should now be showing new tweets once again.</li>
</ol>
<p>Note: your plugin file will need to be writable in order to perform the above procedure. If it&#8217;s not, either make it writable using an FTP client or SSH, or else simply edit the file manually by downloading it with FTP or via SSH. As I said above, this is almost definitely not the best solution to this problem, but one that should make do until an official fix is released by the plugin author.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.joelennon.ie/2008/12/13/twitter-for-wordpress-on-27/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Irish Domain Name Registration</title>
		<link>http://www.joelennon.ie/2008/12/11/irish-domain-name-registration/</link>
		<comments>http://www.joelennon.ie/2008/12/11/irish-domain-name-registration/#comments</comments>
		<pubDate>Thu, 11 Dec 2008 10:53:01 +0000</pubDate>
		<dc:creator>Joe Lennon</dc:creator>
				<category><![CDATA[Domain Names]]></category>
		<category><![CDATA[Tutorials]]></category>
		<category><![CDATA[.co.uk]]></category>
		<category><![CDATA[.com]]></category>
		<category><![CDATA[.ie]]></category>
		<category><![CDATA[.info]]></category>
		<category><![CDATA[.net]]></category>
		<category><![CDATA[.org]]></category>
		<category><![CDATA[registration]]></category>

		<guid isPermaLink="false">http://www.joelennon.ie/?p=144</guid>
		<description><![CDATA[To follow up on yesterday&#8217;s post on the different Irish companies that provide shared web hosting, I decided to put together a similar piece on Irish companies that offer domain name registration services. I have listed the companies in alphabetical order, and the minimum criteria for listing is that the company provides .ie domain name [...]]]></description>
			<content:encoded><![CDATA[<p>To follow up on yesterday&#8217;s post on the different Irish companies that provide shared web hosting, I decided to put together a similar piece on Irish companies that offer domain name registration services. I have listed the companies in alphabetical order, and the minimum criteria for listing is that the company provides .ie domain name registration.</p>
<p>Unless otherwise specified, prices are per year and include VAT @ 21.5%. Please note that all .co.uk prices are for 2 years, as this is the only registration period allowed for these domain names.</p>
<p>If your company is not listed here and you believe it should be, please leave a comment and I&#8217;ll add it to the list.</p>
<h2><strong>AlwaysAmber<br />
</strong></h2>
<p><strong>Website URL:</strong> <a title="AlwaysAmber Website" href="http://www.alwaysamber.ie/" target="_blank">http://www.alwaysamber.ie/</a><br />
<strong>Sales Email: </strong><a title="Email AlwaysAmber Sales" href="mailto:office@alwaysamber.com">office@alwaysamber.com</a><a title="Email Blacknight Sales" href="mailto:sales@blacknight.ie"><br />
</a><strong>Sales Phone (Ireland): </strong>066 916 6091<strong><br />
</strong></p>
<p><strong>.ie</strong> &#8211; €24.99 per year<br />
<strong>.co.uk</strong> &#8211; €13.98 every two years<br />
<strong>.com/.net/.org/.info</strong> &#8211; €7.49 per year</p>
<h2><strong>Blacknight Solutions<br />
</strong></h2>
<p><strong>Website URL:</strong> <a title="Blacknight Solutions Website" href="http://www.blacknight.com/" target="_blank">http://www.blacknight.com/</a><br />
<strong>Sales Email: </strong><a title="Email Blacknight Sales" href="mailto:sales@blacknight.ie">sales@blacknight.ie<br />
</a><strong>Sales Phone (Ireland): </strong>1850 929 929<br />
<strong>Sales Phone (UK):</strong> 0844 484 9361</p>
<p><strong>.ie</strong> &#8211; €30.36 per year<br />
<strong>.co.uk</strong> &#8211; €9.72 every two years<br />
<strong>.com/.net/.org/.info</strong> &#8211; €7.23 per year</p>
<h2><strong>BT Ireland<br />
</strong></h2>
<p><strong>Website URL:</strong> <a title="BT Ireland" href="http://www.btireland.ie/" target="_blank">http://www.btireland.ie/</a><a title="Email Blacknight Sales" href="mailto:sales@blacknight.ie"><br />
</a><strong>Sales Phone (Ireland): </strong>1800 924 929<strong><br />
</strong></p>
<p><strong>.ie/.co.uk/.com/.net/.org </strong>- €60.75 per year<strong><br />
</strong></p>
<h2><strong>Darklite-SCE<br />
</strong></h2>
<p><strong>Website URL:</strong> <a title="Darklite-SCE" href="http://www.darklite.ie/" target="_blank">http://www.darklite.ie/</a><br />
<strong>Sales Phone (Ireland): </strong><span class="bottom_sep">021 436 9317</span></p>
<p><strong>.ie</strong> &#8211; €54.68 per year<br />
<strong>.co.uk</strong> &#8211; €30.38 every two years<br />
<strong>.com/.net/.org/.info</strong> &#8211; €30.38 per year</p>
<h2><strong>Digiweb</strong></h2>
<p><strong>Website URL:</strong> <a title="Digiweb" href="http://hosting.digiweb.ie/" target="_blank">http://hosting.digiweb.ie/</a><strong><br />
Sales Email:</strong> <a title="Email Digiweb Sales" href="mailto:hosting@digiweb.ie">hosting@digiweb.ie</a><br />
<strong>Sales Phone (Ireland): </strong>1800 941 000<br />
<strong>Sales Phone (UK): </strong>0800 196 6436</p>
<p><strong>.ie</strong> &#8211; €36.44 per year<br />
<strong>.co.uk</strong> &#8211; €12.14 every two years<br />
<strong>.com/.net/.org/.info</strong> &#8211; €8.49 per year</p>
<h2><strong>Eircom</strong></h2>
<p><strong>Website URL:</strong> <a title="Eircom Business" href="http://business.eircom.net/" target="_blank">http://business.eircom.net/</a><strong><br />
Sales Email:</strong> <a title="Email Eircom Business Solutions" href="mailto:Business.solutions@eircom.net">Business.solutions@eircom.net</a><br />
<strong>Sales Phone (Ireland): </strong>1800 242 508<strong><br />
</strong></p>
<p><strong>.ie</strong> &#8211; €81.41 per year<br />
<strong>.co.uk</strong> &#8211; €24.30 every two years<br />
<strong>.com/.net/.org/.info</strong> &#8211; €12.15 per year</p>
<h2><strong>IrishDomains.com<br />
</strong></h2>
<p><strong>Website URL:</strong> <a title="IrishDomains.com" href="http://www.irishdomains.com/">http://www.irishdomains.com/</a><strong><br />
Sales Email:</strong> <a title="Email IrishDomains.com Sales" href="mailto:sales@irishdomains.com">sales@irishdomains.com</a><br />
<strong>Sales Phone (Ireland): </strong>1800 366 246<strong><br />
</strong></p>
<p><strong>.ie</strong> &#8211; €83.84 per year<br />
<strong>.co.uk</strong> &#8211; €11.54 every two years<br />
<strong>.com/.net/.org/.info</strong> &#8211; €11.54 per year</p>
<h2><strong>LetsHost.ie<br />
</strong></h2>
<p><strong>Website URL:</strong> <a title="LetsHost.ie" href="http://www.letshost.ie/" target="_blank">http://www.letshost.ie</a><strong><br />
Sales Email:</strong> <a title="Email Letshost Sales" href="mailto:sales@letshost.ie">sales@letshost.ie</a><br />
<strong>Sales Phone (Ireland): </strong>1890 719 461<strong><br />
</strong></p>
<p><strong>.ie</strong> &#8211; €24.29 per year<br />
<strong>.co.uk</strong> &#8211; €12.14 every two years<br />
<strong>.com/.net/.org/.info</strong> &#8211; €7.28 per year</p>
<h2><strong>MyHost.ie</strong></h2>
<p><strong>Website URL:</strong> <a title="MyHost.ie" href="http://www.myhost.ie/" target="_blank">http://www.myhost.ie/</a><strong><br />
Sales Email:</strong> <a title="Email MyHost.ie Sales" href="mailto:sales@myhost.ie">sales@myhost.ie</a><br />
<strong>Sales Phone (Ireland): </strong>061 749 922</p>
<p><strong>.ie</strong> &#8211; €36.39 per year<br />
<strong>.co.uk</strong> &#8211; €24.28 every two years<br />
<strong>.com/.net/.org/.info</strong> &#8211; €12.14 per year</p>
<h2><strong>Register365</strong></h2>
<p><strong>Website URL: </strong><a title="Register365" href="http://www.register365.com/" target="_blank">http://www.register365.com</a><br />
<strong>Sales Email:</strong> <a title="Email Register365 Sales" href="mailto:sales@register365.com">sales@register365.com</a><br />
<strong>Sales Phone (Ireland):</strong> <strong></strong>1890 944 500<br />
<strong>Sales Phone (UK):</strong> +44 1905 342 333</p>
<p><strong>.ie</strong> &#8211; €30.31 per year<br />
<strong>.co.uk</strong> &#8211; €16.89 every two years<br />
<strong>.com/.net/.org/.info</strong> &#8211; €9.66 per year</p>
<h2><strong>Register.ie<br />
</strong></h2>
<p><strong>Website URL:</strong> <a title="Register.ie" href="http://www.register.ie" target="_blank">http://www.register.ie</a><strong><br />
Sales Email:</strong> <a title="Email Register.ie Sales" href="mailto:sales@novara.ie">sales@novara.ie</a><br />
<strong>Sales Phone (Ireland): </strong>1850 668 272<strong> </strong></p>
<p><strong>.ie</strong> &#8211; €85.04 per year<br />
<strong>.co.uk</strong> &#8211; €24.28 every two years<br />
<strong>.com/.net/.org/.info</strong> &#8211; €18.21 per year</p>
<h2><strong>SpiralHosting.com<br />
</strong></h2>
<p><strong>Website URL:</strong> <a title="SprialHosting.com" href="http://www.spiralhosting.com/" target="_blank">http://www.spiralhosting.com/</a><strong><br />
Sales Email:</strong> <a title="Email SpiralHosting.com Sales" href="../2008/12/10/irish-shared-web-hosting/sales@spiralhosting.com">sales@spiralhosting.com</a><br />
<strong>Sales Phone (Ireland): </strong>01 657 1821<br />
<strong>Sales Phone (UK):</strong> 028 9002 5008</p>
<p><strong>.ie</strong> &#8211; €48.60 per year<br />
<strong>.co.uk</strong> &#8211; €17.01 every two years<br />
<strong>.com/.net/.org</strong> &#8211; €10.02 per year<br />
<strong>.info</strong> &#8211; €8.51 per year</p>
<h2><strong>WebHost.ie</strong></h2>
<p><strong>Website URL:</strong> <a title="WebHost.ie" href="http://www.webhost.ie/" target="_blank">http://www.webhost.ie/</a><strong><br />
Sales Email:</strong> <a title="Email WebHost.ie Sales" href="mailto:sales@webhost.ie">sales@webhost.ie</a><br />
<strong>Sales Phone (Ireland): </strong>01 494 8034<strong><br />
</strong></p>
<p><strong>.ie</strong> &#8211; €35.24 per year<br />
<strong>.co.uk</strong> &#8211; €24.30 every two years<br />
<strong>.com/.net/.org/.info</strong> &#8211; €10.94 per year</p>
<h2><strong>Web World</strong></h2>
<p><strong>Website URL:</strong> <a title="Web World" href="http://www.webworld.ie/" target="_blank">http://www.webworld.ie/</a><strong><br />
Sales Email:</strong> <a title="Email Web World Sales" href="mailto:sales@webworld.ie">sales@webworld.ie</a><br />
<strong>Sales Phone (Ireland): </strong>01 495 1112</p>
<p><strong>.ie</strong> &#8211; €35.24 per year<br />
<strong>.co.uk</strong> &#8211; €21.87 every two years<br />
<strong>.com/.net/.org/.info</strong> &#8211; €9.72 per year</p>
]]></content:encoded>
			<wfw:commentRss>http://www.joelennon.ie/2008/12/11/irish-domain-name-registration/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Irish Shared Web Hosting</title>
		<link>http://www.joelennon.ie/2008/12/10/irish-shared-web-hosting/</link>
		<comments>http://www.joelennon.ie/2008/12/10/irish-shared-web-hosting/#comments</comments>
		<pubDate>Wed, 10 Dec 2008 21:00:06 +0000</pubDate>
		<dc:creator>Joe Lennon</dc:creator>
				<category><![CDATA[Tutorials]]></category>
		<category><![CDATA[Web Hosting]]></category>
		<category><![CDATA[hosting]]></category>
		<category><![CDATA[irish]]></category>
		<category><![CDATA[shared]]></category>
		<category><![CDATA[web]]></category>

		<guid isPermaLink="false">http://www.joelennon.ie/?p=127</guid>
		<description><![CDATA[On a previous iteration of my blog I wrote an article on the different Irish companies that offer shared web hosting services. Many people have asked since about this article and I said I would put it back up once I got my blog sorted out. As I have decided not to port over my [...]]]></description>
			<content:encoded><![CDATA[<p>On a previous iteration of my blog I wrote an article on the different Irish companies that offer shared web hosting services. Many people have asked since about this article and I said I would put it back up once I got my blog sorted out. As I have decided not to port over my previous blog posts, I decided to create a new version of this guide.</p>
<p>The services offered and prices listed in this article were taken directly from each service provider&#8217;s website on Wednesday, 10th December 2008 at 8:51pm. The providers are listed in alphabetical order. All prices include VAT @ 21.5% unless otherwise stated. I have listed prices per month where a monthly price was available. In cases where a monthly price was not available, I have quoted prices per year.</p>
<p>If you want your company to be added to this list, or if any of the information I have listed below is incorrect, please leave a comment on this post and I will update it.</p>
<h2><strong>Blacknight Solutions</strong></h2>
<p><strong>Website URL:</strong> <a title="Blacknight Solutions Website" href="http://www.blacknight.com" target="_blank">http://www.blacknight.com/</a><br />
<strong>Sales Email: </strong><a title="Email Blacknight Sales" href="mailto:sales@blacknight.ie">sales@blacknight.ie<br />
</a><strong>Sales Phone (Ireland): </strong>1850 929 929<br />
<strong>Sales Phone (UK):</strong> 0844 484 9361</p>
<p>Blacknight offer three shared hosting packages. All of these packages offer a choice of Linux or Windows operating systems, and offer MySQL 4/5, PostgreSQL 7 and Microsoft SQL Server 2005 databases. Their Minimus package allows up to 30 databases, Medius allows 60 and Maximus allows 90. PHP support is included, and .NET 2.0/3.5 support is there on Windows packages.</p>
<p><strong>Minimus (€6.01 per month)</strong> &#8211; 10gb disk space, 100gb/mo bandwidth, unlimited email accounts<br />
<strong>Medius (€10.87 per month) </strong>- 20gb disk space, 200gb/mo bandwidth, unlimited email accounts<br />
<strong>Maximus (€18.16 per month) </strong>-<strong> </strong>30gb disk space, 300gb/mo bandwidth, unlimited email accounts</p>
<h2><strong>Darklite-SCE<br />
</strong></h2>
<p><strong>Website URL:</strong> <a title="Darklite-SCE" href="http://www.darklite.ie/" target="_blank">http://www.darklite.ie/</a><br />
<strong>Sales Phone (Ireland): </strong><span class="bottom_sep">021 436 9317</span><strong><br />
</strong><strong> </strong></p>
<p>Darklite-SCE offer Linux and Windows web hosting. All of their plans come with MySQL databases included, and their Windows Business and Windows Enterprise include a Microsoft SQL Server database also. On their Linux platforms PHP and Perl is supported, and on their Windows packages is support for .NET 2.0.</p>
<p><strong>Personal (€4.80 per month)</strong> &#8211; 200mb disk space, 3gb/mo bandwidth, 100 email accounts<br />
<strong>Basic (€15.19 per month)</strong> &#8211; 500mb disk space, 10gb/mo bandwidth, 250 email accounts<br />
<strong>Business (€30.38 per month) </strong>- 1gb disk space, 20gb/mo bandwidth, 500 email accounts<br />
<strong>Enterprise (€42.53 per month) </strong>- 5gb disk space, 50gb/mo bandwidth, 1000 email accounts</p>
<h2><strong>Digiweb</strong></h2>
<p><strong>Website URL:</strong> <a title="Digiweb" href="http://hosting.digiweb.ie/" target="_blank">http://hosting.digiweb.ie/</a><strong><br />
Sales Email:</strong> <a title="Email Digiweb Sales" href="mailto:hosting@digiweb.ie">hosting@digiweb.ie</a><br />
<strong>Sales Phone (Ireland): </strong>1800 941 000<br />
<strong>Sales Phone (UK): </strong>0800 196 6436</p>
<p>Digiweb offer four shared web hosting packages, with prices varying from €24.29 per year to €364.49 per year. With the exception of the Starter Hosting package, all of Digiweb&#8217;s hosting plans offer a choice of Windows or Linux operating systems, PHP and MySQL support on Linux, and ASP.NET and Microsoft SQL Server 2005 support on Windows. There is no option to pay monthly for the StarterHosting or AdvancedHosting packages.</p>
<p><strong>Starter Hosting (€24.29 per year)</strong> &#8211; 10gb disk space, 30gb/mo bandwidth, 50 email accounts<br />
<strong>Advanced Hosting (€48.59 per year)</strong> &#8211; 15gb disk space, 100gb/mo bandwidth, 250 email accounts<br />
<strong>Business Hosting (€12.14 per month) </strong>- 20gb disk space, 150gb/mo bandwidth, 500 email accounts<br />
<strong>Enterprise Hosting (€36.44 per month) </strong>- 30gb disk space, 250gb/mo bandwidth, unlimited email accounts</p>
<h2><strong>Host.ie</strong></h2>
<p><strong>Website URL:</strong> <a title="Host.ie" href="http://www.host.ie/" target="_blank">http://www.host.ie/</a><strong><br />
Sales Email:</strong> <a title="Email Host.ie Sales" href="mailto:sales@novara.ie">sales@novara.ie</a><br />
<strong>Sales Phone (Ireland): </strong>1850 668 272<strong><br />
</strong></p>
<p>Host.ie (a division of Novara.ie) offers six different shared hosting plans. Three of these are Linux-based packages, and three are Windows-based packages. The Linux packages feature support for PHP and Perl, and in the case of the Business and Professional variants, also include 5 and 10 MySQL databases, respectively. Their Windows packages feature ASP.NET 2.0 support and Microsoft SQL Server 2000 database support is an optional extra on the Business and Professional variants (though MySQL databases are included with these packages, as per the Linux packages). If you choose to pay for a Host.ie package on a monthly basis, a setup fee will apply. At the time of writing, there appeared to be no option to pay monthly for Linux packages listed on their website.</p>
<p><strong>Linux Basic (€121.49 per year)</strong> &#8211; 150mb disk space, 3gb/mo bandwidth, 150 email accounts<br />
<strong>Linux Business (€242.99 per year)</strong> &#8211; 300mb disk space, 5gb/mo bandwidth, 300 email accounts<br />
<strong>Linux Professional (€364.49 per year) </strong>- 500mb disk space, 8gb/mo bandwidth, 500 email accounts<br />
<strong>Windows Basic (€12.14 per month) </strong>- 150mb disk space, 3gb/mo bandwidth, 150 email accounts<br />
<strong>Windows Business (€24.29 per month) </strong>- 300mb disk space, 5gb/mo bandwidth, 300 email accounts<br />
<strong>Windows Professional (€36.45 per month) </strong>- 500mb disk space, 8gb/mo bandwidth, 500 email accounts</p>
<h2><strong>HostIreland<br />
</strong></h2>
<p><strong>Website URL:</strong> <a title="HostIreland" href="http://stresa.hostireland.com/" target="_blank">http://stresa.hostireland.com/</a><strong><br />
Sales Email:</strong> <a title="Email HostIreland Sales" href="mailto:sales@hostireland.com">sales@hostireland.com</a><br />
<strong>Sales Phone (Ireland): </strong>1800 925 262<strong> </strong></p>
<p>HostIreland have two hosting packages on offer &#8211; the Clubman and the Business Premier. HostIreland&#8217;s plans run on Linux servers and feature PHP and Perl support with unlimited MySQL databases included in both hosting packages. HostIreland&#8217;s website only shows prices per year.</p>
<p><strong>Clubman Plan (€115.36 per year)</strong> &#8211; 1gb disk space, Bandwidth not specified, 100 email accounts<br />
<strong>Business Premium Plan (€182.19 per year)</strong> &#8211; 1gb disk space, unlimited bandwidth, 100 email accounts</p>
<h2><strong>IEInternet.com</strong></h2>
<p><strong>Website URL:</strong> <a title="IEInternet.com" href="http://www.ieinternet.com/" target="_blank">http://www.ieinternet.com/</a><strong><br />
Sales Email:</strong> <a title="Email IEInternet.com Sales" href="mailto:sales@ieinternet.com">sales@ieinternet.com</a><br />
<strong>Sales Phone (Ireland): </strong>01 280 5000<strong> </strong></p>
<p>IEInternet.com have four hosting plans available, three of which run on Linux servers along with a single Windows-based option. IEInternet do not quote any prices per month on their website. PHP and Perl are supported on all three of their Linux plans, and MySQL databases are included with their Business and Application plans. The Windows plan includes support for ASP and support for Microsoft SQL Server databases. There are no SQL Server databases included with the plan, however &#8211; these are available as an optional extra.</p>
<p><strong>SOHO (€138.51 per year)</strong> &#8211; 20mb disk space, 1gb/mo bandwidth, 1 email account<br />
<strong>Business (€291.60 per year)</strong> &#8211; 100mb disk space, 2gb/mo bandwidth, 20 email accounts<br />
<strong>Windows (€291.60 per year) </strong>- 50mb disk space, 2gb/mo bandwidth, 1 email account<br />
<strong>Application (€554.04 per year) </strong>- 250mb disk space, 4gb/mo bandwidth, 100 email accounts</p>
<h2><strong>IrishDomains.com<br />
</strong></h2>
<p><strong>Website URL:</strong> <a title="IrishDomains.com" href="http://www.irishdomains.com/">http://www.irishdomains.com/</a><strong><br />
Sales Email:</strong> <a title="Email IrishDomains.com Sales" href="mailto:sales@irishdomains.com">sales@irishdomains.com</a><br />
<strong>Sales Phone (Ireland): </strong>1800 366 246<strong><br />
</strong></p>
<p>IrishDomains.com offer four Linux-based shared hosting packages. All of their packages offer PHP and Perl support. Their Business 10, Advanced 15 and Developer 25 packages all come with unlimited MySQL databases. MySQL is an optional extra on the Starter 5 package. At the time of writing, there did not appear to be an option to pay on a monthly basis.</p>
<p><strong>Linux Starter 5 (€181.04 per year)</strong> &#8211; 1gb disk space, 10gb/mo bandwidth, 50 email accounts<br />
<strong>Linux Business 10 (€241.79 per year)</strong> &#8211; 2.5gb disk space, 15gb/mo bandwidth, 100 email accounts<br />
<strong>Linux Advanced 15 (€363.29 per year) </strong>- 5gb disk space, 20gb/mo bandwidth, 150 email accounts<br />
<strong>Linux Developer 25 (€606.29 per year) </strong>- 10gb disk space, 25gb/mo bandwidth, 250 email accounts</p>
<h2><strong>LetsHost.ie</strong></h2>
<p><strong>Website URL:</strong> <a title="LetsHost.ie" href="http://www.letshost.ie/" target="_blank">http://www.letshost.ie</a><strong><br />
Sales Email:</strong> <a title="Email Letshost Sales" href="mailto:sales@letshost.ie">sales@letshost.ie</a><br />
<strong>Sales Phone (Ireland): </strong>1890 719 461<strong><br />
</strong></p>
<p>LetsHost.ie offer one main shared hosting packages, the Lets Host &#8220;Complete&#8221; Plan. This hosting plan is offered on a Linux platform and includes PHP support, SSH access and unlimited MySQL databases.</p>
<p><strong>Lets Host &#8220;Complete&#8221; Plan (€9.60 per month)</strong> &#8211; 12gb disk space, 100gb/mo bandwidth, unlimited email accounts</p>
<h2><strong>MyHost.ie</strong></h2>
<p><strong>Website URL:</strong> <a title="MyHost.ie" href="http://www.myhost.ie/" target="_blank">http://www.myhost.ie/</a><strong><br />
Sales Email:</strong> <a title="Email MyHost.ie Sales" href="mailto:sales@myhost.ie">sales@myhost.ie</a><br />
<strong>Sales Phone (Ireland): </strong>061 749 922<strong> </strong></p>
<p>MyHost.ie offer four shared web hosting packages, two Personal oriented plans and two Business oriented plans. All of MyHost.ie&#8217;s plans are available on either a Windows or Linux platform. Depending on your OS choice, standard features include PHP and Perl support (Linux) and ASP.NET support (Windows). All packages comes with MySQL databases, and the Windows Personal Pro, Business Basic and Business Pro plans all come with Microsoft SQL Server databases included. The Personal Mini plan does not have an option to pay monthly.</p>
<p><strong>Personal Mini (€60.69 per year)</strong> &#8211; 500mb disk space, 5gb/mo bandwidth, 25 email accounts<br />
<strong>Personal Pro (€17.62 per month)</strong> &#8211; 3gb disk space, 50gb/mo bandwidth, 300 email accounts<br />
<strong>Business Basic (€22.48 per month) </strong>- 5gb disk space, 75gb/mo bandwidth, 150 email accounts<br />
<strong>Business Pro (€36.45 per month) </strong>- 10gb disk space, 100gb/mo bandwidth, 300 email accounts</p>
<h2><strong>Register365</strong></h2>
<p><strong>Website URL:</strong> <a title="Register365" href="http://www.register365.com/" target="_blank">http://www.register365.com/</a><strong><br />
Sales Email:</strong> <a title="Email Register365 Sales" href="mailto:sales@register365.com">sales@register365.com</a><br />
<strong>Sales Phone (Ireland): </strong>1890 944 500<br />
<strong>Sales Phone (UK): </strong>+44 1905 342 333</p>
<p>Register365 offer four shared web hosting packages. These are split into two Windows hosting packages and two Unix hosting packages. Their Windows packages feature unlimited MySQL, PostgreSQL and Microsoft SQL Server databases, and include support for ASP.NET 2.0 and PHP on an IIS6 web server. Their Unix packages offer unlimited MySQL and PostgreSQL databases with support for PHP and Perl on an Apache web server. Their Enterprise packages include a dedicated IP address.</p>
<p><strong>Windows Business (€4.80 per month)</strong> &#8211; 5gb disk space, 50gb/mo bandwidth, 250 email accounts<br />
<strong>Unix Business (€4.80 per month)</strong> &#8211; 5gb disk space, 50gb/mo bandwidth, 250 email accounts<br />
<strong>Windows Enterprise (€12.09 per month) </strong>- 10gb disk space, 100gb/mo bandwidth, 250 email accounts<br />
<strong>Unix Enterprise (€12.09 per month) </strong>- 10gb disk space, 100gb/mo bandwidth, 250 email accounts</p>
<h2><strong>SpiralHosting.com<br />
</strong></h2>
<p><strong>Website URL:</strong> <a title="SprialHosting.com" href="http://www.spiralhosting.com/" target="_blank">http://www.spiralhosting.com/</a><strong><br />
Sales Email:</strong> <a title="Email SpiralHosting.com Sales" href="sales@spiralhosting.com">sales@spiralhosting.com</a><br />
<strong>Sales Phone (Ireland): </strong>01 657 1821<br />
<strong>Sales Phone (UK):</strong> 028 9002 5008<strong> </strong></p>
<p>SprialHosting.com offer five shared web hosting packages, each with support for PHP, Perl and Ruby on Rails. Their packages include between 2 and 20 MySQL databases. Their Size XS plan does not have a monthly payment option.</p>
<p><strong>Size XS (€30.00 per year)</strong> &#8211; 1gb disk space, 10gb/mo bandwidth, 125 email accounts<br />
<strong>Size S (€8.00 per month)</strong> &#8211; 2gb disk space, 20gb/mo bandwidth, 250 email accounts<br />
<strong>Size M (€19.95 per month) </strong>- 4gb disk space, 40gb/mo bandwidth, 500 email accounts<br />
<strong>Size L (€29.95 per month) </strong>- 8gb disk space, 80gb/mo bandwidth, 1000 email accounts<br />
<strong>Size XL (€39.95 per month)</strong> &#8211; 12gb disk space, 120gb/mo bandwidth, 2000 email accounts</p>
<h2><strong>WebHost.ie</strong></h2>
<p><strong>Website URL:</strong> <a title="WebHost.ie" href="http://www.webhost.ie/" target="_blank">http://www.webhost.ie/</a><strong><br />
Sales Email:</strong> <a title="Email WebHost.ie Sales" href="mailto:sales@webhost.ie">sales@webhost.ie</a><br />
<strong>Sales Phone (Ireland): </strong>01 494 8034<strong><br />
</strong></p>
<p>WebHost.ie offer shared web hosting packages on a Windows Server 2003 platform. All WebHost.ie&#8217;s packages feature a dedicated IP address, ASP.NET 3.5 support, PHP and Perl support, MySQL and Micorosoft SQL Server 2005 databases.</p>
<p><strong>Budget Hosting (€10.81 per month)</strong> &#8211; 600mb disk space, 10gb/mo bandwidth, 300 email accounts<br />
<strong>Basic Hosting (€18.10 per month)</strong> &#8211; 1.2gb disk space, 15gb/mo bandwidth, 400 email accounts<br />
<strong>Business Hosting (€24.18 per month) </strong>- 1.8gb disk space, 20gb/mo bandwidth, 500 email accounts<br />
<strong>Professional Hosting (€30.25 per month) </strong>- 2.5gb disk space, 25gb/mo bandwidth, unlimited email accounts</p>
<h2><strong>Web World</strong></h2>
<p><strong>Website URL:</strong> <a title="Web World" href="http://www.webworld.ie/" target="_blank">http://www.webworld.ie/</a><strong><br />
Sales Email:</strong> <a title="Email Web World Sales" href="mailto:sales@webworld.ie">sales@webworld.ie</a><br />
<strong>Sales Phone (Ireland): </strong>01 495 1112<strong><br />
</strong></p>
<p>Web World offer four shared hosting packages, including from 25 to 100 MySQL databases, PHP, Perl and ASP.NET support. Microsoft SQL Server 2000 database support is available as an optional extra. If you want to pay monthly for a Web World hosting package you will need to pay a €15 setup fee.</p>
<p><strong>Value (€4.80 per month)</strong> &#8211; 25gb disk space, 25gb/mo bandwidth, 250 email accounts<br />
<strong>Enterprise (€12.09 per month)</strong> &#8211; 50gb disk space, 50gb/mo bandwidth, 500 email accounts<br />
<strong>Business (€18.16 per month) </strong>- 75gb disk space, 75gb/mo bandwidth, 750 email accounts<br />
<strong>E-Commerce (€24.24 per month) </strong>- 100gb disk space, 100gb/mo bandwidth, unlimited email accounts</p>
]]></content:encoded>
			<wfw:commentRss>http://www.joelennon.ie/2008/12/10/irish-shared-web-hosting/feed/</wfw:commentRss>
		<slash:comments>7</slash:comments>
		</item>
		<item>
		<title>Install Apache and mod_owa</title>
		<link>http://www.joelennon.ie/2008/12/09/install-apache-mod-owa/</link>
		<comments>http://www.joelennon.ie/2008/12/09/install-apache-mod-owa/#comments</comments>
		<pubDate>Tue, 09 Dec 2008 14:26:09 +0000</pubDate>
		<dc:creator>Joe Lennon</dc:creator>
				<category><![CDATA[Oracle]]></category>
		<category><![CDATA[Tutorials]]></category>
		<category><![CDATA[10g]]></category>
		<category><![CDATA[apache]]></category>
		<category><![CDATA[database]]></category>
		<category><![CDATA[mod_owa]]></category>
		<category><![CDATA[plsql]]></category>
		<category><![CDATA[xe]]></category>

		<guid isPermaLink="false">http://www.joelennon.ie/?p=6</guid>
		<description><![CDATA[In order to develop PL/SQL applications on Oracle XE, we are going to need to install a web server (Apache) and a PL/SQL gateway for Apache called mod_owa. On a regular Oracle Application Server you would probably be using Oracle HTTP Server (a modified Apache) and mod_plsql, amd you should also be able to follow [...]]]></description>
			<content:encoded><![CDATA[<p><span style="color: #993300;"> </span><span style="color: #993300;"><strong></strong></span>In order to develop PL/SQL applications on Oracle XE, we are going to need to 		install a web server (Apache) and a PL/SQL gateway for Apache called mod_owa. On 		a regular Oracle Application Server you would probably be using Oracle HTTP Server 		(a modified Apache) and mod_plsql, amd you should also be able to follow my future 		tutorials if you have this type of setup.</p>
<p>Once again I will be assuming throughout this guide that you have followed my 		Oracle XE installation tutorial. If you didn&#8217;t, you may need to change usernames, 		passwords and service names to fit your setup. I will be walking through the setup 		process on a Windows XP machine, but it should be similar on another Windows version. 		Let&#8217;s get started!</p>
<p><strong>IMPORTANT  NOTE: If you are looking for the download for mod_owa, please note that  the website for it has moved since this blog post was originally  written. You can now find mod_owa on the Oracle OSS website at the  following URL: </strong><strong><a href="http://oss.oracle.com/projects/mod_owa/dist/documentation/modowa.htm" target="_blank">http://oss.oracle.com/projects/mod_owa/dist/documentation/modowa.htm</a>. I have updated this blog post to reflect this change.</strong></p>
<p>The first thing you&#8217;ll need to do is download the relevant software. The easiest 		way to install Apache is to download and run the installer binary from the Apache 		website. At the time of writing, the latest stable version of Apache available is 		2.2.9, but again the process should be similar for whatever version you are 		installing. You can download Apache from <a title="Download Apache HTTP Server" href="http://httpd.apache.org/download.cgi" target="_blank">http://httpd.apache.org/download.cgi</a>. 		You will also need to grab the Apache PL/SQL Gateway Module (mod_owa) from <a href="http://oss.oracle.com/projects/mod_owa/dist/documentation/modowa.htm" target="_blank">http://oss.oracle.com/projects/mod_owa/dist/documentation/modowa.htm</a>. Click on the link for &#8220;Zip 		file for Windows&#8221;, which includes the source code and binaries for the Windows 		version of Apache.</p>
<p>The first stage in setting up our PL/SQL web development environment is the installation 		of the Apache web server. To start the installation, run the installer package you downloaded 		earlier (the filename should be something like apache_2.2.9-win32-x86-no_ssl-r2.msi). 		The screen should look similar to the one in Figure 3a below:</p>
<div id="attachment_90" class="wp-caption aligncenter" style="width: 510px"><a href="http://www.joelennon.ie/wp-content/uploads/2008/12/figure03a.png"><img class="size-full wp-image-90" title="Figure 3a - Apache HTTP Server 2.2 Installation Wizard" src="http://www.joelennon.ie/wp-content/uploads/2008/12/figure03a.png" alt="Figure 3a - Apache HTTP Server 2.2 Installation Wizard" width="500" height="378" /></a><p class="wp-caption-text">Figure 3a - Apache HTTP Server 2.2 Installation Wizard</p></div>
<p>Click &#8220;Next &gt;&#8221; to continue. On the screen that follows, read the 		license agreement and if you are happy with the terms, select &#8220;I accept the terms 		in the license agreement&#8221; and click &#8220;Next &gt;&#8221; to move on to the readme 		screen, from which you can simply press &#8220;Next &gt;&#8221; again. You should now 		be presented with the following screen:</p>
<div id="attachment_91" class="wp-caption aligncenter" style="width: 510px"><a href="http://www.joelennon.ie/wp-content/uploads/2008/12/figure03b.png"><img class="size-full wp-image-91" title="Figure 3b - Apache HTTP Server 2.2 Installer - Server Information" src="http://www.joelennon.ie/wp-content/uploads/2008/12/figure03b.png" alt="Figure 3b - Apache HTTP Server 2.2 Installer - Server Information" width="500" height="378" /></a><p class="wp-caption-text">Figure 3b - Apache HTTP Server 2.2 Installer - Server Information</p></div>
<p>Unless you are installing Apache for production use, it doesn&#8217;t matter too much 		what you enter into Network Domain, Server Name or Administrator&#8217;s email, but be sure 		to select the option to Install Apache &#8220;for All Users, on Port 80, as a Service&#8221;. 		Installing on Port 8080 would likely cause a conflict between Apache and the Application 		Express software that comes with Oracle XE, which runs on port 8080. As soon as you are 		ready, click &#8220;Next &gt;&#8221; to continue.</p>
<div id="attachment_92" class="wp-caption aligncenter" style="width: 510px"><a href="http://www.joelennon.ie/wp-content/uploads/2008/12/figure03c.png"><img class="size-full wp-image-92" title="Figure 3c - Apache HTTP Server 2.2 Setup Type" src="http://www.joelennon.ie/wp-content/uploads/2008/12/figure03c.png" alt="Figure 3c - Apache HTTP Server 2.2 Setup Type" width="500" height="378" /></a><p class="wp-caption-text">Figure 3c - Apache HTTP Server 2.2 Setup Type</p></div>
<p>On the &#8220;Setup Type&#8221; screen, you can safely leave the default option of 		&#8220;Typical&#8221; selected and click &#8220;Next &gt;&#8221; to continue with the 		installation. Advanced users may wish to tweak their installation using the Custom 		option, but for the sake of this tutorial, there is no need to do so.</p>
<div id="attachment_93" class="wp-caption aligncenter" style="width: 510px"><a href="http://www.joelennon.ie/wp-content/uploads/2008/12/figure03d.png"><img class="size-full wp-image-93" title="Figure 3d - Apache HTTP Server 2.2 Destination Folder" src="http://www.joelennon.ie/wp-content/uploads/2008/12/figure03d.png" alt="Figure 3d - Apache HTTP Server 2.2 Destination Folder" width="500" height="378" /></a><p class="wp-caption-text">Figure 3d - Apache HTTP Server 2.2 Destination Folder</p></div>
<p>The Apache installer will now ask you where to install Apache on your hard disk. 		By default Apache is installed into a subfolder of the Program Files folder, but I 		find it easier to install Apache into a folder just beneath the root of the C drive, 		which I usually name &#8220;httpd&#8221;. You can safely accept the default destination, 		but from here on I will refer to all Apache configuration files as if you chose to 		install to C:\httpd\. To install to this directory, click on the &#8220;Change&#8221; 		button as in Figure 3d, which should popup a screen like the one in Figure 3e. In the 		textbox for Folder Name, enter C:\httpd\ and click &#8220;OK&#8221;. This will close the 		popup window and return you to the screen shown in Figure 3d. You can now click on &#8220;Next &gt;&#8221;.</p>
<div id="attachment_94" class="wp-caption aligncenter" style="width: 510px"><a href="http://www.joelennon.ie/wp-content/uploads/2008/12/figure03e.png"><img class="size-full wp-image-94" title="Figure 3e - Apache HTTP Server 2.2 - Change Current Destination Folder" src="http://www.joelennon.ie/wp-content/uploads/2008/12/figure03e.png" alt="Figure 3e - Apache HTTP Server 2.2 - Change Current Destination Folder" width="500" height="378" /></a><p class="wp-caption-text">Figure 3e - Apache HTTP Server 2.2 - Change Current Destination Folder</p></div>
<p>You can now safely click on the &#8220;Install&#8221; button, which will start the installation 		process. This should not take long, especially if you are using a modern PC. During the 		installation you should see a screen similar to that in Figure 3f below.</p>
<div id="attachment_95" class="wp-caption aligncenter" style="width: 510px"><a href="http://www.joelennon.ie/wp-content/uploads/2008/12/figure03f.png"><img class="size-full wp-image-95" title="Figure 3f - Installing Apache HTTP Server 2.2.9" src="http://www.joelennon.ie/wp-content/uploads/2008/12/figure03f.png" alt="Figure 3f - Installing Apache HTTP Server 2.2.9" width="500" height="378" /></a><p class="wp-caption-text">Figure 3f - Installing Apache HTTP Server 2.2.9</p></div>
<p>When the installation has completed, simply click the &#8220;Finish&#8221; button to exit 		the installer. You should now have a new icon in your system tray, like the one highlighted 		in Figure 3g. It should have a tiny green play symbol in it. If it has a red square stop 		symbol instead, left-click on the icon, and from the Apache2.2 menu, click &#8220;Start&#8221; 		to start the Apache service.</p>
<div id="attachment_96" class="wp-caption aligncenter" style="width: 253px"><a href="http://www.joelennon.ie/wp-content/uploads/2008/12/figure03g.png"><img class="size-full wp-image-96" title="Figure 3g - Apache icon in System Tray" src="http://www.joelennon.ie/wp-content/uploads/2008/12/figure03g.png" alt="Figure 3g - Apache icon in System Tray" width="243" height="23" /></a><p class="wp-caption-text">Figure 3g - Apache icon in System Tray</p></div>
<p>Before we move on to installing mod_owa, we will first check that Apache is up and 		running and functioning correctly. To do so, open your favourite web browser (I use 		Firefox), enter <a title="Your Apache Web Server" href="http://localhost/" target="_blank">http://localhost/</a> in the address bar and press enter. If Apache is 		working, you will see a message like in Figure 3h:</p>
<div id="attachment_97" class="wp-caption aligncenter" style="width: 510px"><a href="http://www.joelennon.ie/wp-content/uploads/2008/12/figure03h.png"><img class="size-full wp-image-97" title="Figure 3h - Apache Test Page - It Works!" src="http://www.joelennon.ie/wp-content/uploads/2008/12/figure03h.png" alt="Figure 3h - Apache Test Page - It Works!" width="500" height="366" /></a><p class="wp-caption-text">Figure 3h - Apache Test Page - It Works!</p></div>
<p>Now that we have Apache up and running, it is time to install our PL/SQL gateway, 		mod_owa. The first thing we need to do is to unzip the archive we downloaded earlier, 		usually named <strong>windows_all.zip</strong>. You don&#8217;t need to worry about where you extract the 		files to, as we are only really interested in one of them. When the archive has extracted, 		open the folder you extracted them, and go into the modowa folder. From here, double 		click on apache22 and right-click on mod_owa.dll and click <strong>Copy</strong>.</p>
<p>We will now paste this into the <strong>modules</strong> folder under the Apache 		installation directory. Hold down the Windows key and press R to open the Run dialog 		and enter <strong>C:\httpd\modules\</strong> as shown in Figure 3i:</p>
<div id="attachment_98" class="wp-caption aligncenter" style="width: 357px"><a href="http://www.joelennon.ie/wp-content/uploads/2008/12/figure03i.png"><img class="size-full wp-image-98" title="Figure 3i - Open Apache modules folder" src="http://www.joelennon.ie/wp-content/uploads/2008/12/figure03i.png" alt="Figure 3i - Open Apache modules folder" width="347" height="180" /></a><p class="wp-caption-text">Figure 3i - Open Apache modules folder</p></div>
<p>This will open the modules folder. Go to the Edit menu and click on Paste to put 		a copy of the mod_owa.dll file here. Now that we have stored the module DLL file, 		we now need to tell Apache to load this module into the web server and set up a new 		Apache Location, which will act like an Oracle Document Access Descriptor (DAD) from 		where we can run our PL/SQL web applications. If none of this makes any sense to you 		at this point, don&#8217;t worry about it, just follow the instructions closely and you&#8217;ll 		be fine.</p>
<p>To open the Apache configuration file (httpd.conf) open the Run dialog once again 		(Windows+R or Start-&gt;Run). This time, enter <strong>notepad c:\httpd\conf\httpd.conf</strong> and click 		the OK button. Notepad should launch, with the Apache config file opened and ready 		for editing. Scroll down to the bottom of this file (or hold down the Ctrl button and 		press the End button) and below all other code, insert the text from listing 3a:</p>
<div class="listing">
<pre>LoadModule owa_module modules/mod_owa.dll

&lt;Location /somando&gt;
    AllowOverride  None
    Options        None
    SetHandler     owa_handler
    OwaUserid      somando/somando1
    OwaNLS         WE8ISO8859P1
    OwaDiag        COMMAND ARGS CGIENV POOL SQL MEMORY
    OwaLog         "/usr/local/apache/logs/mod_owa.log"
    OwaPool        20
    OwaStart       "doc_pkg.homepage"
    OwaDocProc     "doc_pkg.readfile"
    OwaDocPath     docs
    OwaUploadMax   10M
    OwaCharset     "iso-8859-1"
    order          deny,allow
    allow          from all
&lt;/Location&gt;
/</pre>
<p><em>Listing 3a: mod_owa Options for Apache&#8217;s httpd.conf</em></p>
</div>
<p>When you have added the text above to your httpd.conf file, save the file, and on the 		Apache icon in your system tray, left-click and from the Apache2.2 menu choose the &#8220;Restart&#8221; 		option to restart the Apache service. If all has gone well, Apache will restart just fine 		and you will have a play icon in your system tray icon once again. If you did not follow my 		guide to install Oracle XE, you will need to change the OwaUserid parameter in the text 		above to your own database&#8217;s connect identifier.</p>
<p>Once Apache has been restarted, mod_owa should now be running from 		<a href="http://localhost/somando" target="_blank">http://localhost/somando</a>. To test 		this, enter that address into your favourite web browser, and if mod_owa was installed you 		should see an error message like the one displayed in Figure 3j. If you see a different error 		message, you may not have installed mod_owa correctly.</p>
<p>The final thing we are going to do to make sure our Apache+PL/SQL setup is working 		correctly is create a sample application which performs a database <strong>SELECT</strong> and 		displays the output in a HTML table. Before we create the PL/SQL procedure to do this, let&#8217;s 		run the query from the SQL*Plus command line to see what data we should expect to appear in 		our sample app. To open SQL*Plus, go to Start -&gt; Programs -&gt; Oracle Database 10g Express 		Edition -&gt; Run SQL Command Line. When the command line appears log on by typing <strong>CONNECT</strong> and pressing Enter. When prompted, enter your database username and password (Username: 		somando Password: somando1 if you followed our Oracle XE installation guide) and as soon 		as you are connected, enter the SQL statement from Listing 3b to query the database.</p>
<div class="listing">
<pre><span class="keyword">SELECT INITCAP</span>(<span class="keyword">LOWER</span>(object_type)) type, <span class="keyword">COUNT</span>(*) count
<span class="keyword">FROM</span> all_objects
<span class="keyword">GROUP BY</span> object_type;</pre>
<p><em>Listing 3b: Query all_objects table by object_type</em></p>
</div>
<p>You should see a result similar to that illustrated in Figure 3j:</p>
<div id="attachment_99" class="wp-caption aligncenter" style="width: 510px"><a href="http://www.joelennon.ie/wp-content/uploads/2008/12/figure03j.png"><img class="size-full wp-image-99" title="Figure 3j - Executed SQL Statement" src="http://www.joelennon.ie/wp-content/uploads/2008/12/figure03j.png" alt="Figure 3j - Executed SQL Statement" width="500" height="448" /></a><p class="wp-caption-text">Figure 3j - Executed SQL Statement</p></div>
<p>Now we are going to create a PL/SQL procedure that will output this data to a 		HTML table that we can access using our web browser. From the SQL Command Line, 		enter the command <strong>ed test_page</strong>. Notepad will open and say that 		it cannot find the test_page.sql file, asking if you would like to create a new 		file. Click on the &#8220;Yes&#8221; button, and paste the text from Listing 3c 		into the Notepad window:</p>
<div class="listing">
<pre><span class="keyword">CREATE OR REPLACE PROCEDURE</span> test_page <span class="keyword">IS</span>
    <span class="keyword">CURSOR</span> get_data <span class="keyword">IS</span>
        <span class="keyword">SELECT INITCAP</span>(<span class="keyword">LOWER</span>(object_type)) type, <span class="keyword">COUNT</span>(*) count
        <span class="keyword">FROM</span> all_objects
        <span class="keyword">GROUP BY</span> object_type;
<span class="keyword">BEGIN</span>
    htp.p('&lt;table border="1"&gt;');
    htp.p('&lt;tr&gt;&lt;th&gt;Type:&lt;/th&gt;&lt;th&gt;Count:&lt;/th&gt;&lt;/tr&gt;');
    <span class="keyword">FOR</span> i <span class="keyword">IN</span> get_data <span class="keyword">LOOP</span>
        htp.p('&lt;tr&gt;&lt;td&gt;'||i.type||'&lt;/td&gt;&lt;td&gt;'||i.count||'&lt;/td&gt;&lt;/tr&gt;');
    <span class="keyword">END LOOP</span>;
    htp.p('&lt;/table&gt;');
<span class="keyword">END</span> test_page;
/</pre>
<p><em>Listing 3c: Create test_page PL/SQL Procedure</em></p>
</div>
<p>When you have pasted the above code into Notepad, click on File -&gt; Save and 		then quit Notepad. Back in the SQL Command Line, you should have an SQL prompt. Here, 		enter the command @test_page to run the script we just created. If all goes according 		to plan, you should see a message &#8220;Procedure created&#8221;. We can now test this procedure 		from our web browser by navigating to <a title="Your PL/SQL Web Application in Action" href="http://localhost/somando/test_page" target="_blank">http://localhost/somando/test_page</a> which should display something 		like what you see in Figure 3k below:</p>
<div id="attachment_100" class="wp-caption aligncenter" style="width: 510px"><a href="http://www.joelennon.ie/wp-content/uploads/2008/12/figure03k.png"><img class="size-full wp-image-100" title="Figure 3k - Our sample PL/SQL web application" src="http://www.joelennon.ie/wp-content/uploads/2008/12/figure03k.png" alt="Figure 3k - Our sample PL/SQL web application" width="500" height="624" /></a><p class="wp-caption-text">Figure 3k - Our sample PL/SQL web application</p></div>
<p>That&#8217;s it! You are now ready to start developing PL/SQL web applications. 		In our next tutorial I will look at installing Oracle SQL Developer and how to 		set up a development environment for PL/SQL web application programming. Very 		shortly I will be writing tutorials on creating some neat web applications in 		PL/SQL.</p>
<blockquote><p>Click <a title="Install Apache and mod_owa (PDF)" href="http://www.joelennon.ie/wp-content/uploads/2008/12/install-apache-plsql.pdf" target="_blank">here</a> to view 		a printer friendly version of this tutorial. To download this tutorial to disk, right 		click <a title="Install Apache and mod_owa (PDF)" href="http://www.joelennon.ie/wp-content/uploads/2008/12/install-apache-plsql.pdf" target="_blank">here</a> and choose &#8220;Save Target As&#8221; or 		&#8220;Save Link As&#8221;. You will need Adobe Reader to open this file.</p></blockquote>
]]></content:encoded>
			<wfw:commentRss>http://www.joelennon.ie/2008/12/09/install-apache-mod-owa/feed/</wfw:commentRss>
		<slash:comments>13</slash:comments>
		</item>
		<item>
		<title>Oracle Database Basics</title>
		<link>http://www.joelennon.ie/2008/12/09/oracle-database-basics/</link>
		<comments>http://www.joelennon.ie/2008/12/09/oracle-database-basics/#comments</comments>
		<pubDate>Tue, 09 Dec 2008 12:28:03 +0000</pubDate>
		<dc:creator>Joe Lennon</dc:creator>
				<category><![CDATA[Oracle]]></category>
		<category><![CDATA[Tutorials]]></category>
		<category><![CDATA[10g]]></category>
		<category><![CDATA[application express]]></category>
		<category><![CDATA[database]]></category>
		<category><![CDATA[sqlplus]]></category>

		<guid isPermaLink="false">http://www.joelennon.ie/?p=4</guid>
		<description><![CDATA[In this tutorial, I will be looking at the basics of Oracle databases, namely, the creation of database tables and inserting of data rows. I will be showing you two ways of interacting with the database: 1.) via Oracle&#8217;s Application Express Web-Based Interface; and 2.)Via Oracle&#8217;s Command-Line Application, SQL*Plus For the purpose of this tutorial, [...]]]></description>
			<content:encoded><![CDATA[<p>In this tutorial, I will be looking at the basics of Oracle databases, namely, the creation of 		database tables and inserting of data rows. I will be showing you two ways of interacting with the 		database: 1.) via Oracle&#8217;s Application Express Web-Based Interface; and 2.)Via Oracle&#8217;s Command-Line Application, SQL*Plus</p>
<ol></ol>
<p>For the purpose of this tutorial, I will assume that you have followed my previous tutorial, 		which guides you through the process of installing Oracle Database 10g Express Edition (Oracle XE) 		on a Windows XP computer. The schemas, usernames and passwords I refer to will only work if you 		have set your system up as described in that lesson.</p>
<div id="attachment_64" class="wp-caption aligncenter" style="width: 399px"><a href="http://www.joelennon.ie/wp-content/uploads/2008/12/figure02a.png"><img class="size-full wp-image-64" title="Figure 2a - Oracle Database Express Edition Login Screen" src="http://www.joelennon.ie/wp-content/uploads/2008/12/figure02a.png" alt="Figure 2a - Oracle Database Express Edition Login Screen" width="389" height="131" /></a><p class="wp-caption-text">Figure 2a - Oracle Database Express Edition Login Screen</p></div>
<p>First, I am going to log into Oracle Application Express, which will allow me to 		manage the database via a neat web-based interface. From your Start Menu, go to 		<em>Programs -&gt; Oracle Database 10g Express Edition -&gt; Go To Database Home Page</em>.  This 		will take you to a screen that should look similar to figure 2a above. On this screen 		enter the username <strong>somando</strong> and the password <strong>somando1</strong>. These login details will only 		work if you followed my previous tutorial and set up the user as described. If you 		used a different username and password when you created the user, be sure to use 		those credentials instead or you will not be able to access Application Express.</p>
<div id="attachment_65" class="wp-caption aligncenter" style="width: 435px"><a href="http://www.joelennon.ie/wp-content/uploads/2008/12/figure02b.png"><img class="size-full wp-image-65" title="Figure 2b - Oracle Database Express Edition Main Menu" src="http://www.joelennon.ie/wp-content/uploads/2008/12/figure02b.png" alt="Figure 2b - Oracle Database Express Edition Main Menu" width="425" height="260" /></a><p class="wp-caption-text">Figure 2b - Oracle Database Express Edition Main Menu</p></div>
<p>Once you have successfully logged in, you should see a screen similar to that in 		Figure 2b above. I am now going to create a database table. To do this, click on the 		arrow to the right of the <strong>Object Browser</strong> image icon. From the 		<strong>Create</strong> submenu, choose <strong>Table</strong>.</p>
<div id="attachment_67" class="wp-caption aligncenter" style="width: 510px"><a href="http://www.joelennon.ie/wp-content/uploads/2008/12/figure02c.png"><img class="size-full wp-image-67" title="Figure 2c - Create Table Form" src="http://www.joelennon.ie/wp-content/uploads/2008/12/figure02c.png" alt="Figure 2c - Create Table Form" width="500" height="288" /></a><p class="wp-caption-text">Figure 2c - Create Table Form</p></div>
<p>This screen will allow you to define a table, with fields for the table&#8217;s name, 		and for 8 columns. To add more than 10 columns, you can click the Add Column button. 		I am going to create a table called <strong>category</strong> with three columns, 		<strong>id</strong>, <strong>name</strong>, and 		<strong>parent_id</strong>. Don&#8217;t worry about the purpose of these fields for now, I&#8217;ll explain it 		in more detail at a later stage. Fill out the form exactly as you see in Figure 		2c, and click the <strong>Next &gt;</strong> button.</p>
<div id="attachment_68" class="wp-caption aligncenter" style="width: 510px"><a href="http://www.joelennon.ie/wp-content/uploads/2008/12/figure02d.png"><img class="size-full wp-image-68" title="Figure 2d - Define Primary Key Form" src="http://www.joelennon.ie/wp-content/uploads/2008/12/figure02d.png" alt="Figure 2d - Define Primary Key Form" width="500" height="223" /></a><p class="wp-caption-text">Figure 2d - Define Primary Key Form</p></div>
<p>Next you will need to set up the primary key for the table. I am going to set up 		the <strong>id</strong> field as our primary key, populated automatically from a sequence. To do this, 		select <strong>Populate from a new sequence</strong> from the list of options for <strong>Primary Key</strong>, and 		accept the default values for the <strong>Primary Key Constraint Name</strong> and <strong>Sequence Name</strong> fields. Now, select <strong>ID(NUMBER)</strong> from the drop-down list for the <strong>Primary Key</strong> field 		and press <strong>Next &gt;</strong>.</p>
<div id="attachment_69" class="wp-caption aligncenter" style="width: 448px"><a href="http://www.joelennon.ie/wp-content/uploads/2008/12/figure02e.png"><img class="size-full wp-image-69" title="Figure 2e - Define Foreign Keys Form" src="http://www.joelennon.ie/wp-content/uploads/2008/12/figure02e.png" alt="Figure 2e - Define Foreign Keys Form" width="438" height="302" /></a><p class="wp-caption-text">Figure 2e - Define Foreign Keys Form</p></div>
<p>I am not going to set up any foreign keys at this time, so on the Foreign Keys screen 		(see Figure 2e), you can simply click the <strong>Next &gt;</strong> button and move on. The next screen 		allows you to set up unique keys and check constraints. Again, I will not be using 		either of these right now, so you can simply press the <strong>Finish</strong> button.</p>
<div id="attachment_70" class="wp-caption aligncenter" style="width: 424px"><a href="http://www.joelennon.ie/wp-content/uploads/2008/12/figure02f.png"><img class="size-full wp-image-70" title="Figure 2f - Confirm Create Table Screen" src="http://www.joelennon.ie/wp-content/uploads/2008/12/figure02f.png" alt="Figure 2f - Confirm Create Table Screen" width="414" height="175" /></a><p class="wp-caption-text">Figure 2f - Confirm Create Table Screen</p></div>
<p>Finally, you will be asked to confirm your request to create the <strong>category</strong> table on the <strong>somando</strong> schema. If you press the <strong>SQL</strong> link, you will be shown the 		SQL statements that will be used to create the table. The code should be as 		follows:</p>
<div class="listing">
<pre><span class="keyword">CREATE table</span> "CATEGORY" (
    "ID"         <span class="keyword">NUMBER</span>(11,0) <span class="keyword">NOT NULL</span>,
    "NAME"       <span class="keyword">VARCHAR2</span>(255) <span class="keyword">NOT NULL</span>,
    "PARENT_ID"  <span class="keyword">NUMBER</span>(11,0) <span class="keyword">NOT NULL</span>,
    <span class="keyword">constraint</span> "CATEGORY_PK" <span class="keyword">primary key</span> ("ID")
)
/

<span class="keyword">CREATE sequence</span> "CATEGORY_SEQ"
/

<span class="keyword">CREATE trigger</span> "BI_CATEGORY"
    <span class="keyword">before insert on</span> "CATEGORY"
    <span class="keyword">for each row</span>
<span class="keyword">begin</span>
    <span class="keyword">select</span> "CATEGORY_SEQ".nextval <span class="keyword">into</span> :NEW.ID <span class="keyword">from</span> dual;
<span class="keyword">end</span>;
/</pre>
<p><em>Listing 2a: SQL Code to create 		&#8220;category&#8221; table</em></p>
</div>
<p>If all looks in order, go ahead and click the <strong>Create</strong> button, which will issue the 		above SQL code to the database, which will in turn create the table for you. If the 		create operation has completed successfully, you should see a screen similar to that 		displayed in Figure 2g below:</p>
<div id="attachment_74" class="wp-caption aligncenter" style="width: 510px"><a href="http://www.joelennon.ie/wp-content/uploads/2008/12/figure02g.png"><img class="size-full wp-image-74" title="Figure 2g - Category Table Properties Display" src="http://www.joelennon.ie/wp-content/uploads/2008/12/figure02g.png" alt="Figure 2g - Category Table Properties Display" width="500" height="243" /></a><p class="wp-caption-text">Figure 2g - Category Table Properties Display</p></div>
<p>Congratulations, you have created your first Oracle database table! That wasn&#8217;t so difficult 		now, was it? I will now take a break from using Application Express and use the SQL*Plus client 		that comes with Oracle Database 10g Express Edition to interact with the new table I have just 		created. To start SQL*Plus, go to <em>Start -&gt; Programs -&gt; Oracle Database 10g Express Edition -&gt; 		Run SQL Command Line</em>. This will open up a DOS-style window with an SQL prompt ready and 		waiting for you, which should look like Figure 2h below:</p>
<div id="attachment_75" class="wp-caption aligncenter" style="width: 510px"><a href="http://www.joelennon.ie/wp-content/uploads/2008/12/figure02h.png"><img class="size-full wp-image-75" title="Figure 2h - Run SQL Command Line" src="http://www.joelennon.ie/wp-content/uploads/2008/12/figure02h.png" alt="Figure 2h - Run SQL Command Line" width="500" height="254" /></a><p class="wp-caption-text">Figure 2h - Run SQL Command Line</p></div>
<p>Now that we have started SQL*Plus, we can connect to our database schema. To do this, 		type <strong>CONNECT</strong> and hit enter. You will now be asked for a username followed by a password, 		which, if you followed my previous tutorial, will be <strong>somando</strong> and <strong>somando1</strong>, respectively. 		If you have supplied the correct login information, you will see a message informing you 		that you are connected. To make sure you are connected to the correct database, type 		<strong>DESC category</strong> and hit enter. If you have followed this tutorial correctly, you should 		see output similar to the following:</p>
<div id="attachment_76" class="wp-caption aligncenter" style="width: 510px"><a href="http://www.joelennon.ie/wp-content/uploads/2008/12/figure02i.png"><img class="size-full wp-image-76" title="Figure 2i - Result of DESC category SQL statement" src="http://www.joelennon.ie/wp-content/uploads/2008/12/figure02i.png" alt="Figure 2i - Result of DESC category SQL statement" width="500" height="254" /></a><p class="wp-caption-text">Figure 2i - Result of DESC category SQL statement</p></div>
<p>Our table isn&#8217;t much good to us if we&#8217;re not going to store any data in it, so now 		we will use SQL to insert a few rows into the table. Teaching you the SQL language is 		out of the scope of this tutorial, so if you are finding it difficult to grasp some of 		the statements we use, it might be a good idea to read the Oracle SQL tutorial 		available at <a title="Oracle SQL Tutorial" href="http://www.db.cs.ucdavis.edu/teaching/sqltutorial/" target="_blank">http://www.db.cs.ucdavis.edu/teaching/sqltutorial/</a> which should bring you 		up to speed.</p>
<p>To follow the code examples in this tutorial in SQL*Plus, enter each line of code, 		line by line, pressing enter at the end of each line. The SQL interpreter will not 		process your code until you issue a semicolon or forward slash, telling it that you 		have finished typing your statement. Don&#8217;t be afraid to make mistakes, the best way 		to learn is often to figure out how to correct your errors. So now, let&#8217;s get 		started, type up the following code listing in your SQL Command Line window:</p>
<div class="listing">
<pre><span class="keyword">INSERT INTO</span> category(name, parent_id) <span class="keyword">VALUES</span>('Oracle', 0);
<span class="keyword">INSERT INTO</span> category(name, parent_id) <span class="keyword">VALUES</span>('SQL Server', 0);</pre>
<p><em>Listing 2b: SQL to Insert Data into category table</em></p>
</div>
<p>You will notice from this code that you are issuing two statements, each of which 		will create a new row in the category table. After you have entered each line, you 		should see the message <strong>1 row created</strong> which indicates that your statement was executed 		successfully. This data will now persist for the remainder of your SQL session, but 		because of Oracle&#8217;s architecture, you will need to &#8220;commit&#8221; the changes in order for 		them to be stored permanently. This process is very simple, all you need to do is type <strong>COMMIT</strong> and press enter. A message <strong>Commit complete</strong> will tell you that the command worked.</p>
<p>You may have noticed that the INSERT statements we used to populate the table only featured 		two of the three fields in our <strong>category</strong> table. This is because we have a sequence and 		trigger (as set up earlier using Application Express) which automatically handle the 		creation of a unique number for the <strong>id</strong> field every time we perform an insert on the table.</p>
<p>Before we select the data back from the database, I am going to issue two commands 		which will help to format our data a little nicer. Do not concern yourself with these 		commands for now, as they are not of any particular importance. You may be wondering 		why I don&#8217;t issue a semi-colon or forward slash after these commands. The reason for 		this is that they are SQL*Plus commands rather than SQL statements. Again, don&#8217;t worry 		too much about the difference for now.</p>
<div class="listing">
<pre><span class="keyword">SET LINESIZE</span> 300
<span class="keyword">SET HEAD OFF</span></pre>
<p><em>Listing 2c: SQL*Plus Formatting Commands</em></p>
</div>
<p>Now that I&#8217;ve changed these settings, we are ready to select back our data from 		the database. I am going to issue two statements, one which returns the number of 		rows in the table, and a second which returns the ID and Name columns of all rows 		in the table.</p>
<div class="listing">
<pre><span class="keyword">SELECT COUNT</span>(*) <span class="keyword">FROM</span> category;
<span class="keyword">SELECT</span> id, name <span class="keyword">FROM</span> category;</pre>
<p><em>Listing 2d: SQL to Select Data from the category table</em></p>
</div>
<p>The first command should result in the value 2 being output to the screen. 		The second statement will then display two rows, the first showing <strong>1 Oracle</strong> and 		the second outputting <strong>2 SQL Server</strong>, as can be seen in the following figure:</p>
<div id="attachment_78" class="wp-caption aligncenter" style="width: 510px"><a href="http://www.joelennon.ie/wp-content/uploads/2008/12/figure02j.png"><img class="size-full wp-image-78" title="Figure 2j - Results of SELECT statements" src="http://www.joelennon.ie/wp-content/uploads/2008/12/figure02j.png" alt="Figure 2j - Results of SELECT statements" width="500" height="254" /></a><p class="wp-caption-text">Figure 2j - Results of SELECT statements</p></div>
<p>Before we finish, I&#8217;m going to delete one of the rows we have created using a 		<strong>DELETE</strong> statement. This code also introduces the concept of the <strong>WHERE</strong> clause, which 		allows you to restrict the rows affected by an SQL statement by defining conditions 		which the data must meet in order for the specified action to be performed on that row.</p>
<div class="listing">
<pre><span class="keyword">DELETE FROM</span> category
<span class="keyword">WHERE</span> id = 2;
<span class="keyword">COMMIT</span>;</pre>
<p><em>Listing 2e: SQL to delete row from the category tablee</em></p>
</div>
<p>In this lesson, I have covered the basics of creating a table using Application 		Express, and working with that table using the SQL*Plus command line tool. Both of 		these applications are very powerful and can be used to create full-blown databases 		and software. In future tutorials I will be looking at creating web applications 		using the Oracle PL/SQL language and HTML/CSS/JavaScript, and I&#8217;ll also be showing 		you how to use other useful tools such as Oracle&#8217;s SQL Developer.</p>
<p>Click <a title="Oracle Database Basics (PDF)" href="http://www.joelennon.ie/wp-content/uploads/2008/12/database-basics.pdf" target="_blank">here</a> to view 		a printer friendly version of this tutorial. To download this tutorial to disk, right 		click <a title="Oracle Database Basics (PDF)" href="http://www.joelennon.ie/wp-content/uploads/2008/12/database-basics.pdf" target="_blank">here</a> and choose &#8220;Save Target As&#8221; or 		&#8220;Save Link As&#8221;. You will need Adobe Reader to open this file.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.joelennon.ie/2008/12/09/oracle-database-basics/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Install Oracle XE</title>
		<link>http://www.joelennon.ie/2008/12/09/install-oracle-xe/</link>
		<comments>http://www.joelennon.ie/2008/12/09/install-oracle-xe/#comments</comments>
		<pubDate>Tue, 09 Dec 2008 11:22:35 +0000</pubDate>
		<dc:creator>Joe Lennon</dc:creator>
				<category><![CDATA[Oracle]]></category>
		<category><![CDATA[Tutorials]]></category>
		<category><![CDATA[10g]]></category>
		<category><![CDATA[database]]></category>
		<category><![CDATA[install]]></category>
		<category><![CDATA[xe]]></category>

		<guid isPermaLink="false">http://www.joelennon.ie/?p=1</guid>
		<description><![CDATA[Oracle Database 10g Express Edition (I will refer to this as Oracle XE from here on) is a basic version of the Oracle Database 10g that is freely available for development, deployment and distribution. It is an excellent entry-level database for learning Oracle and PL/SQL and will run on most modern PCs and laptops. I [...]]]></description>
			<content:encoded><![CDATA[<p>Oracle Database 10g Express Edition (I will refer to this as Oracle XE from here on) 		is a basic version of the Oracle Database 10g that is freely available for development, 		deployment and distribution. It is an excellent entry-level database for learning Oracle 		and PL/SQL and will run on most modern PCs and laptops. I will be using Oracle XE in the 		majority of the Oracle tutorials and sample applications on this website, so it is highly 		recommended that you install it so you can follow my examples closely and precisely.</p>
<p>In order to install Oracle XE on your computer, you will need to download it from 		Oracle&#8217;s website. It is available for Microsoft Windows and x86 Linux distributions. For 		the purpose of this guide I will be showing you how to install Oracle XE on Microsoft 		Windows XP, but the procedure should be similar for other Windows operating systems.</p>
<p>Oracle has an extensive Installation Guide for its Oracle XE product. Windows users 		can view this guide at: <a title="Oracle XE Installation Guide" href="http://download.oracle.com/docs/cd/B25329_01/doc/install.102/b25143/toc.htm" target="_blank"> http://download.oracle.com/docs/cd/B25329_01/doc/install.102/b25143/toc.htm</a>.</p>
<p>Linux users, check out Oracle&#8217;s Installation Guide at: <a title="Oracle XE (Linux) Installation Guide" href="http://www.oracle.com/technology/software/products/database/xe/files/install.102/b25144/toc.htm" target="_blank"> http://www.oracle.com/technology/software/products/database/xe/files/install.102/b25144/toc.htm</a>.</p>
<p>This guide will have many similarities to Oracle&#8217;s Installation Guide above, but if 		you follow any naming conventiones I use during installation it will make it much 		easier for you to follow any future Oracle guides I make available.</p>
<p>The first step in installing Oracle XE is to download the installation package from 		Oracle&#8217;s website. The direct URL to the Windows binary download page is <a title="Download Oracle XE 10g" href="http://www.oracle.com/technology/software/products/database/xe/htdocs/102xewinsoft.html" target="_blank"> http://www.oracle.com/technology/software/products/database/xe/htdocs/102xewinsoft.html</a>. 		On this page, you must first accept the License Agreement by clicking on the radio 		button towards the top of the page. Once you have clicked on this, you can click on 		the relevant download links to download the installer. It is worth mentioning at this 		stage that you must be logged in to the Oracle Technology Network (OTN) to download 		Oracle XE. Registration to OTN is free and if you are not logged in you will be prompted 		to login or register before you will be allowed to proceed with the download.</p>
<div id="attachment_35" class="wp-caption aligncenter" style="width: 510px"><a href="http://www.joelennon.ie/wp-content/uploads/2008/12/figure01a.png"><img class="size-full wp-image-35" title="Figure 1a - Oracle Database 10g Express Edition Download Page" src="http://www.joelennon.ie/wp-content/uploads/2008/12/figure01a.png" alt="Figure 1a - Oracle Database 10g Express Edition Download Page" width="500" height="205" /></a><p class="wp-caption-text">Figure 1a - Oracle Database 10g Express Edition Download Page</p></div>
<p>The version I am using in my guides is the Oracle Database 10g Release 2 (10.2.0.1) 		Express Edition for Microsoft Windows (Western European). The download is highlighted in 		blue on Figure 1a above. It weighs in at a heavy 157mb, so it&#8217;s best to download this 		over a high-speed Internet connection if possible.</p>
<p>Once you have downloaded the installation package, run the OracleXE.exe file to start 		the installer.</p>
<div id="attachment_36" class="wp-caption aligncenter" style="width: 510px"><a href="http://www.joelennon.ie/wp-content/uploads/2008/12/figure01b.png"><img class="size-full wp-image-36" title="Figure 1b - Oracle Database 10g Express Edition InstallShield Wizard" src="http://www.joelennon.ie/wp-content/uploads/2008/12/figure01b.png" alt="Figure 1b - Oracle Database 10g Express Edition InstallShield Wizard" width="500" height="375" /></a><p class="wp-caption-text">Figure 1b - Oracle Database 10g Express Edition InstallShield Wizard</p></div>
<p>On this welcome screen (see Figure 1b), press Next (Alt+N) to continue to the next 		screen.</p>
<div id="attachment_38" class="wp-caption aligncenter" style="width: 510px"><a href="http://www.joelennon.ie/wp-content/uploads/2008/12/figure01c.png"><img class="size-full wp-image-38" title="Figure 1c - Oracle Database 10g Express Edition License Agreement" src="http://www.joelennon.ie/wp-content/uploads/2008/12/figure01c.png" alt="Figure 1c - Oracle Database 10g Express Edition License Agreement" width="500" height="375" /></a><p class="wp-caption-text">Figure 1c - Oracle Database 10g Express Edition License Agreement</p></div>
<p>On the License Agreement screen (Figure 1c), select &#8220;I accept the terms in the 		license agreement&#8221; (Alt+A) and then press the Next button (Alt+N) to move on.</p>
<div id="attachment_39" class="wp-caption aligncenter" style="width: 510px"><a href="http://www.joelennon.ie/wp-content/uploads/2008/12/figure01d.png"><img class="size-full wp-image-39" title="Figure 1d - Oracle Database 10g Express Edition Destination Location" src="http://www.joelennon.ie/wp-content/uploads/2008/12/figure01d.png" alt="Figure 1d - Oracle Database 10g Express Edition Destination Location" width="500" height="375" /></a><p class="wp-caption-text">Figure 1d - Oracle Database 10g Express Edition Destination Location</p></div>
<p>On the &#8220;Choose Destination Location&#8221; screen (Figure 1d) leave the default values 		as they are in Figure 1d and press Next (Alt+N) to continue.</p>
<div id="attachment_40" class="wp-caption aligncenter" style="width: 510px"><a href="http://www.joelennon.ie/wp-content/uploads/2008/12/figure01e.png"><img class="size-full wp-image-40" title="Figure 1e -  Oracle Database 10g Express Edition Database Passwords" src="http://www.joelennon.ie/wp-content/uploads/2008/12/figure01e.png" alt="Figure 1e -  Oracle Database 10g Express Edition Database Passwords" width="500" height="375" /></a><p class="wp-caption-text">Figure 1e -  Oracle Database 10g Express Edition Database Passwords</p></div>
<p>On this screen (&#8220;Specify Database Passwords&#8221; &#8211; Figure 1e), you can enter a password 		that will be used for the SYS and SYSTEM database accounts. Throughout the course of 		this guide I will always use the password <strong>somando1</strong> and I suggest you 		do the same to make it easier to follow my guides. Obviously these passwords should 		only be used on development machines, with much stronger and secure passwords being 		used on production servers. Once you have entered and confirmed the password, hit Next 		(Alt+N) to continue.</p>
<div id="attachment_41" class="wp-caption aligncenter" style="width: 510px"><a href="http://www.joelennon.ie/wp-content/uploads/2008/12/figure01f.png"><img class="size-full wp-image-41" title="Figure 1f - Oracle Database 10g Express Edition Installation Summary" src="http://www.joelennon.ie/wp-content/uploads/2008/12/figure01f.png" alt="Figure 1f - Oracle Database 10g Express Edition Installation Summary" width="500" height="375" /></a><p class="wp-caption-text">Figure 1f - Oracle Database 10g Express Edition Installation Summary</p></div>
<p>You will now be presented with a summary of the installation options (make a 		note of the port numbers, they should be as in Figure 1f). If all looks in order, 		click Install (Alt+I).</p>
<div id="attachment_42" class="wp-caption aligncenter" style="width: 510px"><a href="http://www.joelennon.ie/wp-content/uploads/2008/12/figure01g.png"><img class="size-full wp-image-42" title="Figure 1g - Oracle Database 10g Express Edition Setup Status" src="http://www.joelennon.ie/wp-content/uploads/2008/12/figure01g.png" alt="Figure 1g - Oracle Database 10g Express Edition Setup Status" width="500" height="375" /></a><p class="wp-caption-text">Figure 1g - Oracle Database 10g Express Edition Setup Status</p></div>
<p>The installation should now begin, and you may see a screen similar to Figure 1g. 		The installer will automatically copy the relevant files to your computer and will 		configure the database. This process may take a considerable amount of time depending 		on your computer&#8217;s specification. On my machine (an Intel Core 2 Duo T7300 2.00GHz 		with 2GB of RAM) the process took less than five minutes.</p>
<div id="attachment_43" class="wp-caption aligncenter" style="width: 510px"><a href="http://www.joelennon.ie/wp-content/uploads/2008/12/figure01h.png"><img class="size-full wp-image-43" title="Figure 1h - Oracle Database 10g Express Edition Installation Complete" src="http://www.joelennon.ie/wp-content/uploads/2008/12/figure01h.png" alt="Figure 1h - Oracle Database 10g Express Edition Installation Complete" width="500" height="375" /></a><p class="wp-caption-text">Figure 1h - Oracle Database 10g Express Edition Installation Complete</p></div>
<p>Once the installation has completed you will see a screen like in Figure 1h above. 		Leave the checkbox for &#8220;Launch the Database homepage&#8221; checked and click the Finish 		button. You have now successfully installed Oracle XE on your computer.</p>
<div id="attachment_44" class="wp-caption aligncenter" style="width: 510px"><a href="http://www.joelennon.ie/wp-content/uploads/2008/12/figure01i.png"><img class="size-full wp-image-44" title="Figure 1i - Oracle Database Express Edition Login Screen" src="http://www.joelennon.ie/wp-content/uploads/2008/12/figure01i.png" alt="Figure 1i - Oracle Database Express Edition Login Screen" width="500" height="399" /></a><p class="wp-caption-text">Figure 1i - Oracle Database Express Edition Login Screen</p></div>
<p>If you left the checkbox in Figure 1h checked, your default web browser will open 		and you will see a page similar to that shown in Figure 1i. Enter <strong>SYS</strong> in the field for Username and <strong>somando1</strong> in the field for Password and 		click the Login button.</p>
<div id="attachment_45" class="wp-caption aligncenter" style="width: 510px"><a href="http://www.joelennon.ie/wp-content/uploads/2008/12/figure01j.png"><img class="size-full wp-image-45" title="Figure 1j - Oracle Database Express Edition Homepage" src="http://www.joelennon.ie/wp-content/uploads/2008/12/figure01j.png" alt="Figure 1j - Oracle Database Express Edition Homepage" width="500" height="383" /></a><p class="wp-caption-text">Figure 1j - Oracle Database Express Edition Homepage</p></div>
<p>If you were able to login successfully, you should see a page similar to that in 		Figure 1j, which is basically a web-based control panel called Application Express. 		This utility is in fact a powerful web application which provides you complete control 		over your database. At this point I highly recommend that you click on the &#8220;Getting 		Started&#8221; link at the top right hand section of this screen, which will bring you to a 		local version of Oracle&#8217;s Database Express Edition Getting Started Guide. This guide 		can also be accessed online at <a title="Oracle Database Express Edition Getting Started Guide" href="http://download.oracle.com/docs/cd/B25329_01/doc/admin.102/b25610/toc.htm" target="_blank">http://download.oracle.com/docs/cd/B25329_01/doc/admin.102/b25610/toc.htm</a>.</p>
<p>The Getting Started Guide will walk you through the process of unlocking a sample user, 		logging in under the sample user&#8217;s account, and creating and running a simple application 		with Application Express. It will take you 20 minutes to get through, and will give you an 		idea of how simple it is to create powerful applications using Application Express.</p>
<p>Finally, I will create a user/schema that I will be using in my guides. All the 		tables that I create in future guides will be created in this schema. To create a user, 		open the Database Home Page (Start -&gt; Programs -&gt; Oracle Database 10g Express Edition 		-&gt; Go To Database Home Page) and login with the username <strong>SYSTEM</strong> and 		password <strong>somando1</strong>. Click on the Administration image, then click on 		Database Users, and then the &#8220;Create &gt;&#8221; button.</p>
<div id="attachment_46" class="wp-caption aligncenter" style="width: 510px"><a href="http://www.joelennon.ie/wp-content/uploads/2008/12/figure01k.png"><img class="size-full wp-image-46" title="Figure 1k - Create Database User" src="http://www.joelennon.ie/wp-content/uploads/2008/12/figure01k.png" alt="Figure 1k - Create Database User" width="500" height="362" /></a><p class="wp-caption-text">Figure 1k - Create Database User</p></div>
<p>On the Create Database User screen (as in Figure 1k above), enter the following details:</p>
<ul>
<li>Username: <strong>somando</strong></li>
<li>Password: <strong>somando1</strong></li>
<li>Confirm Password: <strong>somando1</strong></li>
<li>Expire Password: Leave this option <strong>unchecked</strong></li>
<li>Account Status: <strong>Unlocked</strong></li>
<li>Roles: <strong>Connect</strong> and <strong>Resource</strong> should be checked, 			DBA should be unchecked.</li>
<li>Click on the Check All link at the bottom right of the User Privileges box to give 			this user all Direct Grant System Privileges.</li>
</ul>
<p>Once you have filled out the form accordingly, click on the Create button at the top 		right hand corner of the Create Database User box. Once you click this button, the 		user/schema <strong>somando</strong> should be created. In order to verify that the user 		has been set up correctly, click on the Logout link at the right hand top corner of the 		page, and log back in, except this time log in with the username <strong>somando</strong> and the password <strong>somando1</strong>. If you can successfully log in, the 		user/schema has been created successfully.</p>
<p>That concludes this tutorial. In the next guide, I will be looking at creating 		tables and inserting data using Application Express. I will also be introducing the 		SQL Command Line (SQL*Plus) and some basic SQL statements.</p>
<blockquote><p>Click <a title="Installing Oracle Database 10g Express Edition (PDF version)" href="http://www.joelennon.ie/wp-content/uploads/2008/12/install-oracle-xe.pdf" target="_blank">here</a> to view 		a printer friendly version of this tutorial. To download this tutorial to disk, right 		click <a title="Installing Oracle Database 10g Express Edition (PDF version)" href="http://www.joelennon.ie/wp-content/uploads/2008/12/install-oracle-xe.pdf" target="_blank">here</a> and choose &#8220;Save Target As&#8221; or 		&#8220;Save Link As&#8221;. You will need Adobe Reader to open this file.</p></blockquote>
]]></content:encoded>
			<wfw:commentRss>http://www.joelennon.ie/2008/12/09/install-oracle-xe/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
	</channel>
</rss>
