public static String convertJavaStyletoDBConvention( String name )
	{
		char[] chars = name.toCharArray();
		StringBuffer buf = new StringBuffer();
		for( int i = 0; i < chars.length; i++ )
		{
			// if there is a single upper-case letter, then it's a case-word
			if( Character.isUpperCase( chars[i] ) )
			{
				if( (i > 0) && ((i + 1) < chars.length) )
				{
					if( !Character.isUpperCase( chars[i + 1] ) )
					{
						buf.append( "_" );
					}
				}
				buf.append( chars[i] );
			}
			else
			{
				buf.append( Character.toUpperCase( chars[i] ) );
			}
		}
		return buf.toString();
	}