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 jt...@apache.org on 2005/06/16 21:21:02 UTC

svn commit: r190987 - /incubator/derby/docs/trunk/src/ref/rrefsqljcreatesynonym.dita /incubator/derby/docs/trunk/src/ref/rrefsqljdropsynonym.dita /incubator/derby/docs/trunk/src/ref/rrefsynonymname.dita

Author: jta
Date: Thu Jun 16 12:21:01 2005
New Revision: 190987

URL: http://svn.apache.org/viewcvs?rev=190987&view=rev
Log:
DERBY-347 Committed Jeff Levitt's patch that documents SYNONYM support.

Added:
    incubator/derby/docs/trunk/src/ref/rrefsqljcreatesynonym.dita
    incubator/derby/docs/trunk/src/ref/rrefsqljdropsynonym.dita
    incubator/derby/docs/trunk/src/ref/rrefsynonymname.dita

Added: incubator/derby/docs/trunk/src/ref/rrefsqljcreatesynonym.dita
URL: http://svn.apache.org/viewcvs/incubator/derby/docs/trunk/src/ref/rrefsqljcreatesynonym.dita?rev=190987&view=auto
==============================================================================
--- incubator/derby/docs/trunk/src/ref/rrefsqljcreatesynonym.dita (added)
+++ incubator/derby/docs/trunk/src/ref/rrefsqljcreatesynonym.dita Thu Jun 16 12:21:01 2005
@@ -0,0 +1,52 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!DOCTYPE reference PUBLIC "-//IBM//DTD DITA Reference//EN"
+ "../dtd/reference.dtd">
+<!-- 
+Copyright 1997, 2004 The Apache Software Foundation or its licensors, as applicable.  
+
+Licensed under the Apache License, Version 2.0 (the "License");  
+you may not use this file except in compliance with the License.  
+You may obtain a copy of the License at      
+
+http://www.apache.org/licenses/LICENSE-2.0  
+
+Unless required by applicable law or agreed to in writing, software  
+distributed under the License is distributed on an "AS IS" BASIS,  
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.  
+See the License for the specific language governing permissions and  
+limitations under the License.
+-->
+<reference id="rrefsqljcreatesynonym" xml:lang="en-us">
+<title>CREATE SYNONYM statement</title>
+<prolog><metadata>
+<keywords><indexterm>CREATE SYNONYM statement</indexterm><indexterm>Synonyms<indexterm>creating</indexterm></indexterm>
+</keywords>
+</metadata></prolog>
+<refbody>
+<section><p>Use the CREATE SYNONYM statement to provide an alternate name
+for a table or a view that is present in the same schema or another schema.
+You can also create synonyms for other synonyms, resulting in nested synonyms.
+A synonym can be used instead of the original qualified table or view name
+in SELECT, INSERT, UPDATE, DELETE or LOCK TABLE statements. You can create
+a synonym for a table or a view that doesn't exist, but the target table or
+view must be present before the synonym can be used.</p><p>Synonyms share
+the same namespace as tables or views. You cannot create a synonym with the
+same name as a table that already exists in the same schema. Similarly, you
+cannot create a table or view with a name that matches a synonym already present.</p><p>A
+synonym can be defined for a table/view that does not exist when you create
+the synonym. If the table or view doesn't exist, you will receive a warning
+message (SQLSTATE  01522). The referenced object must be present when you
+use a synonym in a DML statement.</p><p>You can create a nested synonym (a
+synonym for another synonym), but any attempt to create a synonym that results
+in a circular reference will return an error message (SQLSTATE 42916).</p><p>Synonyms cannot be defined in system schemas. All schemas starting with 'SYS' are considered system schemas and are reserved by <ph conref="refconrefs.dita#prod/productshortname"></ph>.</p><p>A synonym cannot
+be defined on a temporary table. Attempting to define a synonym on a temporary
+table will return an error message (SQLSTATE XCL51).</p></section>
+<section><title>Syntax</title><codeblock><b>CREATE SYNONYM <xref href="rrefsynonymname.dita#rrefsynonymname"></xref> FOR { <xref
+href="rrefviewname.dita#rrefviewname"></xref> | <xref href="rreftablename.dita#rreftablename"></xref> }</b></codeblock>The <xref
+href="rrefsynonymname.dita#rrefsynonymname"></xref> in the statement represents
+the synonym name you are giving the target table or view, while the <xref
+href="rrefviewname.dita#rrefviewname"></xref> or <xref href="rreftablename.dita#rreftablename"></xref> represents
+the original name of the target table or view.</section>
+<example><title>Example</title>CREATE SYNONYM SAMP.T1 FOR SAMP.TABLEWITHLONGNAME</example>
+</refbody>
+</reference>

Added: incubator/derby/docs/trunk/src/ref/rrefsqljdropsynonym.dita
URL: http://svn.apache.org/viewcvs/incubator/derby/docs/trunk/src/ref/rrefsqljdropsynonym.dita?rev=190987&view=auto
==============================================================================
--- incubator/derby/docs/trunk/src/ref/rrefsqljdropsynonym.dita (added)
+++ incubator/derby/docs/trunk/src/ref/rrefsqljdropsynonym.dita Thu Jun 16 12:21:01 2005
@@ -0,0 +1,31 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- 
+Copyright 1997, 2004 The Apache Software Foundation or its licensors, as applicable.  
+
+Licensed under the Apache License, Version 2.0 (the "License");  
+you may not use this file except in compliance with the License.  
+You may obtain a copy of the License at      
+
+http://www.apache.org/licenses/LICENSE-2.0  
+
+Unless required by applicable law or agreed to in writing, software  
+distributed under the License is distributed on an "AS IS" BASIS,  
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.  
+See the License for the specific language governing permissions and  
+limitations under the License.
+-->
+
+<!DOCTYPE reference PUBLIC "-//IBM//DTD DITA Reference//EN"
+ "../dtd/reference.dtd">
+<reference id="rrefsqljdropsynonym" xml:lang="en-us">
+<title>DROP SYNONYM statement</title>
+<prolog><metadata>
+<keywords><indexterm>DROP SYNONYM statement</indexterm><indexterm>Synonyms<indexterm>dropping</indexterm></indexterm>
+</keywords>
+</metadata></prolog>
+<refbody>
+<section> <p>Drops the specified synonym from a table or view.</p></section>
+<refsyn><title>Syntax</title> <codeblock><b>DROP SYNONYM <xref href="rrefsynonymname.dita#rrefsynonymname"></xref></b></codeblock> </refsyn>
+</refbody>
+</reference>
+

Added: incubator/derby/docs/trunk/src/ref/rrefsynonymname.dita
URL: http://svn.apache.org/viewcvs/incubator/derby/docs/trunk/src/ref/rrefsynonymname.dita?rev=190987&view=auto
==============================================================================
--- incubator/derby/docs/trunk/src/ref/rrefsynonymname.dita (added)
+++ incubator/derby/docs/trunk/src/ref/rrefsynonymname.dita Thu Jun 16 12:21:01 2005
@@ -0,0 +1,27 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!DOCTYPE reference PUBLIC "-//IBM//DTD DITA Reference//EN"
+ "../dtd/reference.dtd">
+<!-- 
+Copyright 1997, 2004 The Apache Software Foundation or its licensors, as applicable.  
+
+Licensed under the Apache License, Version 2.0 (the "License");  
+you may not use this file except in compliance with the License.  
+You may obtain a copy of the License at      
+
+http://www.apache.org/licenses/LICENSE-2.0  
+
+Unless required by applicable law or agreed to in writing, software  
+distributed under the License is distributed on an "AS IS" BASIS,  
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.  
+See the License for the specific language governing permissions and  
+limitations under the License.
+-->
+<reference id="rrefsynonymname" xml:lang="en-us">
+<title>synonym-Name</title>
+<refbody>
+<section><p>A <i>synonym-Name</i> represents a synonym for a table or a view.
+You can qualify a <i>synonym-Name</i> with a <i>schema-Name</i>.</p></section>
+<section><title>Syntax</title> <codeblock><b>[ <i><xref href="rrefschemaname.dita#rrefschemaname"></xref>.</i> ] <i><xref
+href="crefsqlj34834.dita#crefsqlj34834"></xref></i></b></codeblock></section>
+</refbody>
+</reference>