From 6c9b69b325847e9211679bcfee453ab25612feee Mon Sep 17 00:00:00 2001 From: Olivier Hallot Date: Sat, 27 Feb 2021 11:56:08 -0300 Subject: Refactor relations Help pages in sdatabase/ Change-Id: I6bb25934bc3f1443fbd5aa9806936a3628c03454 Reviewed-on: https://gerrit.libreoffice.org/c/help/+/111681 Tested-by: Jenkins Reviewed-by: Olivier Hallot --- AllLangHelp_sdatabase.mk | 2 + AllLangHelp_shared.mk | 2 - source/text/sdatabase/05000000.xhp | 2 +- source/text/sdatabase/05000001.xhp | 2 +- source/text/sdatabase/05020000.xhp | 63 ++++++++++++++++++ source/text/sdatabase/05020100.xhp | 72 ++++++++++++++++++++ source/text/shared/explorer/database/05020000.xhp | 63 ------------------ source/text/shared/explorer/database/05020100.xhp | 76 ---------------------- source/text/shared/explorer/database/menutools.xhp | 2 +- source/text/shared/guide/database_main.xhp | 2 +- 10 files changed, 141 insertions(+), 145 deletions(-) create mode 100644 source/text/sdatabase/05020000.xhp create mode 100644 source/text/sdatabase/05020100.xhp delete mode 100644 source/text/shared/explorer/database/05020000.xhp delete mode 100644 source/text/shared/explorer/database/05020100.xhp diff --git a/AllLangHelp_sdatabase.mk b/AllLangHelp_sdatabase.mk index b40a21138e..f6a005f86d 100644 --- a/AllLangHelp_sdatabase.mk +++ b/AllLangHelp_sdatabase.mk @@ -28,6 +28,8 @@ $(eval $(call gb_AllLangHelp_add_helpfiles,sdatabase,\ helpcontent2/source/text/sdatabase/05000003 \ helpcontent2/source/text/sdatabase/05010000 \ helpcontent2/source/text/sdatabase/05010100 \ + helpcontent2/source/text/sdatabase/05020000 \ + helpcontent2/source/text/sdatabase/05020100 \ helpcontent2/source/text/sdatabase/toolbars \ )) diff --git a/AllLangHelp_shared.mk b/AllLangHelp_shared.mk index f29c946fd5..d724325494 100644 --- a/AllLangHelp_shared.mk +++ b/AllLangHelp_shared.mk @@ -861,8 +861,6 @@ $(eval $(call gb_AllLangHelp_add_helpfiles,shared,\ )) $(eval $(call gb_AllLangHelp_add_helpfiles,shared,\ - helpcontent2/source/text/shared/explorer/database/05020000 \ - helpcontent2/source/text/shared/explorer/database/05020100 \ helpcontent2/source/text/shared/explorer/database/05030000 \ helpcontent2/source/text/shared/explorer/database/05030100 \ helpcontent2/source/text/shared/explorer/database/05030200 \ diff --git a/source/text/sdatabase/05000000.xhp b/source/text/sdatabase/05000000.xhp index a68f9ee4b7..d42d385533 100644 --- a/source/text/sdatabase/05000000.xhp +++ b/source/text/sdatabase/05000000.xhp @@ -36,7 +36,7 @@

Sort and Filter Data

-

Relations, Primary and External Key

+

Relations, Primary and External Key

diff --git a/source/text/sdatabase/05000001.xhp b/source/text/sdatabase/05000001.xhp index 6855b58153..130e25358f 100644 --- a/source/text/sdatabase/05000001.xhp +++ b/source/text/sdatabase/05000001.xhp @@ -38,7 +38,7 @@ Depending on the database system used, you will find the following entries on the context menus: If a table is open, there are several functions available to edit the data. - + diff --git a/source/text/sdatabase/05020000.xhp b/source/text/sdatabase/05020000.xhp new file mode 100644 index 0000000000..d510070b08 --- /dev/null +++ b/source/text/sdatabase/05020000.xhp @@ -0,0 +1,63 @@ + + + + + + + + +Relations +/text/sdatabase/05020000.xhp + + + +
+ +

Relations

+relational databases (Base) +mw added "(Base)" +This command opens the Relation Design window, which allows you to define relationships between various database tables. +
+Here you can link together tables from the current database through common data fields. Click the New Relation icon to create the relationships, or simply drag-and-drop with the mouse. +
+ +
+This function is only available if you are working with a relational database. +When you choose Tools - Relationships, 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 on the Add Tables icon. The Add Tables dialog opens in which you can select the tables with which to create a relation. + +If the Relation Design 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. +The selected tables are shown in the top area of the relation design view. You can close a table window through the context menu or with the Delete key. + +primary keys;inserting (Base) +keys;primary keys (Base) +external keys (Base) +mw added "(Base)" to all entries +

Primary key and foreign keys

+If you want to define a relation among the various tables, you should enter a primary key that uniquely identifies a data field of an 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 a foreign key. +All data fields referring to a primary key will be identified in the table window by a small key symbol. +

Define relations

+relations; creating and deleting (Base) +mw added "(Base)" +All existing relations are shown in the relations windows by a line that connects the primary and foreign 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. +Alternatively, you can also click the New Relation icon in the top area of the relation field and define the relation between two tables in the Relations dialog. + +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 database. +By double-clicking a connection line, you can assign certain properties to the relation. The Relations dialog opens. + +
diff --git a/source/text/sdatabase/05020100.xhp b/source/text/sdatabase/05020100.xhp new file mode 100644 index 0000000000..00e3422f9e --- /dev/null +++ b/source/text/sdatabase/05020100.xhp @@ -0,0 +1,72 @@ + + + + + +Relations +/text/sdatabase/05020100.xhp + + +Sun Microsystems, Inc. + + + + + +relations; properties (Base) +key fields for relations (Base) +cascading update (Base) +mw added "(Base)" to all entries +

Relations

+Allows you to define and edit a relation between two tables. +
+ +
+The update and delete options are only available if they are supported by the database used. +

Tables

+This is where the two related tables are listed. If you create a new relation, you can select one table from each of the combo boxes in the top part of the dialog. +If you opened the Relations 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. + +

Key fields

+Defines the key fields for the relation. + +The names of the tables selected for the link appear here as column names. 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. +

Update options

+Here you can select options that take effect when there are changes to a primary key field. +

No action

+Specifies that any change made to a primary key does not affect other external key fields. +

Updating cascade

+Updates all the external key fields if the value of the corresponding primary key has been modified (Cascading Update). +

Set null

+ 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. +

Set default

+ If the corresponding primary key has been modified, use this option to set a default value to all external key fields. During the creation of the corresponding table, the default value of an external key field will be defined when you assign the field properties. +

Delete options

+Here you can select options that take effect when a primary key field is deleted. +

No action

+Specifies that the deletion of a primary key will not have any effect on other external key fields. +

Delete cascade

+Specifies that all external key fields will be deleted if you delete the corresponding primary key field. +When you delete a primary key field with the Delete cascade 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. +

Set null

+If you delete the corresponding primary key, the "IS NULL" value will be assigned to all external key fields. +

Set Default

+If you delete the corresponding primary key, a set value will be set to all external key fields. + +
diff --git a/source/text/shared/explorer/database/05020000.xhp b/source/text/shared/explorer/database/05020000.xhp deleted file mode 100644 index 6c2da878fb..0000000000 --- a/source/text/shared/explorer/database/05020000.xhp +++ /dev/null @@ -1,63 +0,0 @@ - - - - - - - - -Relations -/text/shared/explorer/database/05020000.xhp - - - -
- -Relations -relational databases (Base) -mw added "(Base)" -This command opens the Relation Design window, which allows you to define relationships between various database tables. -
-Here you can link together tables from the current database through common data fields. Click the New Relation icon to create the relationships, or simply drag-and-drop with the mouse. -
- -
-This function is only available if you are working with a relational database. -When you choose Tools - Relationships, 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 on the Add Tables icon. The Add Tables dialog opens in which you can select the tables with which to create a relation. - -If the Relation Design 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. -The selected tables are shown in the top area of the relation design view. You can close a table window through the context menu or with the Delete key. - -primary keys;inserting (Base) -keys;primary keys (Base) -external keys (Base) -mw added "(Base)" to all entries -Primary key and foreign keys -If you want to define a relation among the various tables, you should enter a primary key that uniquely identifies a data field of an 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 a foreign key. -All data fields referring to a primary key will be identified in the table window by a small key symbol. -Define relations -relations; creating and deleting (Base) -mw added "(Base)" -All existing relations are shown in the relations windows by a line that connects the primary and foreign 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. -Alternatively, you can also click the New Relation icon in the top area of the relation field and define the relation between two tables in the Relations dialog. - -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 database. -By double-clicking a connection line, you can assign certain properties to the relation. The Relations dialog opens. - -
diff --git a/source/text/shared/explorer/database/05020100.xhp b/source/text/shared/explorer/database/05020100.xhp deleted file mode 100644 index 7fc19bf559..0000000000 --- a/source/text/shared/explorer/database/05020100.xhp +++ /dev/null @@ -1,76 +0,0 @@ - - - - - - - - - -Relations -/text/shared/explorer/database/05020100.xhp - - -Sun Microsystems, Inc. - - - - - -relations; properties (Base) -key fields for relations (Base) -cascading update (Base) -mw added "(Base)" to all entries -Relations -Allows you to define and edit a relation between two tables. -
- -
-The update and delete options are only available if they are supported by the database used. -Tables -This is where the two related tables are listed. If you create a new relation, you can select one table from each of the combo boxes in the top part of the dialog. -If you opened the Relations 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. - -Key fields -Defines the key fields for the relation. - -The names of the tables selected for the link appear here as column names. 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. -Update options -Here you can select options that take effect when there are changes to a primary key field. -No action -Specifies that any change made to a primary key does not affect other external key fields. -Updating cascade -Updates all the external key fields if the value of the corresponding primary key has been modified (Cascading Update). -Set null - 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. -Set default - If the corresponding primary key has been modified, use this option to set a default value to all external key fields. During the creation of the corresponding table, the default value of an external key field will be defined when you assign the field properties. -Delete options -Here you can select options that take effect when a primary key field is deleted. -No action -Specifies that the deletion of a primary key will not have any effect on other external key fields. -Delete cascade -Specifies that all external key fields will be deleted if you delete the corresponding primary key field. -When you delete a primary key field with the Delete cascade 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. -Set null -If you delete the corresponding primary key, the "IS NULL" value will be assigned to all external key fields. -Set Default -If you delete the corresponding primary key, a set value will be set to all external key fields. - -
diff --git a/source/text/shared/explorer/database/menutools.xhp b/source/text/shared/explorer/database/menutools.xhp index 099c735090..2f9cc8efab 100644 --- a/source/text/shared/explorer/database/menutools.xhp +++ b/source/text/shared/explorer/database/menutools.xhp @@ -36,7 +36,7 @@ The Tools menu of a database window. Relationships -Opens the Relation Design view and checks whether the database connection supports relations. +Opens the Relation Design view and checks whether the database connection supports relations. User Administration Opens the User Administration dialog if the database supports this feature.UFI: where is this specced? diff --git a/source/text/shared/guide/database_main.xhp b/source/text/shared/guide/database_main.xhp index e0a3ef64a7..332255e07a 100644 --- a/source/text/shared/guide/database_main.xhp +++ b/source/text/shared/guide/database_main.xhp @@ -53,7 +53,7 @@ Query Wizard Enter, edit and copy records

Tables

-Create new table, edit table structure, index, relations +Create new table, edit table structure, index, relations Table Wizard Enter, edit and copy records -- cgit