| Server IP : 121.121.20.254 / Your IP : 216.73.216.202 Web Server : Microsoft-IIS/10.0 System : Windows NT WEB-SERVER 10.0 build 20348 (Windows Server 2022) AMD64 User : IUSR ( 0) PHP Version : 8.3.28 Disable Function : NONE MySQL : ON | cURL : ON | WGET : OFF | Perl : OFF | Python : OFF | Sudo : OFF | Pkexec : OFF Directory : C:/Program Files/LibreOffice/help/en-US/text/sdatabase/ |
Upload File : |
<!DOCTYPE html> <html lang="en-US" dir="ltr"> <head> <base href="../../../"> <noscript><meta http-equiv="refresh" content="0; URL=../../../en-US/noscript.html"></noscript> <meta http-equiv="Content-Type" content="text/html; charset=utf-8"> <title>Relations</title> <link rel="shortcut icon" href="media/navigation/favicon.ico"> <link type="text/css" href="normalize.css" rel="Stylesheet"> <link type="text/css" href="prism.css" rel="Stylesheet"> <link type="text/css" href="default.css" rel="Stylesheet"> <script type="text/javascript" src="polyfills.js"></script><script type="text/javascript" src="languages.js"></script><script type="text/javascript" src="en-US/langnames.js"></script><script type="text/javascript" src="flexsearch.debug.js"></script><script type="text/javascript" src="prism.js"></script><script type="text/javascript" src="help2.js" defer></script><script type="text/javascript" src="a11y-toggle.js" defer></script><script type="text/javascript" src="paginathing.js" defer></script><script type="text/javascript" src="en-US/bookmarks.js" defer></script><script type="text/javascript" src="en-US/contents.js" defer></script><script type="text/javascript" src="help.js" defer></script><meta name="viewport" content="width=device-width,initial-scale=1"> </head> <body> <header id="TopLeftHeader"><a class="symbol" href="en-US/text/shared/05/new_help.html"><div></div></a><a class="logo" href="en-US/text/shared/05/new_help.html"><p dir="auto">LibreOffice 24.2 Help</p></a><div class="dropdowns"><div class="modules"> <button type="button" data-a11y-toggle="modules-nav" id="modules" aria-haspopup="true" aria-expanded="false" aria-controls="modules-nav">Module</button><nav id="modules-nav" hidden=""></nav> </div></div></header><aside class="leftside"><input id="accordion-1" name="accordion-menu" type="checkbox"><label for="accordion-1" dir="auto">Contents</label><div id="Contents" class="contents-treeview"></div></aside><div id="SearchFrame"><div id="Bookmarks"> <input id="search-bar" type="search" class="search" placeholder="Search in bookmarks for chosen module" dir="auto"><div class="nav-container" tabindex="0"><nav class="index" dir="auto"></nav></div> </div></div> <div id="DisplayArea" itemprop="softwareHelp" itemscope="true" itemtype="http://schema.org/SoftwareApplication"> <a name="bm_id3155150"></a> <a name="bm_id3155151"></a> <a name="bm_id3150499"></a><meta itemprop="keywords" content="relations, properties (Base)"> <meta itemprop="keywords" content="key fields for relations (Base)"> <meta itemprop="keywords" content="cascading update (Base)"> <h1 id="hd_id3150445" dir="auto">Relations</h1> <p id="par_id3150499" class="paragraph" dir="auto"><span class="avis">Allows you to define and edit a relation between two tables.</span></p> <a name="howtoget"></a><div class="howtoget"> <div><p class="howtogetheader" dir="auto"><a name="wie"></a>To access this command...</p></div> <div class="howtogetbody"> <div class="embedded"><p class="embedded" dir="auto">In a database file window, choose <span class="emph">Tools - Relationships</span>.</p></div> </div> </div> <br> <div class="note"> <div class="noteicon" dir="auto"><img src="media/icon-themes/res/helpimg/note.svg" alt="note" style="width:40px;height:40px;"></div> <div class="notetext"><p id="par_id3155136" dir="auto">The update and delete options are only available if they are supported by the database used.</p></div> </div> <br> <h2 id="hd_id3155341" dir="auto">Tables involved</h2> <p id="par_id3153880" class="paragraph" dir="auto"><span class="avis">This is where the two related tables are listed.</span> If you create a new relation, you can select one table from each of the combo boxes in the top part of the dialog.</p> <p id="par_id3154047" class="paragraph" dir="auto">If you opened the <span class="emph">Relations</span> dialog for an existing relation by double-clicking the connection lines in the Relation window, then the tables involved in the relation cannot be modified.</p> <a name="bm_id3153716"></a> <h2 id="hd_id3153822" dir="auto">Key fields</h2> <p id="par_id3159157" class="paragraph" dir="auto"><span class="avis">Defines the key fields for the relation.</span></p> <a name="bm_id3153543"></a> <p id="par_id3149235" class="paragraph" dir="auto"><span class="avis">The names of the tables selected for the link appear here as column names.</span> If you click a field, you can use the arrow buttons to select a field from the table. Each relation is written in a row.</p> <h2 id="hd_id3145609" dir="auto">Update options</h2> <p id="par_id3153061" class="paragraph" dir="auto">Here you can select options that take effect when there are changes to a primary key field.</p> <h3 id="hd_id3149046" dir="auto">No action</h3> <p id="par_id3152360" class="paragraph" dir="auto"><span class="avis">Specifies that any change made to a primary key does not affect other external key fields.</span></p> <h3 id="hd_id3148664" dir="auto">Updating cascade</h3> <p id="par_id3154073" class="paragraph" dir="auto"><span class="avis">Updates all the external key fields if the value of the corresponding primary key has been modified (Cascading Update).</span></p> <h3 id="hd_id3145171" dir="auto">Set null</h3> <p id="par_id3154123" class="paragraph" dir="auto"><span class="avis"> If the corresponding primary key has been modified, use this option to set the "IS NULL" value to all external key fields. IS NULL means that the field is empty.</span></p> <h3 id="hd_id3150448" dir="auto">Set default</h3> <p id="par_id3151041" class="paragraph" dir="auto"><span class="avis"> If the corresponding primary key has been modified, use this option to set a default value to all external key fields.</span> During the creation of the corresponding table, the default value of an external key field will be defined when you assign the field properties.</p> <h2 id="hd_id3125863" dir="auto">Delete options</h2> <p id="par_id3153193" class="paragraph" dir="auto">Here you can select options that take effect when a primary key field is deleted.</p> <h3 id="hd_id3159252" dir="auto">No action</h3> <p id="par_id3145785" class="paragraph" dir="auto"><span class="avis">Specifies that the deletion of a primary key will not have any effect on other external key fields.</span></p> <h3 id="hd_id3154146" dir="auto">Delete cascade</h3> <p id="par_id3155309" class="paragraph" dir="auto"><span class="avis">Specifies that all external key fields will be deleted if you delete the corresponding primary key field.</span></p> <div class="warning"> <div class="noteicon" dir="auto"><img src="media/icon-themes/res/helpimg/warning.svg" alt="warning" style="width:40px;height:40px;"></div> <div class="notetext"><p id="par_id3153140" dir="auto">When you delete a primary key field with the<span class="emph"> Delete cascade </span>option, all records from other tables that have this key as their foreign key are also deleted. Use this option with great care; it is possible that a major portion of the database can be deleted.</p></div> </div> <br> <h3 id="hd_id3152596" dir="auto">Set null</h3> <p id="par_id3153363" class="paragraph" dir="auto"><span class="avis">If you delete the corresponding primary key, the "IS NULL" value will be assigned to all external key fields.</span></p> <h3 id="hd_id3145272" dir="auto">Set Default</h3> <p id="par_id3154320" class="paragraph" dir="auto"><span class="avis">If you delete the corresponding primary key, a set value will be set to all external key fields.</span></p> </div> <div id="DonationFrame"></div> <footer><div id="DEBUG" class="debug"> <h3 class="bug">Help content debug info:</h3> <p dir="auto">This page is: <a href="https://opengrok.libreoffice.org/xref/help/source/text/sdatabase/05020100.xhp" target="_blank">/text/sdatabase/05020100.xhp</a></p> <p dir="auto">Title is: Relations</p> <p id="bm_module" dir="auto"></p> <p id="bm_system" dir="auto"></p> <p id="bm_HID" dir="auto"></p> </div></footer> </body> </html>