<?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>BorkWeb &#187; mysql</title>
	<atom:link href="http://borkweb.com/story/tag/mysql/feed" rel="self" type="application/rss+xml" />
	<link>http://borkweb.com</link>
	<description>Some People Are Squirrel Handed.</description>
	<lastBuildDate>Tue, 17 Jan 2012 22:00:21 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>Learning What I Know</title>
		<link>http://borkweb.com/story/learning-what-i-know</link>
		<comments>http://borkweb.com/story/learning-what-i-know#comments</comments>
		<pubDate>Tue, 15 Aug 2006 23:42:27 +0000</pubDate>
		<dc:creator>Matt</dc:creator>
				<category><![CDATA[Blog]]></category>
		<category><![CDATA[Technology]]></category>
		<category><![CDATA[css]]></category>
		<category><![CDATA[help]]></category>
		<category><![CDATA[java]]></category>
		<category><![CDATA[javascript]]></category>
		<category><![CDATA[learn]]></category>
		<category><![CDATA[learning]]></category>
		<category><![CDATA[mysql]]></category>
		<category><![CDATA[oo]]></category>
		<category><![CDATA[oop]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[suggestions]]></category>
		<category><![CDATA[xhtml]]></category>

		<guid isPermaLink="false">http://borkweb.com/story/learning-what-i-know</guid>
		<description><![CDATA[I recently received an e-mail from one of my subscribers that asked a question. The answer may be useful to some so I&#8217;m placing it here. The original question It seems so interesting developing websites application these days, thanks to the web 2.0 phenomena. I can&#8217;t call myself a web developer or anything near that, [...]]]></description>
			<content:encoded><![CDATA[<p>I recently received an e-mail from one of my subscribers that asked a question.  The answer may be useful to some so I&#8217;m placing it here.</p>
<h3 id="_the-original-questio_1" >The original question</h3>
<blockquote><p>
It seems so interesting developing websites application these days, thanks to the web 2.0 phenomena. I can&#8217;t call myself a web developer or anything near that, but I&#8217;m interested to learn these kind of [things].</p>
<p>[...]</p>
<p>Since you seem to be real world developer to me, I have a couple of questions to ask you. I&#8217;ve been messing around with XHTML, CSS, Javascript, PHP and MySQL [for] a couple of months now, and it frustrates me sometimes when I sort of forget things and [can]&#8216;t understand the flow of the design of what I&#8217;m trying to achieve. [..]</p>
<p>Based on your experience, do you do everything by your own, i mean there are the front end and the back end [things], do you do both?</p>
<p>Talking of object oriented programming (i guess that&#8217;s what prototype, script.aculo.us and ajax are really about), which OOP did u learn first? I [learned] simple Java before but does that come into play for web development as well? I mean, does it help if i go into detail learning Java?</p>
<p>Any other useful advice? I would appreciate your comments. Thank you.
</p></blockquote>
<h3 id="_my-reply_1" >My Reply</h3>
<p>Web 2.0 phenomenon&#8230;Yeah, its good to stay on top of things like that :)</p>
<p>Development.  <a href="http://www.w3schools.com/xhtml/default.asp">XHTML</a>, <a href="http://w3schools.com/css/">CSS</a>, <a href="http://en.wikipedia.org/wiki/Javascript">Javascript</a>, <a href="http://php.net">PHP</a> and <a href="http://mysql.org">MySQL</a>&#8230;I do it all, however, I did not learn them all at once&#8230;but over a series of years.  I think the key concept is to really try and keep your logic from your design &#8211; keep the MySQL/PHP side of things separate from the XHTML/CSS side of things ( e.g. <a href="http://borkweb.com/story/ajax-templating-and-the-separation-of-layout-and-logic">Ajax, Templating, and the Separation of Layout and Logic</a>).  Javascript is a bit of a wildcard and bridges between both the presentation and logic. </p>
<p>You can do the above with and without <a href="http://en.wikipedia.org/wiki/Object-oriented_programming">Object Oriented Programming</a>&#8230;although OOP is the preferred method.  My first OOP language was <a href="http://java.sun.com">Java</a>. Next I branched out to Object Oriented PHP, and finally (last year) I learned Object Oriented Javascript. </p>
<p>All you really need is the OO concept in your head before you branch out and if you&#8217;ve used Java, you should be good to go.  So to answer your question: &#8220;Does it help if you go into detail learning Java.&#8221; is this:  It won&#8217;t hurt, but isn&#8217;t necessary to succeed in learning the above languages/tools.  When using Object Orientation and switching languages, its all about learning the syntax and the gotchas associated with your chosen language.</p>
<p>The biggest chunks of advice I can give regarding your tools of choice are as follows:</p>
<h3 id="_xhtmlcss_1" >XHTML/CSS</h3>
<ul>
<li>keep it simple</li>
<li>use ids/classes rather than inline styles</li>
</ul>
<h3 id="_php_1" >PHP</h3>
<ul>
<li>live on php.net</li>
<li>learn through irritation with your own code&#8230;mine goes through constant revisions and optimizations<br />
- pick up a templating engine to help keep your layout and logic separate.  I use <a href="http://xtpl.sf.net">XTemplates</a>.  I&#8217;m thinking about looking into <a href="http://smarty.php.net/">SmartyTemplates</a>&#8230;.use whatever you wish&#8230;but templates save TONS of time.</li>
</ul>
<h3 id="_mysql_1" >MySQL</h3>
<ul>
<li>know your data</li>
<li>know how to normalize your data</li>
<li>download open source applications and look at their database structure for a good idea of what their doing and go from there</li>
</ul>
<h3 id="_javascript_1" >Javascript</h3>
<ul>
<li>Learn to <a href="http://borkweb.com/story/node-manipulation-in-the-dom">manipulate the DOM</a></li>
<li>Learn <a href="http://borkweb.com/story/object-oriented-javascript">OO Javascript</a></li>
<li>THEN tackle <a href="http://borkweb.com/story/prototype-makes-javascript-painless">Prototype</a> and <a href="http://borkweb.com/story/scriptaculous-is-my-new-best-friend">Script.aculo.us</a></li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://borkweb.com/story/learning-what-i-know/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Oracle&#8217;s Auto Incrementing with Sequences</title>
		<link>http://borkweb.com/story/oracles-auto-incrementing-with-sequences</link>
		<comments>http://borkweb.com/story/oracles-auto-incrementing-with-sequences#comments</comments>
		<pubDate>Fri, 17 Feb 2006 15:50:36 +0000</pubDate>
		<dc:creator>Matt</dc:creator>
				<category><![CDATA[Blog]]></category>
		<category><![CDATA[Technology]]></category>
		<category><![CDATA["auto increment"]]></category>
		<category><![CDATA[database]]></category>
		<category><![CDATA[mysql]]></category>
		<category><![CDATA[oracle]]></category>
		<category><![CDATA[sequences]]></category>
		<category><![CDATA[sequencing]]></category>

		<guid isPermaLink="false">http://www.borkweb.com/story/oracles-auto-incrementing-with-sequences</guid>
		<description><![CDATA[My previous post, titled: &#8216;Sequence-less/Trigger-less Oracle Auto Increment&#8216; was shot out of the water by my friend and DBA, Jon Emmons. Glad to see that I can be kept in line. So I have resigned to use Oracle Sequences as a safer means for auto incrementing. But that doesn&#8217;t mean that I like it. Here&#8217;s [...]]]></description>
			<content:encoded><![CDATA[<p>My previous post, titled: &#8216;<a href="http://www.borkweb.com/story/sequence-lesstrigger-less-oracle-auto-increment">Sequence-less/Trigger-less Oracle Auto Increment</a>&#8216; was shot out of the water by my friend and DBA, <a href="http://www.lifeaftercoffee.com/2006/02/17/how-not-to-create-auto-increment-columns-in-oracle">Jon Emmons</a>.  Glad to see that I can be kept in line.</p>
<p>So I have resigned to use Oracle Sequences as a safer means for auto incrementing.  But that doesn&#8217;t mean that I like it.  Here&#8217;s what needs to be done to implement auto_incrementing with Oracle:</p>
<p>First, create a sequence:</p>
<blockquote><p>
CREATE SEQUENCE sweet_incrementing INCREMENT BY 1 START WITH 1;
</p></blockquote>
<p>Next write your statement:</p>
<blockquote><p>
INSERT INTO table (id,name) VALUES (sweet_incrementing.NextVal,&#8217;bork&#8217;);
</p></blockquote>
<p>Now at a second glance, this statement looks much cleaner than my first attempt at subverting the system.  However, the fact that you need to create a whole new sequence for each table you wish to have an auto incrementer is pretty stupid when compared to MySQL&#8217;s plan of attack.  In MySQL you can simply mark a column as a auto_increment during table creation and you&#8217;re good to go!</p>
]]></content:encoded>
			<wfw:commentRss>http://borkweb.com/story/oracles-auto-incrementing-with-sequences/feed</wfw:commentRss>
		<slash:comments>14</slash:comments>
		</item>
		<item>
		<title>Sequence-less/Trigger-less Oracle Auto Increment</title>
		<link>http://borkweb.com/story/sequence-lesstrigger-less-oracle-auto-increment</link>
		<comments>http://borkweb.com/story/sequence-lesstrigger-less-oracle-auto-increment#comments</comments>
		<pubDate>Thu, 16 Feb 2006 21:50:05 +0000</pubDate>
		<dc:creator>Matt</dc:creator>
				<category><![CDATA[Blog]]></category>
		<category><![CDATA[Technology]]></category>
		<category><![CDATA["auto increment"]]></category>
		<category><![CDATA[database]]></category>
		<category><![CDATA[insert]]></category>
		<category><![CDATA[mysql]]></category>
		<category><![CDATA[oracle]]></category>

		<guid isPermaLink="false">http://www.borkweb.com/story/sequence-lesstrigger-less-oracle-auto-increment</guid>
		<description><![CDATA[Oracle sucks. Well, not totally, but it fails in a lot of places where MySQL is sexy. One little gem of an irritation is the lack of an auto_increment attribute associated with fields. Instead you have to make use of Oracle Sequences/Triggers which adds a whole layer of complexity on the creation and insertion into [...]]]></description>
			<content:encoded><![CDATA[<p>Oracle sucks.  Well, not totally, but it fails in a lot of places where MySQL is sexy.  One little gem of an irritation is the lack of an <strong>auto_increment</strong> attribute associated with fields.  Instead you have to make use of Oracle Sequences/Triggers which adds a whole layer of complexity on the creation and insertion into a simple table.</p>
<p>I&#8217;m not quite sure on this statement&#8217;s efficiency, but here&#8217;s my solution:</p>
<blockquote><p>INSERT INTO table (id,name) (SELECT CASE WHEN MAX(id) IS NULL THEN 1 ELSE MAX(id)+1 END, &#8216;bork&#8217; FROM table);</p></blockquote>
<p>EDIT: It seems that this isn&#8217;t such a good idea, after help from my <a href="http://www.lifeaftercoffee.com/2006/02/17/how-not-to-create-auto-increment-columns-in-oracle/">friendly neighborhood DBA</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://borkweb.com/story/sequence-lesstrigger-less-oracle-auto-increment/feed</wfw:commentRss>
		<slash:comments>12</slash:comments>
		</item>
	</channel>
</rss>

