Ir para conteúdo
Fórum Script Brasil

Avr

Membros
  • Total de itens

    1
  • Registro em

  • Última visita

Sobre Avr

Avr's Achievements

0

Reputação

  1. Boa noite galera, Sou iniciante no postgresql, gostaria de sugestões de triggers para o seguinte banco (Imobiliária) criado por mim. Tabelas: create table Proprietario( prop_cpf serial not null, prop_nome varchar(100) not null, prop_tel int null, prop_end varchar(100) null, prop_rg float not null, cor_cpf int not null references Corretor(cor_cpf), primary key (prop_cpf)); create table Corretor( cor_cpf serial not null, cor_nome varchar(100) not null, cor_tel int null, cor_end varchar(50) null, primary key (cor_cpf)); create table Clientes( cli_cpf serial not null, cli_nome varchar(100) not null, cli_tel int null, cli_dt_nasc timestamp null, cor_cpf int not null references Corretor(cor_cpf), primary key (cli_cpf)); create table Aluga( alug_cod serial not null, alug_dt_venc timestamp not null, alug_valor float not null, cli_cpf int not null references Clientes (cli_cpf), primary key (alug_cod)); create table Compra( comp_cod serial not null, comp_valor float not null, comp_data timestamp null, cli_cpf int not null references Clientes (cli_cpf), primary key (comp_cod)); create table Imovel( imo_id serial not null, imo_num int not null, imo_end varchar(100) not null, prop_cpf int not null references Proprietario(prop_cpf), primary key (imo_id)); create table Imovel_tipo( imo_tip_id serial not null, imo_tip_desc varchar not null, imo_id int not null references Imovel(imo_id), primary key (imo_tip_id)); Se puderem me ajudar agradeço desde já.
×
×
  • Criar Novo...