xref: /trunk/main/helpcontent2/source/text/shared/explorer/database/05020000.xhp (revision 613d87f36a2d4346767efb74c689ca877ee61c5b)
1cdf0e10cSrcweir<?xml version="1.0" encoding="UTF-8"?>
2cdf0e10cSrcweir
30ba1032bSAndrew Rist<!--***********************************************************
4cdf0e10cSrcweir *
50ba1032bSAndrew Rist * Licensed to the Apache Software Foundation (ASF) under one
60ba1032bSAndrew Rist * or more contributor license agreements.  See the NOTICE file
70ba1032bSAndrew Rist * distributed with this work for additional information
80ba1032bSAndrew Rist * regarding copyright ownership.  The ASF licenses this file
90ba1032bSAndrew Rist * to you under the Apache License, Version 2.0 (the
100ba1032bSAndrew Rist * "License"); you may not use this file except in compliance
110ba1032bSAndrew Rist * with the License.  You may obtain a copy of the License at
12cdf0e10cSrcweir *
130ba1032bSAndrew Rist *   http://www.apache.org/licenses/LICENSE-2.0
14cdf0e10cSrcweir *
150ba1032bSAndrew Rist * Unless required by applicable law or agreed to in writing,
160ba1032bSAndrew Rist * software distributed under the License is distributed on an
170ba1032bSAndrew Rist * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
180ba1032bSAndrew Rist * KIND, either express or implied.  See the License for the
190ba1032bSAndrew Rist * specific language governing permissions and limitations
200ba1032bSAndrew Rist * under the License.
21cdf0e10cSrcweir *
220ba1032bSAndrew Rist ***********************************************************-->
230ba1032bSAndrew Rist
240a82033bSmseidel<helpdocument version="1.0">
25cdf0e10cSrcweir<meta>
26cdf0e10cSrcweir<topic id="textsharedexplorerdatabase05020000xml" indexer="include">
27cdf0e10cSrcweir<title id="tit" xml-lang="en-US">Relations</title>
28cdf0e10cSrcweir<filename>/text/shared/explorer/database/05020000.xhp</filename>
29cdf0e10cSrcweir</topic>
30cdf0e10cSrcweir</meta>
31cdf0e10cSrcweir<body>
32cdf0e10cSrcweir<section id="relationen">
33cdf0e10cSrcweir<bookmark xml-lang="en-US" branch="hid/DBACCESS_HID_CTL_RELATIONTAB" id="bm_id3153345" localize="false"/>
34*613d87f3Smseidel<paragraph role="heading" id="hd_id3153323" xml-lang="en-US" level="1" l10n="U"><link href="text/shared/explorer/database/05020000.xhp" name="Relations">Relations</link></paragraph>
3582a98929Smseidel<bookmark xml-lang="en-US" branch="index" id="bm_id3146957">
3682a98929Smseidel<bookmark_value>relational databases (Base)</bookmark_value>
37cdf0e10cSrcweir</bookmark><comment>mw added "(Base)"</comment>
38*613d87f3Smseidel<paragraph role="paragraph" id="par_id3146957" xml-lang="en-US" l10n="U">This command opens the <emph>Relation Design</emph> window, which allows you to define relationships between various database tables.</paragraph>
39cdf0e10cSrcweir</section>
40*613d87f3Smseidel<paragraph role="paragraph" id="par_id3154823" xml-lang="en-US" l10n="CHG"><ahelp hid="HID_CTL_RELATIONTAB">Here you can link together tables from the current database through common data fields.</ahelp> Click the <emph>New Relation</emph> icon to create the relationships, or simply drag-and-drop with the mouse.</paragraph>
41cdf0e10cSrcweir<section id="howtoget">
42cdf0e10cSrcweir<embed href="text/shared/00/00000450.xhp#relationen"/>
43cdf0e10cSrcweir</section>
44*613d87f3Smseidel<paragraph role="note" id="par_id3145316" xml-lang="en-US" l10n="U">This function is only available if you are working with a relational database.</paragraph>
45*613d87f3Smseidel<paragraph role="paragraph" id="par_id3149235" xml-lang="en-US" l10n="CHG">When you choose <emph>Tools - Relationships</emph>, a window opens in which all the existing relationships between the tables of the current database are shown. If no relationships have been defined, or if you want to relate other tables of the database to each other, then click the <emph>Add Tables</emph> icon. The <link href="text/shared/02/14020100.xhp" name="Add Tables">Add Tables</link> dialog opens in which you can select the tables that you want.</paragraph>
46cdf0e10cSrcweir<embed href="text/shared/00/00000450.xhp#sytabelle"/>
47*613d87f3Smseidel<paragraph role="note" id="par_id3152812" xml-lang="en-US" l10n="U">If the <emph>Relation Design</emph> window is open, the selected tables cannot be modified, even in Table Design mode. This ensures that tables are not changed while the relations are being created.</paragraph>
48*613d87f3Smseidel<paragraph role="paragraph" id="par_id3150541" xml-lang="en-US" l10n="U">The selected tables are shown in the top area of the design view. You can close a table window through the context menu or with the Delete key.</paragraph>
49cdf0e10cSrcweir<embed href="text/shared/explorer/database/02010100.xhp#darstellungaendern"/>
5082a98929Smseidel<bookmark xml-lang="en-US" branch="index" id="bm_id3148922">
5182a98929Smseidel<bookmark_value>primary keys;inserting (Base)</bookmark_value>
52cdf0e10cSrcweir<bookmark_value>keys;primary keys (Base)</bookmark_value>
53cdf0e10cSrcweir<bookmark_value>external keys (Base)</bookmark_value>
54cdf0e10cSrcweir</bookmark><comment>mw added "(Base)" to all entries</comment>
55*613d87f3Smseidel<paragraph role="heading" id="hd_id3148922" xml-lang="en-US" level="2" l10n="U">Primary key and other key</paragraph>
56*613d87f3Smseidel<paragraph role="paragraph" id="par_id3149168" xml-lang="en-US" l10n="U">If you want to define a relation among the different tables, you should enter a <link href="text/shared/00/00000005.xhp#primaerschluessel" name="primary key">primary key</link> that clearly identifies a data field of the existing table. You can refer to the primary key from other tables to access the data of this table. All data fields referring to this primary key will be identified as an external key.</paragraph>
57*613d87f3Smseidel<paragraph role="paragraph" id="par_id3147085" xml-lang="en-US" l10n="U">All data fields referring to a primary key will be identified in the table window by a small key symbol.</paragraph>
58*613d87f3Smseidel<paragraph role="heading" id="hd_id3153193" xml-lang="en-US" level="2" l10n="U">Define relations</paragraph>
5982a98929Smseidel<bookmark xml-lang="en-US" branch="index" id="bm_id3155430">
6082a98929Smseidel<bookmark_value>relations; creating and deleting (Base)</bookmark_value>
61cdf0e10cSrcweir</bookmark><comment>mw added "(Base)"</comment>
62*613d87f3Smseidel<paragraph role="paragraph" id="par_id3155430" xml-lang="en-US" l10n="U">All existing relations are shown in the relations windows by a line that connects the primary and other key fields. You can add a relation by using drag-and-drop to drop the field of one table onto the field of the other table. A relation is removed again by selecting it and pressing the Delete key.</paragraph>
63*613d87f3Smseidel<paragraph role="paragraph" id="par_id3149984" xml-lang="en-US" l10n="U">Alternatively, you can also click the <emph>New Relation</emph> icon in the top area of the relation field and define the relation between two tables in the <link href="text/shared/explorer/database/05020100.xhp" name="Relations"><emph>Relations</emph></link> dialog.</paragraph>
64cdf0e10cSrcweir<embed href="text/shared/00/00000450.xhp#SyRelationen"/>
65*613d87f3Smseidel<paragraph role="warning" id="par_id3153093" xml-lang="en-US" l10n="U">If you use $[officename] as the front-end for a relational database, the creation and deletion of relationships is not placed in an intermediate memory by $[officename], but is forwarded directly to the external database.</paragraph>
66*613d87f3Smseidel<paragraph role="paragraph" id="par_id3155856" xml-lang="en-US" l10n="U">By double-clicking a connection line, you can assign certain properties to the relation. The <emph>Relations</emph> dialog opens.</paragraph>
67cdf0e10cSrcweir</body>
68cdf0e10cSrcweir</helpdocument>
69