Relationer
Denne kommando åbner vinduet Relationsdesign, som giver dig mulighed for at angive sammenhænge imellem forskellige databasetabeller.
Her kan du kæde tabeller fra den aktuelle database sammen gennem fælles datafelter. Klik på ikonet Ny relation for at oprette relationerne eller træk-og-slip med musen.
Denne mulighed er kun tilgængelig, hvis du arbejder med en relationsdatabase.
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.
Hvis vinduet Relationsdesign er åbent, kan de valgte tabeller ikke ændres, selv ikke i tabeldesigntilstand. Dette sikrer, at tabeller ikke ændres, mens relationerne bliver oprettet.
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 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.
Alle datafelter, der refererer til en primærnøgle, bliver identificeret i tabelvinduet af et lille nøgle symbol.
Definer relationer
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.
Alternativt kan du også klikke på ikonet Ny relation i topområdet af relationsfeltet og angive relationen mellem to tabeller i dialogen Relationer.
If you use LibreOfficeDev as the front-end for a relational database, the creation and deletion of relationships is not placed in an intermediate memory by LibreOfficeDev, but is forwarded directly to the database.
Ved at dobbeltklikke på en forbindelseslinje kan du tildele bestemte egenskaber til relationen. Dialogen Relationer åbner.