You are viewing a plain text version of this content. The canonical link for it is here.
Posted to derby-commits@db.apache.org by ch...@apache.org on 2013/08/29 19:52:05 UTC

svn commit: r1518727 - in /db/derby/docs/branches/10.10/src: devguide/cdevcollationattribs.dita devguide/cdevcollationexamples.dita devguide/derbydev.ditamap ref/rrefattrib56769.dita ref/rrefsqlj20937.dita ref/rrefsqlj58560.dita

Author: chaase3
Date: Thu Aug 29 17:52:04 2013
New Revision: 1518727

URL: http://svn.apache.org/r1518727
Log:
DERBY-4629  Explicitly document how to get case-insensitive sorts and comparisons of string data 

Merged patch DERBY-4629.diff to 10.10 doc branch from trunk revision 1517897.

Added:
    db/derby/docs/branches/10.10/src/devguide/cdevcollationexamples.dita
      - copied unchanged from r1517897, db/derby/docs/trunk/src/devguide/cdevcollationexamples.dita
Modified:
    db/derby/docs/branches/10.10/src/devguide/cdevcollationattribs.dita
    db/derby/docs/branches/10.10/src/devguide/derbydev.ditamap
    db/derby/docs/branches/10.10/src/ref/rrefattrib56769.dita
    db/derby/docs/branches/10.10/src/ref/rrefsqlj20937.dita
    db/derby/docs/branches/10.10/src/ref/rrefsqlj58560.dita

Modified: db/derby/docs/branches/10.10/src/devguide/cdevcollationattribs.dita
URL: http://svn.apache.org/viewvc/db/derby/docs/branches/10.10/src/devguide/cdevcollationattribs.dita?rev=1518727&r1=1518726&r2=1518727&view=diff
==============================================================================
--- db/derby/docs/branches/10.10/src/devguide/cdevcollationattribs.dita (original)
+++ db/derby/docs/branches/10.10/src/devguide/cdevcollationattribs.dita Thu Aug 29 17:52:04 2013
@@ -73,65 +73,7 @@ that only differences in base letters ar
 </row>
 </tbody>
 </tgroup>
-</table></section>
-<section><title>Collation examples</title><p>With Unicode codepoint collation
-(UCS_BASIC), the numeric values of the Unicode encoding of the characters
-are used directly for ordering. For example, the FRUIT table contains the NAME
-column that uses the VARCHAR(20) data type. The contents of the NAME column
-are:<sl>
-<sli>orange</sli>
-<sli>apple</sli>
-<sli>Banana</sli>
-<sli>Pineapple</sli>
-<sli>Grape</sli>
-</sl></p><p>UCS_BASIC collation sorts all uppercase letters before lowercase
-letters. The statement <codeph>SELECT * FROM FRUIT ORDER BY NAME</codeph>
-returns the following: <sl>
-<sli>Banana</sli>
-<sli>Grape</sli>
-<sli>Pineapple</sli>
-<sli>apple</sli>
-<sli>orange</sli>
-</sl></p>
-<p>The above result also appears if you specify <i>territory=ll_CC</i> but do
-not specify <i>collation=collation</i>.</p>
-<p>If the database is created with the <i>territory=ll_CC</i> attribute
-set to <i>en_US</i> (English language, United States country code) and the
-<i>collation=collation</i> attribute set to TERRITORY_BASED, the statement
-<codeph>SELECT * FROM FRUIT ORDER BY NAME</codeph> returns: <sl>
-<sli>apple</sli>
-<sli>Banana</sli>
-<sli>Grape</sli>
-<sli>orange</sli>
-<sli>Pineapple</sli>
-</sl></p>
-<p>The collation set for the database also impacts comparison operators
-on character data types. For example, the statement <codeph>SELECT * FROM
-FRUIT WHERE NAME > 'Banana' ORDER BY NAME</codeph> returns:</p>
-<simpletable frame="none">
-<sthead>
-<stentry>UCS_BASIC collation</stentry>
-<stentry>Locale-based collation</stentry>
-</sthead>
-<strow>
-<stentry>Grape</stentry>
-<stentry>Grape</stentry>
-</strow>
-<strow>
-<stentry>Pineapple</stentry>
-<stentry>orange</stentry>
-</strow>
-<strow>
-<stentry>apple</stentry>
-<stentry>Pineapple</stentry>
-</strow>
-<strow>
-<stentry>orange</stentry>
-<stentry>&nbsp;</stentry>
-</strow>
-</simpletable>
-<p>For information on creating case-insensitive databases, see
-<xref href="tdevdvlpcaseinscoll.dita#tdevdvlpcaseinscoll"></xref>.</p>
+</table>
 </section>
 </conbody>
 </concept>

Modified: db/derby/docs/branches/10.10/src/devguide/derbydev.ditamap
URL: http://svn.apache.org/viewvc/db/derby/docs/branches/10.10/src/devguide/derbydev.ditamap?rev=1518727&r1=1518726&r2=1518727&view=diff
==============================================================================
--- db/derby/docs/branches/10.10/src/devguide/derbydev.ditamap (original)
+++ db/derby/docs/branches/10.10/src/devguide/derbydev.ditamap Thu Aug 29 17:52:04 2013
@@ -48,6 +48,7 @@ limitations under the License.
 <relcell>
 <topicref href="cdevcollationlocale.dita" navtitle="Locale-based collation"></topicref>
 <topicref href="cdevcollationattribs.dita" navtitle="Database connection URL attributes that control collation"></topicref>
+<topicref href="cdevcollationexamples.dita" navtitle="Examples of case-sensitive and case-insensitive string sorting"></topicref>
 <topicref href="cdevcollationlikeequal.dita" navtitle="Differences between LIKE and equal (=) comparisons"></topicref>
 <topicref href="tdevdvlpcollation.dita" navtitle="Creating a database with locale-based collation"></topicref>
 <topicref href="tdevdvlpcaseinscoll.dita" navtitle="Creating a case-insensitive database"></topicref>
@@ -60,6 +61,7 @@ limitations under the License.
 </relcell>
 <relcell>
 <topicref href="cdevcollationattribs.dita" navtitle="Database connection URL attributes that control collation"></topicref>
+<topicref href="cdevcollationexamples.dita" navtitle="Examples of case-sensitive and case-insensitive string sorting"></topicref>
 <topicref href="cdevcollationlikeequal.dita" navtitle="Differences between LIKE and equal (=) comparisons"></topicref>
 <topicref href="tdevdvlpcollation.dita" navtitle="Creating a database with locale-based collation"></topicref>
 <topicref href="tdevdvlpcaseinscoll.dita" navtitle="Creating a case-insensitive database"></topicref>
@@ -71,6 +73,18 @@ limitations under the License.
 <topicref href="cdevcollationattribs.dita" navtitle="Database connection URL attributes that control collation"></topicref>
 </relcell>
 <relcell>
+<topicref href="cdevcollationexamples.dita" navtitle="Examples of case-sensitive and case-insensitive string sorting"></topicref>
+<topicref href="cdevcollationlikeequal.dita" navtitle="Differences between LIKE and equal (=) comparisons"></topicref>
+<topicref href="tdevdvlpcollation.dita" navtitle="Creating a database with locale-based collation"></topicref>
+<topicref href="tdevdvlpcaseinscoll.dita" navtitle="Creating a case-insensitive database"></topicref>
+<topicref href="tdevdvlpcustomcollation.dita" navtitle="Creating a customized collator"></topicref>
+</relcell>
+</relrow>
+<relrow>
+<relcell>
+<topicref href="cdevcollationexamples.dita" navtitle="Examples of case-sensitive and case-insensitive string sorting"></topicref>
+</relcell>
+<relcell>
 <topicref href="cdevcollationlikeequal.dita" navtitle="Differences between LIKE and equal (=) comparisons"></topicref>
 <topicref href="tdevdvlpcollation.dita" navtitle="Creating a database with locale-based collation"></topicref>
 <topicref href="tdevdvlpcaseinscoll.dita" navtitle="Creating a case-insensitive database"></topicref>
@@ -2063,6 +2077,8 @@ with updatable result sets"></topicref>
 </topicref>
 <topicref href="cdevcollationattribs.dita" navtitle="Database connection URL attributes that control collation">
 </topicref>
+<topicref href="cdevcollationexamples.dita" navtitle="Examples of case-sensitive and case-insensitive string sorting">
+</topicref>
 <topicref href="cdevcollationlikeequal.dita" navtitle="Differences between LIKE and equal (=) comparisons">
 </topicref>
 </topicref>

Modified: db/derby/docs/branches/10.10/src/ref/rrefattrib56769.dita
URL: http://svn.apache.org/viewvc/db/derby/docs/branches/10.10/src/ref/rrefattrib56769.dita?rev=1518727&r1=1518726&r2=1518727&view=diff
==============================================================================
--- db/derby/docs/branches/10.10/src/ref/rrefattrib56769.dita (original)
+++ db/derby/docs/branches/10.10/src/ref/rrefattrib56769.dita Thu Aug 29 17:52:04 2013
@@ -123,7 +123,11 @@ and Mexican nationality.</p>
 <xref href="rrefattribcollation.dita#rrefattribcollation">
 <i>collation=collation</i></xref> attribute with
 the <i>territory=ll_CC</i> attribute to specify that collation is based
-on the locale, instead of being based on Unicode codepoint collation</p>
+on the locale, instead of being based on Unicode codepoint collation. For more
+information, see "Creating a database with locale-based collation", 
+"Creating a case-insensitive database", and "Character-based collation in
+<ph conref="../conrefs.dita#prod/productshortname"></ph>" in the
+<ph conref="../conrefs.dita#pub/citdevelop"></ph>.</p>
 </section>
 </refbody>
 </reference>

Modified: db/derby/docs/branches/10.10/src/ref/rrefsqlj20937.dita
URL: http://svn.apache.org/viewvc/db/derby/docs/branches/10.10/src/ref/rrefsqlj20937.dita?rev=1518727&r1=1518726&r2=1518727&view=diff
==============================================================================
--- db/derby/docs/branches/10.10/src/ref/rrefsqlj20937.dita (original)
+++ db/derby/docs/branches/10.10/src/ref/rrefsqlj20937.dita Thu Aug 29 17:52:04 2013
@@ -56,7 +56,18 @@ the column name causes <ph conref="../co
 use descending order for the column to create the index. Using the descending
 order for a column can help improve the performance of queries that require
 the results in mixed sort order or descending order and for queries that select
-the minimum or maximum value of an indexed column.</p><p>If a qualified index
+the minimum or maximum value of an indexed column.</p>
+<p>Sorting and ordering of character data is controlled by the collation
+specified for a database when it is created, as well as the locale of the
+database. For details, see
+<xref href="rrefattribcollation.dita#rrefattribcollation"><i>collation=collation</i> attribute</xref>
+and
+<xref href="rrefattrib56769.dita#rrefattrib56769"><i>territory=ll_CC</i> attribute</xref>,
+as well as the sections "Creating a database with locale-based collation",
+"Creating a case-insensitive database", and "Character-based collation in 
+<ph conref="../conrefs.dita#prod/productshortname"></ph>" in the
+<ph conref="../conrefs.dita#pub/citdevelop"></ph>.</p>
+<p>If a qualified index
 name is specified, the schema name cannot begin with <codeph>SYS</codeph>.</p> </refsyn>
 <section id="sqlj27363"><title>Indexes and constraints</title><p>Unique, primary
 key, and foreign key constraints generate indexes that enforce or "back" the

Modified: db/derby/docs/branches/10.10/src/ref/rrefsqlj58560.dita
URL: http://svn.apache.org/viewvc/db/derby/docs/branches/10.10/src/ref/rrefsqlj58560.dita?rev=1518727&r1=1518726&r2=1518727&view=diff
==============================================================================
--- db/derby/docs/branches/10.10/src/ref/rrefsqlj58560.dita (original)
+++ db/derby/docs/branches/10.10/src/ref/rrefsqlj58560.dita Thu Aug 29 17:52:04 2013
@@ -22,11 +22,23 @@ limitations under the License.
 <title>Data type assignments and comparison, sorting, and ordering</title>
 <shortdesc></shortdesc>
 <prolog><metadata>
-<keywords><indexterm>data types<indexterm>assignments and comparisions</indexterm></indexterm>
+<keywords><indexterm>data types<indexterm>assignments and comparisons</indexterm></indexterm>
 </keywords>
 </metadata></prolog>
 <refbody>
-<section><p>The following table displays valid assignments between data types in
+<section><p>The tables in this section show valid assignments and comparisons
+between <ph conref="../conrefs.dita#prod/productshortname"></ph> data types.</p>
+<p>Sorting and ordering of character data is controlled by the collation
+specified for a database when it is created, as well as the locale of the
+database. For details, see
+<xref href="rrefattribcollation.dita#rrefattribcollation"><i>collation=collation</i> attribute</xref>
+and
+<xref href="rrefattrib56769.dita#rrefattrib56769"><i>territory=ll_CC</i> attribute</xref>,
+as well as the sections "Creating a database with locale-based collation",
+"Creating a case-insensitive database", and "Character-based collation in 
+<ph conref="../conrefs.dita#prod/productshortname"></ph>" in the
+<ph conref="../conrefs.dita#pub/citdevelop"></ph>.</p>
+<p>The following table displays valid assignments between data types in
 <ph conref="../conrefs.dita#prod/productshortname"></ph>. A "Y" indicates that
 the assignment is valid.</p>
 <table>