- Banco de Dados RelacionalCardinalidade de Relacionamentos
- Banco de Dados RelacionalTipos de ChavesChave Estrangeira
- Banco de Dados RelacionalTipos de ChavesChave Primária
Considere o seguinte script SQL:
create table T1
(a int not null primary key, b int);
create table T2
(b int not null, c int not null, a int not null unique,
constraint c1 foreign key (a) references T2);
Pode-se concluir que entre os registros das tabelas T1 e T2 existe um relacionamento:
create table T1
(a int not null primary key, b int);
create table T2
(b int not null, c int not null, a int not null unique,
constraint c1 foreign key (a) references T2);
Pode-se concluir que entre os registros das tabelas T1 e T2 existe um relacionamento: