Relações

Permite definir e editar uma relação entre duas tabelas.

Para aceder a este comando...

Numa janela de ficheiros de base de dados, escolha Ferramentas - Relações.


Ícone de nota

As opções de atualização e eliminação só estão disponíveis se forem suportadas pela base de dados utilizada.


Tabelas envolvidas

É aqui que são apresentadas as duas tabelas relacionadas. Se criar uma nova relação, pode selecionar uma tabela em cada uma das caixas de seleção na parte superior da caixa de diálogo.

Se abriu a caixa de diálogo Relações para uma relação existente ao clicar duas vezes nas linhas de ligação na janela Relação, as tabelas envolvidas na relação não podem ser modificadas.

Campos principais

Define os campos-chave da relação.

Os nomes das tabelas selecionadas para a ligação aparecem aqui como nomes de colunas. Se clicar num campo, pode utilizar os botões de seta para selecionar um campo da tabela. Cada relação é apresentada numa linha.

Opções de atualização

Aqui pode selecionar opções que entram em vigor quando ocorrem alterações num campo de chave primária.

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.

Ícone de aviso

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.

Necessitamos da sua ajuda!

Necessitamos da sua ajuda!