<?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>code.openark.org &#187; Opinions</title>
	<atom:link href="http://code.openark.org/blog/tag/opinions/feed" rel="self" type="application/rss+xml" />
	<link>http://code.openark.org/blog</link>
	<description>Blog by Shlomi Noach</description>
	<lastBuildDate>Tue, 07 Sep 2010 05:53:01 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.1</generator>
		<item>
		<title>Personal observation: more migrations from MyISAM to InnoDB</title>
		<link>http://code.openark.org/blog/mysql/personal-observation-more-migrations-from-myisam-to-innodb</link>
		<comments>http://code.openark.org/blog/mysql/personal-observation-more-migrations-from-myisam-to-innodb#comments</comments>
		<pubDate>Wed, 16 Jun 2010 16:43:42 +0000</pubDate>
		<dc:creator>shlomi</dc:creator>
				<category><![CDATA[MySQL]]></category>
		<category><![CDATA[InnoDB]]></category>
		<category><![CDATA[MyISAM]]></category>
		<category><![CDATA[Opinions]]></category>

		<guid isPermaLink="false">http://code.openark.org/blog/?p=2517</guid>
		<description><![CDATA[I&#8217;m evidencing an increase in the planning, confidence &#38; execution for MyISAM to InnoDB migration. How much can a single consultant observe? I agree Oracle should not go to PR based on my experience. But I find that: More companies are now familiar with InnoDB than there used to. More companies are interested in migration [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;m evidencing an increase in the planning, confidence &amp; execution for MyISAM to InnoDB migration.</p>
<p>How much can a single consultant observe? I agree Oracle should not go to PR based on my experience. But I find that:</p>
<ul>
<li>More companies are now familiar with InnoDB than there used to.</li>
<li>More companies are interested in migration to InnoDB than there used to.</li>
<li>More companies feel such migration to be safe.</li>
<li>More companies start up with an InnoDB based solution than with a MyISAM based solution.</li>
</ul>
<p>This is the way I see it. No doubt, the Oracle/Sun deal made its impact. The fact that InnoDB is no longer a 3rd party; the fact Oracle invests in InnoDB and no other engine (Falcon is down, no real development on MyISAM); the fact InnoDB is to be the default engine: all these put companies at ease with migration.</p>
<p><span id="more-2517"></span>I am happy with this change. I believe for most installations InnoDB provides with a clear advantage over MyISAM (though MyISAM has its uses), and this makes for more robust, correct and manageable MySQL instances; the kind that make a DBA&#8217;s life easier and quieter. And it is easier to make customers see the advantages.</p>
<p>I am not inclined to say <em>&#8220;You should migrate your entire database to InnoDB&#8221;</em>. I don&#8217;t do that a lot. But recently, more customers approach and say <em>&#8220;We were thinking about migrating our entire database to InnoDB, what do you think?&#8221;</em>. What a change of approach.</p>
<p>And, yes: there are still <em>a lot</em> of companies using MyISAM based databases, who still live happily.</p>
]]></content:encoded>
			<wfw:commentRss>http://code.openark.org/blog/mysql/personal-observation-more-migrations-from-myisam-to-innodb/feed</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>Poll: what (minor) versions of MySQL should be supported by an open source MySQL related project?</title>
		<link>http://code.openark.org/blog/mysql/poll-what-minor-versions-of-mysql-should-be-supported-by-an-open-source-mysql-related-project</link>
		<comments>http://code.openark.org/blog/mysql/poll-what-minor-versions-of-mysql-should-be-supported-by-an-open-source-mysql-related-project#comments</comments>
		<pubDate>Fri, 02 Apr 2010 07:30:06 +0000</pubDate>
		<dc:creator>shlomi</dc:creator>
				<category><![CDATA[MySQL]]></category>
		<category><![CDATA[Open Source]]></category>
		<category><![CDATA[Opinions]]></category>

		<guid isPermaLink="false">http://code.openark.org/blog/?p=2313</guid>
		<description><![CDATA[I would like to get the community&#8217;s opinion about supporting older (minor) versions of MySQL in open source projects. If I were to develop some open source project, and a bug report came which only applied to MySQL 5.0.51 (but more recent versions worked fine), would I need to fix the code so as to [...]]]></description>
			<content:encoded><![CDATA[<p>I would like to get the community&#8217;s opinion about supporting older (minor) versions of MySQL in open source projects.</p>
<p>If I were to develop some open source project, and a bug report came which only applied to MySQL <strong>5.0.51</strong> (but more recent versions worked fine), would I need to fix the code so as to support this older version?</p>
<p>How about supporting <strong>5.0.22</strong> (released almost 4 years ago, with almost 70 revisions since)? Would you expect an open source project to support this MySQL version because, say, this is the <a href="http://code.openark.org/blog/mysql/to-not-yum-or-to-not-apt-get">default version in your yum repository</a>?</p>
<p>I would like to concentrate on the currently stable MySQL versions: <strong>5.0</strong> and <strong>5.1</strong>. Versions <strong>4.x</strong> are out of the question for me, and <strong>5.5</strong> is not yet GA.</p>
<p>Sure, it would be great to support <em>everything</em>. But also time and effort consuming. So, I would greatly appreciate <em>your feedback</em>!<br />
<span id="more-2313"></span><br />
Note: There is a poll embedded within this post, please visit the site to participate in this post's poll.</p>
]]></content:encoded>
			<wfw:commentRss>http://code.openark.org/blog/mysql/poll-what-minor-versions-of-mysql-should-be-supported-by-an-open-source-mysql-related-project/feed</wfw:commentRss>
		<slash:comments>8</slash:comments>
		</item>
		<item>
		<title>Proper SQL table alias use conventions</title>
		<link>http://code.openark.org/blog/mysql/proper-sql-table-alias-use-conventions</link>
		<comments>http://code.openark.org/blog/mysql/proper-sql-table-alias-use-conventions#comments</comments>
		<pubDate>Thu, 11 Mar 2010 07:10:09 +0000</pubDate>
		<dc:creator>shlomi</dc:creator>
				<category><![CDATA[MySQL]]></category>
		<category><![CDATA[Java]]></category>
		<category><![CDATA[Opinions]]></category>
		<category><![CDATA[python]]></category>
		<category><![CDATA[SQL]]></category>
		<category><![CDATA[Syntax]]></category>

		<guid isPermaLink="false">http://code.openark.org/blog/?p=2156</guid>
		<description><![CDATA[After seeing quite some SQL statements over the years, something is bugging me: there is no consistent convention as for how to write an SQL query. I&#8217;m going to leave formatting, upper/lower-case issues aside, and discuss a small part of the SQL syntax: table aliases. Looking at three different queries, I will describe what I [...]]]></description>
			<content:encoded><![CDATA[<p>After seeing quite some SQL statements over the years, something is bugging me: there is no consistent convention as for how to write an SQL query.</p>
<p>I&#8217;m going to leave formatting, upper/lower-case issues aside, and discuss a small part of the SQL syntax: table aliases. Looking at three different queries, I will describe what I find to be problematic table alias use.</p>
<p>Using the <a href="http://dev.mysql.com/doc/sakila/en/sakila.html">sakila</a> database, take a look at the following queries:<span id="more-2156"></span></p>
<h4>Query #1</h4>
<blockquote>
<pre><strong>SELECT</strong>
 R.rental_date, C.customer_id, C.first_name, C.last_name
<strong>FROM</strong>
 rental R
 <strong>JOIN</strong> customer C <strong>USING</strong> (customer_id)
<strong>WHERE</strong>
 R.rental_date &gt;= DATE('2005-10-01')
 <strong>AND</strong> C.store_id=1;
</pre>
</blockquote>
<p>The above looks for film rentals done in a specific store (store #<strong>1</strong>), as of Oct. 1st, 2005.</p>
<h4>Query #2</h4>
<blockquote>
<pre><strong>SELECT</strong>
 F.title, C.name
<strong>FROM</strong>
 film <strong>AS</strong> F
 <strong>JOIN</strong> film_category <strong>AS</strong> S <strong>ON</strong> (F.film_id = S.film_id)
 <strong>JOIN</strong> category <strong>AS</strong> C <strong>ON</strong> (S.category_id = C.category_id)
<strong>WHERE</strong> F.length &gt; 180;</pre>
</blockquote>
<p>The above lists the title and category for all films longer than three hours.</p>
<h4>Query #3</h4>
<blockquote>
<pre><strong>SELECT</strong> c.customer_id, c.last_name
<strong>FROM</strong>
  customer c
  <strong>INNER JOIN</strong> address a ON (c.address_id = a.address_id)
  <strong>INNER JOIN</strong> (
    <strong>SELECT</strong>
      c.city_id
    <strong>FROM</strong>
      city AS c
      <strong>JOIN</strong> country s <strong>ON</strong> (c.country_id = s.country_id)
    <strong>WHERE</strong>
      s.country <strong>LIKE</strong> 'F%'
  ) s1 <strong>USING</strong> (city_id)
<strong>WHERE</strong>
  create_date &gt;= DATE('2005-10-01');
</pre>
</blockquote>
<p>The above lists customers created as of Oct. 1st, 2005, and who live in countries starting with an &#8216;F&#8217;. The query could be solved without a subquery, but there&#8217;s a good reason why I made it so.</p>
<h4>The problems</h4>
<p>I used very different conventions on any one of the queries, and sometimes within each query. And it&#8217;s common that I see the same on a customer&#8217;s site, what with having many programmers do the SQL coding. Again, I will only discuss the table aliases conventions. I&#8217;ll leaver the rest to the reader.</p>
<p>Here&#8217;s where I see problems:</p>
<ul>
<li>Query <strong>#1</strong>: In itself, it looks fine. <strong>Rental</strong> turns to <strong>R</strong>, <strong>Customer</strong> turns to <strong>C</strong>. I will comment on this slightly later on when I provide my full opinion.</li>
<li>Query <strong>#2</strong>: So <strong>film</strong> turns to <strong>F</strong>, <strong>category</strong> turns to <strong>C</strong>. What should <strong>film_category</strong> turn into? <em>Out of letters?</em> Let&#8217;s just go for <strong>S</strong>, shall we? But <strong>S</strong> has nothing do with <strong>film_category</strong>. Yet it&#8217;s so commonly seen.</li>
<li>Query <strong>#2</strong>: We&#8217;re using the <strong>AS</strong> keyword now. We didn&#8217;t use it before.</li>
<li>Queries <strong>#1</strong>, <strong>#2</strong>: Hold on. Wasn&#8217;t <strong>C</strong> taken for <strong>customer</strong> in Query <strong>#1</strong>? Now, in Query <strong>#2</strong> it stands for <strong>category</strong>? I&#8217;m beginning to get confused.</li>
<li>Query <strong>#3</strong>: Now aliases are lower case; I was just getting used to them being upper case.</li>
<li>Query <strong>#3</strong>: But, hey, <strong>c</strong> is back to <strong>customer</strong>!</li>
<li>Query <strong>#3</strong>: Or, is it? Take a look at the subquery. Theres another <strong>c</strong> in there! This time it&#8217;s <strong>city</strong>! And it&#8217;s perfectly valid syntax. We actually have two identical aliases in the same query.</li>
<li>Query <strong>#3</strong>: If I could, I would name country with <strong>c</strong> as well. But I can&#8217;t. So why not throw in <strong>s</strong> again?</li>
<li>Query <strong>#3</strong>: and now I don&#8217;t even bother using the alias when accessing the <strong>create_date</strong>. Well, there&#8217;s no such column in any of the other tables!</li>
</ul>
<h4>Proper conventions</h4>
<p>What I find so disturbing is that whenever I read a complex query, I need to go back and forth, back and forth between table aliases (found everywhere in the query) and their declaration point. Such irregularities make the queries difficult to read.</p>
<p>Any of the above issues could be justified. But I wish to make some suggestions:</p>
<ul>
<li>Decide whether you&#8217;re going for upper or lower case.</li>
<li>Do not use the same alias twice in your query, even if it&#8217;s valid.</li>
<li>Aliases do not have to be single character. <strong>film_category</strong> may just as well be <strong>FC</strong>.</li>
<li>Do not alias something that is hard to interpret. <strong>s</strong> does not stand for <strong>country</strong>.</li>
<li>Think ahead: use same aliases throughout all your queries, as far as you can. If uniqueness is a problem, make for longer aliases. Use <strong>cust</strong> instead of <strong>c</strong>.</li>
</ul>
<p>The above should make for more organized and readable SQL code. Remember: what one programmer finds as a very intuitive alias, is unintuitive to another!</p>
<h4>My own convention</h4>
<p>Simple: I <em>only use aliases</em> when using self joins. I am aware that queries are much longer what with long table names. I go farther than that: I prefer fully qualifying questionable columns throughout the query. Yes, it makes the query even longer.</p>
<p>I know this does not appeal to many. But there&#8217;s no confusion. And it&#8217;s easily searchable. And it&#8217;s consistent. And if properly formatted, as in the above queries, is well readable.</p>
<p>Now please join me in asking Oracle if they can add multi-line Strings for java, as there are for python.</p>
]]></content:encoded>
			<wfw:commentRss>http://code.openark.org/blog/mysql/proper-sql-table-alias-use-conventions/feed</wfw:commentRss>
		<slash:comments>8</slash:comments>
		</item>
		<item>
		<title>What I look forward to hear on &#8220;State of the Dolphin&#8221;, 2010</title>
		<link>http://code.openark.org/blog/mysql/what-i-look-forward-to-hear-on-state-of-the-dolphin-2010</link>
		<comments>http://code.openark.org/blog/mysql/what-i-look-forward-to-hear-on-state-of-the-dolphin-2010#comments</comments>
		<pubDate>Mon, 01 Mar 2010 10:42:52 +0000</pubDate>
		<dc:creator>shlomi</dc:creator>
				<category><![CDATA[MySQL]]></category>
		<category><![CDATA[mysqlconf]]></category>
		<category><![CDATA[Opinions]]></category>

		<guid isPermaLink="false">http://code.openark.org/blog/?p=1999</guid>
		<description><![CDATA[Though most probably I won&#8217;t be there in person, here&#8217;s what I expect to hear from Edward Screven, Oracle, on the State of the Dolphin keynote, coming MySQL Conference &#38; Expo. I&#8217;m under the assumption that no shocking news are delivered. That is, that for the near future, it&#8217;s business as usual for MySQL. Last [...]]]></description>
			<content:encoded><![CDATA[<p>Though most probably I won&#8217;t be there in person, here&#8217;s what I expect to hear from <a href="http://en.oreilly.com/mysql2010/public/schedule/speaker/78864">Edward Screven</a>, Oracle, on the <a href="http://en.oreilly.com/mysql2010/public/schedule/detail/12440">State of the Dolphin</a> keynote, coming MySQL Conference &amp; Expo.</p>
<p>I&#8217;m under the assumption that no shocking news are delivered. That is, that for the near future, it&#8217;s business as usual for MySQL.</p>
<p>Last year&#8217;s great message, delivered by Karen Padir, was <em>&#8220;more community&#8221;</em>. More community participation, more community patches. Looking back, I&#8217;m not sure I saw that coming true. The 5.4 version was announced at that same conference, and was criticized for being community-oriented yet community-hidden. The latest 5.5 milestones announcement took everyone by surprise again. Ideas from Google patches were incorporated into 5.5M2. but, to the best of my understanding, no community patch was delievered.</p>
<p>I have both <a href="http://code.openark.org/blog/mysql/in-favour-of-a-milestone-based-release-model">congratulated and expressed my desire</a> that community took greater part in this.</p>
<h4>So what am I looking forward to hear?</h4>
<ol>
<li>Like everyone else, the general plans Oracle holds for MySQL. Again, I&#8217;m not expecting shocking news here.</li>
<li>The expected roadmap for MySQL, technically speaking. I don&#8217;t actually know if there is a roadmap right now.</li>
<li>The intended role for the MySQL community. Frankly, it would be just fine with me if Oracle were to say: &#8220;we will not accept community patches&#8221;, and that would be the end of it. That&#8217;s fine, because it&#8217;s their right, and it would be an honest announcement. Naturally, I&#8217;ll be much happier to hear &#8220;we will incorporate the best 20 community patches withing the next three days&#8221;. Somewhere in between, I&#8217;ll be really satisfied with a clear explanation of how Oracle sees the community, and how it would like to cooperate with it. Will it share the development plan with the community? Will it allow the community to have a say about what goes in or not?</li>
</ol>
<p><span id="more-1999"></span>I realize this must all be very pressing, what with the acquisition; big new company; new rules; new bosses; new things to learn. But I do believe it&#8217;s in Oracle&#8217;s best interest (and obligation) to speak up their mind on MySQL in relation to the community.</p>
<p>The situation where the users (not the community) don&#8217;t know what&#8217;s planned for MySQL on the technical level, what&#8217;s the next milestone, when the 5.4/5.5 versions are scheduled to be released, what will happen with all those features which were supposed to be incorporated into 5.2/6.0 &#8212; had better be done with quickly.</p>
<p>My congratulations to the MySQL team on the finalization of the acquisition, and best wishes to a smooth and successful merge into Oracle.</p>
]]></content:encoded>
			<wfw:commentRss>http://code.openark.org/blog/mysql/what-i-look-forward-to-hear-on-state-of-the-dolphin-2010/feed</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>In favour of a milestone based release model</title>
		<link>http://code.openark.org/blog/mysql/in-favour-of-a-milestone-based-release-model</link>
		<comments>http://code.openark.org/blog/mysql/in-favour-of-a-milestone-based-release-model#comments</comments>
		<pubDate>Tue, 15 Dec 2009 16:30:59 +0000</pubDate>
		<dc:creator>shlomi</dc:creator>
				<category><![CDATA[MySQL]]></category>
		<category><![CDATA[Opinions]]></category>

		<guid isPermaLink="false">http://code.openark.org/blog/?p=1740</guid>
		<description><![CDATA[I like milestone based release models. The advantages I find in this model are in particular beneficial for MySQL. What I find good about this model are: Things are unstable for shorter periods. Even if some feature is not full stable in some milestone, the model encourages that such a feature is fixed on higher [...]]]></description>
			<content:encoded><![CDATA[<p>I like milestone based release models.</p>
<p>The advantages I find in this model are in particular beneficial for MySQL. What I find good about this model are:</p>
<ul>
<li>Things are unstable for shorter periods. Even if some feature is not full stable in some milestone, the model encourages that such a feature is fixed on higher priority.</li>
<li>It is easy to create a priority ranking for new features. Moreover, priorities are expressed more by chronological time of development, less by &#8220;how many people are working on it&#8221;.</li>
<li>The model pushes towards rapid development, since you can&#8217;t release M5 before M4 is complete.</li>
</ul>
<p>The last versions of MySQL took long time to complete. Take 5.1, for example: partitioning and event scheduling were long considered GA before row-based replication was half stable. Consider the so small but useful sub-second slow logs; the variables made dynamic in 5.1 (slow log again, for example); the new INFORMATION_SCHEMA tables.</p>
<p><span id="more-1740"></span>Most of these took very little time to develop and stabilize, but had to wait extra couple of years till the entire version was evetually released.</p>
<p>There is a matter of stability question. Is M3 stable? Is M2?</p>
<p>Smaller, successive changes make for stabilized milestones; but this is vague: 5.5 is based on 5.4, in itself BETA. So is any 5.5 milestone stable?</p>
<p>Such issues need to be resolved. Like everything else in life, this model can be abused to no good, or can be properly implemented to make good success.</p>
<p>I&#8217;m glad to see google patches making it into the mainstream; I would love to see more community work merging in. I would love to have the community have a say about what should go into the next milestones.</p>
]]></content:encoded>
			<wfw:commentRss>http://code.openark.org/blog/mysql/in-favour-of-a-milestone-based-release-model/feed</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>MySQL Conference: what&#8217;s in a name?</title>
		<link>http://code.openark.org/blog/mysql/mysql-conference-whats-in-a-name</link>
		<comments>http://code.openark.org/blog/mysql/mysql-conference-whats-in-a-name#comments</comments>
		<pubDate>Mon, 27 Apr 2009 11:14:13 +0000</pubDate>
		<dc:creator>shlomi</dc:creator>
				<category><![CDATA[MySQL]]></category>
		<category><![CDATA[mysqlconf]]></category>
		<category><![CDATA[Opinions]]></category>

		<guid isPermaLink="false">http://code.openark.org/blog/?p=789</guid>
		<description><![CDATA[This is just something that I realized this morning. There were some talks about how the &#8220;MySQL Users Conference &#38; Expo&#8221; was renamed to &#8220;MySQL Conference &#38; Expo&#8221; &#8211; thereby omitting the &#8220;Users&#8221; part. The talk was something like &#8220;So where are we, the users, in this story?&#8221; But what I&#8217;ve just recalled was a [...]]]></description>
			<content:encoded><![CDATA[<p>This is just something that I realized this morning. There were some talks about how the &#8220;MySQL Users Conference &amp; Expo&#8221; was renamed to &#8220;MySQL Conference &amp; Expo&#8221; &#8211; thereby omitting the &#8220;Users&#8221; part. The talk was something like &#8220;So where are we, the users, in this story?&#8221;</p>
<p>But what I&#8217;ve just recalled was a discussion (was it previous year, or the one before that?) comparing the &#8220;PostgreSQL Conference&#8221; and the &#8220;MySQL Users Conference&#8221;, as it was named back then. In that discussion, the PostgreSQL people were bashing MySQL, saying that the &#8220;PostgreSQL Conference&#8221; was all about the database and whatever was around it, whilst the &#8220;MySQL Users Conference&#8221; clearly stated that the attendees were &#8220;just users&#8221;, not like real participants or members.</p>
<p><span id="more-789"></span>As I recall, it was a heat debate (and I apologize for not linking). I thought it was just semantics.</p>
<p>Anyway, here we are at 2009, there is no &#8220;Users&#8221;, it&#8217;s just like in PostgreSQL, and I still think it&#8217;s just semantics.</p>
<p>I think a name can mean whatever you want it to mean. It&#8217;s best to judge by actions, which is an altogether different thing.</p>
<p>I do not hold a position this way or the other.</p>
<p>This concludes my postings with regard to the MySQL (Users?) Conference &amp; Expo 2009, which were non-technical. I&#8217;ll keep to technical stuff in the future, I promise. I enjoyed the conference very much, a big applaude to the presenters and the organizers, and to the many friendly people who attended!</p>
]]></content:encoded>
			<wfw:commentRss>http://code.openark.org/blog/mysql/mysql-conference-whats-in-a-name/feed</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
	</channel>
</rss>
