CREATE SCHEMA bank_client AUTHORIZATION user1; CREATE TABLE bank (bic int not null primary key, varchar(200) name); CREATE TABLE client (id int not null primary key, varchar(200) name); CREATE TABLE client_of_bank (id int not null foreign key references client, int bic not null foreign key references bank);
Для MS SQL как-то так:
CREATE SCHEMA bank_client AUTHORIZATION user1;
CREATE TABLE bank (bic int not null primary key, varchar(200) name);
CREATE TABLE client (id int not null primary key, varchar(200) name);
CREATE TABLE client_of_bank (id int not null foreign key references client, int bic not null foreign key references bank);