Relacións

Esta orde abre a xanela Deseño de relacións, que permite definir as relacións entre varias táboas de base de datos.

Aquí pode ligar as táboas da base de datos actual por medio de campos de datos comúns. Prema na icona Nova relación para crear as relacións ou simplemente arrastre e solte os campos co rato.

Para acceder a esta orde...

In a database file window, choose Tools - Relationships.


Icona Nota

Esta función só está dispoñíbel se está a traballar cunha base de datos relacional.


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.

Add Table Icon

Inserir táboas

Icona Nota

As táboas seleccionadas non poden modificarse, aínda que estean en modo deseño de táboa, se a xanela Deseño de relacións está aberta. Iso asegura que as táboas non sufran cambios mentres se crean as relacións.


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.

Mover táboas e modificar o seu tamaño

Pode redimensionar e dispor as táboas como prefira. Para movelas, arrastre o seu bordo superior ata a posición que desexe. Para ampliar ou reducir o seu tamaño, posicione o cursor do rato sobre un bordo ou canto e arrastre.

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.

Todos os campos de datos que se refiren á chave primaria indentifícanse na xanela da táboa por medio dunha chave pequena.

Definir relacións

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.

Outra posibilidade é premer na icona Nova relación, na área superior do campo de relación, e definir a relación entre dúas táboas na caixa de diálogo Relacións.

New Relation Icon

Nova relación

Icona Aviso

If you use LibreOffice as the front-end for a relational database, the creation and deletion of relationships is not placed in an intermediate memory by LibreOffice, but is forwarded directly to the database.


Premendo dúas veces nunha liña de conexión, ábrese a caixa de diálogo Relacións, na cal pode atribuír certas propiedades á relación.

Precisamos da súa axuda!