<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	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/"
		>
<channel>
	<title>Comments on: Creating an Index with Hibernate</title>
	<atom:link href="http://javablog.co.uk/2010/01/04/creating-an-index-with-hibernate/feed/" rel="self" type="application/rss+xml" />
	<link>http://javablog.co.uk/2010/01/04/creating-an-index-with-hibernate/</link>
	<description>by Java coders, for Java coders</description>
	<lastBuildDate>Tue, 15 Nov 2011 21:34:57 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2.1</generator>
	<item>
		<title>By: zet</title>
		<link>http://javablog.co.uk/2010/01/04/creating-an-index-with-hibernate/comment-page-1/#comment-200707</link>
		<dc:creator>zet</dc:creator>
		<pubDate>Tue, 15 Nov 2011 21:34:57 +0000</pubDate>
		<guid isPermaLink="false">http://javablog.co.uk/?p=214#comment-200707</guid>
		<description>&lt;p&gt;Thanks for sharing.&lt;/p&gt;

&lt;p&gt;Why aren&#039;t there any new blog entries?&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p>Thanks for sharing.</p>

<p>Why aren&#8217;t there any new blog entries?</p>]]></content:encoded>
	</item>
	<item>
		<title>By: Tim Mattison</title>
		<link>http://javablog.co.uk/2010/01/04/creating-an-index-with-hibernate/comment-page-1/#comment-162283</link>
		<dc:creator>Tim Mattison</dc:creator>
		<pubDate>Wed, 06 Apr 2011 14:34:41 +0000</pubDate>
		<guid isPermaLink="false">http://javablog.co.uk/?p=214#comment-162283</guid>
		<description>&lt;p&gt;Guys, I think the real purpose for this mechanism (that is, automatically generating the database from your Java classes via Hibernate) is to save you the work of doing that process by hand.  If Hibernate doesn&#039;t provide this mechanism then you have to go through each class and carefully script every class and data member.  There is little to no benefit of doing that since you have to precisely match what Hibernate would&#039;ve generated anyway.&lt;/p&gt;

&lt;p&gt;That said you would only really use this to generate the database in a development environment and you&#039;d distribute SQL scripts based off of that.  When you do an upgrade that modifies the schema you&#039;d rebuild your development environment, use a tool that can do a schema diff (like DB Solo, or Aqua Data Studio) against production, and then tune the result by hand.&lt;/p&gt;

&lt;p&gt;This auto-generation feature is mostly for convenience in development because there are schema changes that Hibernate can&#039;t act on automatically.  With those kind of changes there&#039;s a chance Hibernate will do something stupid but it appears to try pretty hard to avoid those situations and favors inaction versus dropping tables or columns.&lt;/p&gt;

&lt;p&gt;Creating indexes using this feature means that you don&#039;t need to have developers write the application, test it, then have a DBA go in and re-create the schema by hand and put those indexes in that the developers already determined were necessary.  The flip side of this is that there should always be a DBA on the other end of the process determining what indexes the developers missed.  That information should be communicated back to the developers so they can either add it to the codebase in the form of annotations or as an automated process that adds the proper SQL to any and all SQL scripts that come out of their development environments.  The fewer manual steps in the process the more reliable your final build will be.&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p>Guys, I think the real purpose for this mechanism (that is, automatically generating the database from your Java classes via Hibernate) is to save you the work of doing that process by hand.  If Hibernate doesn&#8217;t provide this mechanism then you have to go through each class and carefully script every class and data member.  There is little to no benefit of doing that since you have to precisely match what Hibernate would&#8217;ve generated anyway.</p>

<p>That said you would only really use this to generate the database in a development environment and you&#8217;d distribute SQL scripts based off of that.  When you do an upgrade that modifies the schema you&#8217;d rebuild your development environment, use a tool that can do a schema diff (like DB Solo, or Aqua Data Studio) against production, and then tune the result by hand.</p>

<p>This auto-generation feature is mostly for convenience in development because there are schema changes that Hibernate can&#8217;t act on automatically.  With those kind of changes there&#8217;s a chance Hibernate will do something stupid but it appears to try pretty hard to avoid those situations and favors inaction versus dropping tables or columns.</p>

<p>Creating indexes using this feature means that you don&#8217;t need to have developers write the application, test it, then have a DBA go in and re-create the schema by hand and put those indexes in that the developers already determined were necessary.  The flip side of this is that there should always be a DBA on the other end of the process determining what indexes the developers missed.  That information should be communicated back to the developers so they can either add it to the codebase in the form of annotations or as an automated process that adds the proper SQL to any and all SQL scripts that come out of their development environments.  The fewer manual steps in the process the more reliable your final build will be.</p>]]></content:encoded>
	</item>
	<item>
		<title>By: Tiny Tim</title>
		<link>http://javablog.co.uk/2010/01/04/creating-an-index-with-hibernate/comment-page-1/#comment-159569</link>
		<dc:creator>Tiny Tim</dc:creator>
		<pubDate>Fri, 11 Mar 2011 14:08:59 +0000</pubDate>
		<guid isPermaLink="false">http://javablog.co.uk/?p=214#comment-159569</guid>
		<description>&lt;p&gt;Abstracting the persistence layer from SQL scares you? Too bad.&lt;/p&gt;

&lt;p&gt;No one cares what you think, naysayers. Just cuz you don&#039;t want it doesn&#039;t mean there aren&#039;t people who do. &lt;/p&gt;

&lt;p&gt;You don&#039;t get it? Try reading a book or thinking before you type.&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p>Abstracting the persistence layer from SQL scares you? Too bad.</p>

<p>No one cares what you think, naysayers. Just cuz you don&#8217;t want it doesn&#8217;t mean there aren&#8217;t people who do. </p>

<p>You don&#8217;t get it? Try reading a book or thinking before you type.</p>]]></content:encoded>
	</item>
	<item>
		<title>By: dale</title>
		<link>http://javablog.co.uk/2010/01/04/creating-an-index-with-hibernate/comment-page-1/#comment-154961</link>
		<dc:creator>dale</dc:creator>
		<pubDate>Fri, 11 Feb 2011 16:46:11 +0000</pubDate>
		<guid isPermaLink="false">http://javablog.co.uk/?p=214#comment-154961</guid>
		<description>&lt;p&gt;&quot;Learning how to execute a shell script or SQL script should be easier than learning a convoluted Hibernate API to do non standard operations&quot;&lt;/p&gt;

&lt;p&gt;too right. especially when these days 14 year old kidscan execute sql scripts easy, piece of cake.&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p>&#8220;Learning how to execute a shell script or SQL script should be easier than learning a convoluted Hibernate API to do non standard operations&#8221;</p>

<p>too right. especially when these days 14 year old kidscan execute sql scripts easy, piece of cake.</p>]]></content:encoded>
	</item>
	<item>
		<title>By: Bojan</title>
		<link>http://javablog.co.uk/2010/01/04/creating-an-index-with-hibernate/comment-page-1/#comment-136383</link>
		<dc:creator>Bojan</dc:creator>
		<pubDate>Thu, 11 Nov 2010 15:06:34 +0000</pubDate>
		<guid isPermaLink="false">http://javablog.co.uk/?p=214#comment-136383</guid>
		<description>&lt;p&gt;Sub, I don&#039;t understand your point. DBs, tables, indices and other DB objects were created automatically long before JPA. You just insure that DDL invocation is part of singe-click installation.&lt;/p&gt;

&lt;p&gt;I agree with Diego on this completely.&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p>Sub, I don&#8217;t understand your point. DBs, tables, indices and other DB objects were created automatically long before JPA. You just insure that DDL invocation is part of singe-click installation.</p>

<p>I agree with Diego on this completely.</p>]]></content:encoded>
	</item>
	<item>
		<title>By: sub</title>
		<link>http://javablog.co.uk/2010/01/04/creating-an-index-with-hibernate/comment-page-1/#comment-101852</link>
		<dc:creator>sub</dc:creator>
		<pubDate>Thu, 22 Jul 2010 12:24:38 +0000</pubDate>
		<guid isPermaLink="false">http://javablog.co.uk/?p=214#comment-101852</guid>
		<description>&lt;p&gt;what if my product is downloaded by lot of people without db knowledge and they wants single click installation. creating tables,indexes etc should happen programatically.&lt;/p&gt;

&lt;p&gt;So i think creating table , index etc should be part of jpa spec&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p>what if my product is downloaded by lot of people without db knowledge and they wants single click installation. creating tables,indexes etc should happen programatically.</p>

<p>So i think creating table , index etc should be part of jpa spec</p>]]></content:encoded>
	</item>
	<item>
		<title>By: Diego Bravo</title>
		<link>http://javablog.co.uk/2010/01/04/creating-an-index-with-hibernate/comment-page-1/#comment-95546</link>
		<dc:creator>Diego Bravo</dc:creator>
		<pubDate>Thu, 20 May 2010 23:29:25 +0000</pubDate>
		<guid isPermaLink="false">http://javablog.co.uk/?p=214#comment-95546</guid>
		<description>&lt;p&gt;IMO this &quot;facility&quot; must be carefully restricted to development environments. It would be catastrophic is a bug in the application goes to the point of issuing a remaining DROP TABLE X; CREATE TABLE X in production.&lt;/p&gt;

&lt;p&gt;Since this CAN happen, I simply avoid using it. Ever. Yet I can&#039;t understand why it would be preferable to executing an SQL script. Learning how to execute a shell script or SQL script should be easier than learning a convoluted Hibernate API to do non standard operations. Of course YMMV.&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p>IMO this &#8220;facility&#8221; must be carefully restricted to development environments. It would be catastrophic is a bug in the application goes to the point of issuing a remaining DROP TABLE X; CREATE TABLE X in production.</p>

<p>Since this CAN happen, I simply avoid using it. Ever. Yet I can&#8217;t understand why it would be preferable to executing an SQL script. Learning how to execute a shell script or SQL script should be easier than learning a convoluted Hibernate API to do non standard operations. Of course YMMV.</p>]]></content:encoded>
	</item>
	<item>
		<title>By: Sam</title>
		<link>http://javablog.co.uk/2010/01/04/creating-an-index-with-hibernate/comment-page-1/#comment-89245</link>
		<dc:creator>Sam</dc:creator>
		<pubDate>Thu, 22 Apr 2010 16:39:35 +0000</pubDate>
		<guid isPermaLink="false">http://javablog.co.uk/?p=214#comment-89245</guid>
		<description>&lt;p&gt;@Caleb Hibernate can create schemas automatically from the Java classes. But if using Hibernate to communicate with an existing schema, then you&#039;re right, this should be part of the schema.&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p>@Caleb Hibernate can create schemas automatically from the Java classes. But if using Hibernate to communicate with an existing schema, then you&#8217;re right, this should be part of the schema.</p>]]></content:encoded>
	</item>
	<item>
		<title>By: Caleb</title>
		<link>http://javablog.co.uk/2010/01/04/creating-an-index-with-hibernate/comment-page-1/#comment-89202</link>
		<dc:creator>Caleb</dc:creator>
		<pubDate>Thu, 22 Apr 2010 14:07:21 +0000</pubDate>
		<guid isPermaLink="false">http://javablog.co.uk/?p=214#comment-89202</guid>
		<description>&lt;p&gt;Why would you use Hibernate to create an index instead of just designing the right indexes into your database schema in the first place?&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p>Why would you use Hibernate to create an index instead of just designing the right indexes into your database schema in the first place?</p>]]></content:encoded>
	</item>
</channel>
</rss>

