Você está na página 1de 113

teste

DatabaseType PostgreSQL 8.3


Date 06/05/2017

1
ER diagram

2
List of entities

Name Primary key constraint Number Comment


name of
columns
animal pk_animal 22
animal_reproducao pk_animal_reproducao 5
animal_vacinas pk_animal_vacinas 5
cidade pk_cidade 3
compra pk_compra 8
compra_insumos pk_compra_insumos 4
contas_pagar pk_contas_pagar 8
contas_receber pk_contas_receber 7
estado pk_estado 3
fisica pk_fisica 4
insumos pk_insumos 6
juridica pk_juridica 5
lote pk_lote 2
pesagem pesagem_pkey 4
pessoa pk_pessoa 17
raca raca_pkey 2
Rebanho PK_Rebanho 5
reproducao pk_reproducao 3
semem pk_semem 5
Tipo PK_Tipo 2
tipos_insumos pk_tipos_insumos 2
vacinas pk_vacinas 5
venda pk_venda 7

3
Entity: animal
Primary key constraint pk_animal
name
Comment
Table options

Attributes:
Column name Primary key Data type Not NULL Comment
ani_id Yes INTEGER Yes
ani_numero No CHARACTER Yes
VARYING(40)
ani_nasc No DATE No
ani_morte No DATE No
ani_sexo No CHARACTER No
VARYING(40)
ani_mae No CHARACTER No
VARYING(40)
ani_pai No CHARACTER No
VARYING(40)
ani_peso No CHARACTER No
VARYING(40)
ani_idade No INTEGER No
ani_status No CHARACTER No
VARYING(40)
ani_nome No CHARACTER No
VARYING(40)
ani_serienf No CHARACTER No
VARYING(40)
ani_nf No CHARACTER No
VARYING(40)
ani_pelagem No CHARACTER No
VARYING(40)
ani_preco No MONEY Yes
ani_precoVen No MONEY No
raca_id No INTEGER No
lote_id No INTEGER No
reb_id No INTEGER No
comp_id No INTEGER No
tipo_id No INTEGER Yes
vend_id No INTEGER No

Relationships:
Name Relationship type Parent Child Cardinality
animal_animal_reproduc Identifying animal animal_reproduca Zero Or More
ao o
animal_animal_vacinas Identifying animal animal_vacinas Zero Or More
animal_pesagem Non Identifying animal pesagem Zero Or More
animal_semem Non Identifying animal semem Zero Or More
compra_animal Non Identifying compra animal Zero Or More
lote_animal Non Identifying lote animal Zero Or More
raca_animal Non Identifying raca animal Zero Or More
Rebanho_animal Non Identifying Rebanho animal Zero Or More
Tipo_animal Non Identifying Tipo animal Exactly One
venda_animal Non Identifying venda animal Zero Or More

Constraints:
Name Type Level Constraint
Not Null Column Constraint NOT NULL (tipo_id)

4
Not Null Column Constraint NOT NULL (ani_id)
Default Column Constraint DEFAULT
nextval('animal_ani_id_seq')
Not Null Column Constraint NOT NULL (ani_numero)
Not Null Column Constraint NOT NULL (ani_preco)
compra_animal Foreign Key Table Constraint FOREIGN KEY (comp_id)
REFERENCES compra(comp_id)
lote_animal Foreign Key Table Constraint FOREIGN KEY (lote_id)
REFERENCES lote(lote_id)
pk_animal Primary Key Table Constraint PRIMARY KEY (ani_id)
raca_animal Foreign Key Table Constraint FOREIGN KEY (raca_id)
REFERENCES raca(raca_id)
Rebanho_animal Foreign Key Table Constraint FOREIGN KEY (reb_id)
REFERENCES Rebanho(reb_id)
Tipo_animal Foreign Key Table Constraint FOREIGN KEY (tipo_id)
REFERENCES Tipo(tipo_id)
venda_animal Foreign Key Table Constraint FOREIGN KEY (vend_id)
REFERENCES venda(vend_id)

Entity: animal_reproducao
Primary key constraint pk_animal_reproducao
name
Comment
Table options

Attributes:
Column name Primary key Data type Not NULL Comment
ani_id Yes INTEGER Yes
rep_id Yes INTEGER Yes
ar_data No CHARACTER(40) No
ar_tipo No CHARACTER(40) No
tipo_id Yes INTEGER Yes

Relationships:
Name Relationship type Parent Child Cardinality
animal_animal_reproduca Identifying animal animal_reproduc Zero Or More
o ao
reproducao_animal_repro Identifying reproducao animal_reproduc Zero Or More
ducao ao

Constraints:
Name Type Level Constraint
Not Null Column Constraint NOT NULL (tipo_id)
Not Null Column Constraint NOT NULL (ani_id)
Not Null Column Constraint NOT NULL (rep_id)
animal_animal_reproducao Foreign Key Table Constraint FOREIGN KEY (ani_id)
REFERENCES animal(ani_id)
pk_animal_reproducao Primary Key Table Constraint PRIMARY KEY (ani_id, rep_id,
tipo_id)
reproducao_animal_reproduc Foreign Key Table Constraint FOREIGN KEY (rep_id)
ao REFERENCES reproducao(rep_id)

Entity: animal_vacinas
Primary key constraint pk_animal_vacinas
name

5
Comment
Table options

Attributes:
Column name Primary key Data type Not NULL Comment
ani_id Yes INTEGER Yes
vac_id Yes INTEGER Yes
av_data No CHARACTER Yes
VARYING(40)
av_quant No CHARACTER Yes
VARYING(40)
tipo_id Yes INTEGER Yes

Relationships:
Name Relationship type Parent Child Cardinality
animal_animal_vacinas Identifying animal animal_vacinas Zero Or More
vacinas_animal_vacinas Identifying vacinas animal_vacinas Zero Or More

Constraints:
Name Type Level Constraint
Not Null Column Constraint NOT NULL (tipo_id)
Not Null Column Constraint NOT NULL (ani_id)
Not Null Column Constraint NOT NULL (vac_id)
Not Null Column Constraint NOT NULL (av_data)
Not Null Column Constraint NOT NULL (av_quant)
animal_animal_vacinas Foreign Key Table Constraint FOREIGN KEY (ani_id)
REFERENCES animal(ani_id)
pk_animal_vacinas Primary Key Table Constraint PRIMARY KEY (ani_id, vac_id,
tipo_id)
vacinas_animal_vacinas Foreign Key Table Constraint FOREIGN KEY (vac_id)
REFERENCES vacinas(vac_id)

Entity: cidade
Primary key constraint pk_cidade
name
Comment
Table options

Attributes:
Column name Primary key Data type Not NULL Comment
cid_id Yes INTEGER Yes
cid_nome No CHARACTER Yes
VARYING(40)
est_id No INTEGER No

Relationships:
Name Relationship type Parent Child Cardinality
cidade_pessoa Non Identifying cidade pessoa Zero Or More
estado_cidade Non Identifying estado cidade Zero Or More

Constraints:
Name Type Level Constraint
Not Null Column Constraint NOT NULL (cid_nome)
Not Null Column Constraint NOT NULL (cid_id)
Default Column Constraint DEFAULT
nextval('cidade_cid_id_seq')

6
estado_cidade Foreign Key Table Constraint FOREIGN KEY (est_id)
REFERENCES estado(est_id)
pk_cidade Primary Key Table Constraint PRIMARY KEY (cid_id)

Entity: compra
Primary key constraint pk_compra
name
Comment
Table options

Attributes:
Column name Primary key Data type Not NULL Comment
comp_id Yes INTEGER Yes
comp_data No DATE Yes
comp_total No MONEY Yes
comp_nota No CHARACTER Yes
VARYING(40)
comp_serie_nota No CHARACTER Yes
VARYING(40)
comp_tipo No CHARACTER Yes
VARYING(40)
comp_formapag No CHARACTER Yes
VARYING(40)
pes_id No INTEGER No

Relationships:
Name Relationship type Parent Child Cardinality
compra_animal Non Identifying compra animal Zero Or More
compra_compra_insumo Identifying compra compra_insumo Zero Or More
s s
compra_contas_pagar Non Identifying compra contas_pagar Zero Or More
pessoa_compra Non Identifying pessoa compra Zero Or More

Constraints:
Name Type Level Constraint
Not Null Column Constraint NOT NULL (comp_formapag)
Not Null Column Constraint NOT NULL (comp_id)
Default Column Constraint DEFAULT
nextval('compra_comp_id_seq')
Not Null Column Constraint NOT NULL (comp_data)
Not Null Column Constraint NOT NULL (comp_total)
Not Null Column Constraint NOT NULL (comp_nota)
Not Null Column Constraint NOT NULL (comp_serie_nota)
Not Null Column Constraint NOT NULL (comp_tipo)
pessoa_compra Foreign Key Table Constraint FOREIGN KEY (pes_id)
REFERENCES pessoa(pes_id)
pk_compra Primary Key Table Constraint PRIMARY KEY (comp_id)

Entity: compra_insumos
Primary key constraint pk_compra_insumos
name
Comment
Table options

Attributes:

7
Column name Primary key Data type Not NULL Comment
comp_id Yes INTEGER Yes
ins_id Yes INTEGER Yes
ci_valor No MONEY Yes
ci_quant No INTEGER Yes

Relationships:
Name Relationship type Parent Child Cardinality
compra_compra_insumo Identifying compra compra_insumo Zero Or More
s s
insumos_compra_insum Identifying insumos compra_insumo Zero Or More
os s

Constraints:
Name Type Level Constraint
Not Null Column Constraint NOT NULL (ci_quant)
Not Null Column Constraint NOT NULL (comp_id)
Not Null Column Constraint NOT NULL (ins_id)
Not Null Column Constraint NOT NULL (ci_valor)
compra_compra_insumos Foreign Key Table Constraint FOREIGN KEY (comp_id)
REFERENCES compra(comp_id)
insumos_compra_insumos Foreign Key Table Constraint FOREIGN KEY (ins_id)
REFERENCES insumos(ins_id)
pk_compra_insumos Primary Key Table Constraint PRIMARY KEY (comp_id, ins_id)

Entity: contas_pagar
Primary key constraint pk_contas_pagar
name
Comment
Table options

Attributes:
Column name Primary key Data type Not NULL Comment
pag_id Yes INTEGER Yes
pag_valor No MONEY Yes
pag_date No DATE No
pag_vencimento No DATE No
pag_pagamento No DATE No
pag_cond No CHARACTER No
VARYING(40)
pag_ordem No INTEGER No
comp_id No INTEGER No

Relationships:
Name Relationship type Parent Child Cardinality
compra_contas_pagar Non Identifying compra contas_pagar Zero Or More

Constraints:
Name Type Level Constraint
Not Null Column Constraint NOT NULL (pag_valor)
Not Null Column Constraint NOT NULL (pag_id)
Default Column Constraint DEFAULT
nextval('contas_pagar_pag_id_s
eq')
compra_contas_pagar Foreign Key Table Constraint FOREIGN KEY (comp_id)
REFERENCES compra(comp_id)
pk_contas_pagar Primary Key Table Constraint PRIMARY KEY (pag_id)
8
Entity: contas_receber
Primary key constraint pk_contas_receber
name
Comment
Table options

Attributes:
Column name Primary key Data type Not NULL Comment
rec_id Yes INTEGER Yes
rec_valor No MONEY Yes
rec_vencimento No DATE Yes
rec_pagamento No DATE Yes
rec_ordem No INTEGER Yes
rec_tipo No CHARACTER Yes
VARYING(40)
vend_id No INTEGER No

Relationships:
Name Relationship type Parent Child Cardinality
venda_contas_receber Non Identifying venda contas_receber Zero Or More

Constraints:
Name Type Level Constraint
Not Null Column Constraint NOT NULL (rec_tipo)
Not Null Column Constraint NOT NULL (rec_id)
Default Column Constraint DEFAULT
nextval('contas_receber_rec_id_
seq')
Not Null Column Constraint NOT NULL (rec_valor)
Not Null Column Constraint NOT NULL (rec_vencimento)
Not Null Column Constraint NOT NULL (rec_pagamento)
Not Null Column Constraint NOT NULL (rec_ordem)
pk_contas_receber Primary Key Table Constraint PRIMARY KEY (rec_id)
venda_contas_receber Foreign Key Table Constraint FOREIGN KEY (vend_id)
REFERENCES venda(vend_id)

Entity: estado
Primary key constraint pk_estado
name
Comment
Table options

Attributes:
Column name Primary key Data type Not NULL Comment
est_id Yes INTEGER Yes
est_nome No CHARACTER Yes
VARYING(40)
est_sigla No CHARACTER Yes
VARYING(40)

Relationships:
Name Relationship type Parent Child Cardinality
estado_cidade Non Identifying estado cidade Zero Or More

9
Constraints:
Name Type Level Constraint
Not Null Column Constraint NOT NULL (est_sigla)
Not Null Column Constraint NOT NULL (est_id)
Default Column Constraint DEFAULT
nextval('estado_est_id_seq')
Not Null Column Constraint NOT NULL (est_nome)
pk_estado Primary Key Table Constraint PRIMARY KEY (est_id)

Entity: fisica
Primary key constraint pk_fisica
name
Comment
Table options

Attributes:
Column name Primary key Data type Not NULL Comment
fis_id Yes INTEGER Yes
fis_cpf No CHARACTER(40) Yes
fis_rg No CHARACTER(40) Yes
pes_id No INTEGER No

Relationships:
Name Relationship type Parent Child Cardinality
pessoa_fisica Non Identifying pessoa fisica Zero Or More

Constraints:
Name Type Level Constraint
Not Null Column Constraint NOT NULL (fis_rg)
Not Null Column Constraint NOT NULL (fis_id)
Default Column Constraint DEFAULT
nextval('fisica_fis_id_seq')
Not Null Column Constraint NOT NULL (fis_cpf)
pessoa_fisica Foreign Key Table Constraint FOREIGN KEY (pes_id)
REFERENCES pessoa(pes_id)
pk_fisica Primary Key Table Constraint PRIMARY KEY (fis_id)

Entity: insumos
Primary key constraint pk_insumos
name
Comment
Table options

Attributes:
Column name Primary key Data type Not NULL Comment
ins_id Yes INTEGER Yes
ins_nome No CHARACTER Yes
VARYING(40)
ins_estoque No INTEGER Yes
ins_val No MONEY Yes
ti_id No INTEGER No
ti_nome No CHARACTER No
VARYING(40)

Relationships:
10
Name Relationship type Parent Child Cardinality
insumos_compra_insum Identifying insumos compra_insumo Zero Or More
os s
tipos_insumos_insumos Non Identifying tipos_insumos insumos Zero Or More

Constraints:
Name Type Level Constraint
Not Null Column Constraint NOT NULL (ins_val)
Not Null Column Constraint NOT NULL (ins_id)
Default Column Constraint DEFAULT
nextval('insumos_ins_id_seq')
Not Null Column Constraint NOT NULL (ins_nome)
Not Null Column Constraint NOT NULL (ins_estoque)
pk_insumos Primary Key Table Constraint PRIMARY KEY (ins_id)
tipos_insumos_insumos Foreign Key Table Constraint FOREIGN KEY (ti_id, ti_nome)
REFERENCES tipos_insumos(ti_id,
ti_nome)

Entity: juridica
Primary key constraint pk_juridica
name
Comment
Table options

Attributes:
Column name Primary key Data type Not NULL Comment
jur_id Yes INTEGER Yes
jur_cnpj No CHARACTER(40) Yes
jur_ie No CHARACTER(40) Yes
jur_mun No CHARACTER(40) Yes
pes_id No INTEGER No

Relationships:
Name Relationship type Parent Child Cardinality
pessoa_juridica Non Identifying pessoa juridica Zero Or More

Constraints:
Name Type Level Constraint
Not Null Column Constraint NOT NULL (jur_mun)
Not Null Column Constraint NOT NULL (jur_id)
Default Column Constraint DEFAULT
nextval('juridica_jur_id_seq')
Not Null Column Constraint NOT NULL (jur_cnpj)
Not Null Column Constraint NOT NULL (jur_ie)
pessoa_juridica Foreign Key Table Constraint FOREIGN KEY (pes_id)
REFERENCES pessoa(pes_id)
pk_juridica Primary Key Table Constraint PRIMARY KEY (jur_id)

Entity: lote
Primary key constraint pk_lote
name
Comment
Table options

Attributes:
11
Column name Primary key Data type Not NULL Comment
lote_id Yes INTEGER Yes
lote_nome No CHARACTER Yes
VARYING(40)

Relationships:
Name Relationship type Parent Child Cardinality
lote_animal Non Identifying lote animal Zero Or More

Constraints:
Name Type Level Constraint
Not Null Column Constraint NOT NULL (lote_nome)
Not Null Column Constraint NOT NULL (lote_id)
Default Column Constraint DEFAULT
nextval('lote_lote_id_seq')
pk_lote Primary Key Table Constraint PRIMARY KEY (lote_id)

Entity: pesagem
Primary key constraint pesagem_pkey
name
Comment
Table options

Attributes:
Column name Primary key Data type Not NULL Comment
pes_id Yes INTEGER Yes
pes_data No CHARACTER Yes
VARYING(40)
pes_peso No CHARACTER Yes
VARYING(40)
ani_id No INTEGER No

Relationships:
Name Relationship type Parent Child Cardinality
animal_pesagem Non Identifying animal pesagem Zero Or More

Constraints:
Name Type Level Constraint
Not Null Column Constraint NOT NULL (pes_peso)
Not Null Column Constraint NOT NULL (pes_id)
Default Column Constraint DEFAULT
nextval('pesagem_pes_id_seq')
Not Null Column Constraint NOT NULL (pes_data)
animal_pesagem Foreign Key Table Constraint FOREIGN KEY (ani_id)
REFERENCES animal(ani_id)
pesagem_pkey Primary Key Table Constraint PRIMARY KEY (pes_id)

Entity: pessoa
Primary key constraint pk_pessoa
name
Comment
Table options

Attributes:
Column name Primary key Data type Not NULL Comment
12
pes_id Yes INTEGER Yes
pes_nome No CHARACTER Yes
VARYING(40)
pes_rua No CHARACTER Yes
VARYING(40)
pes_numero No CHARACTER Yes
VARYING(40)
pes_bairro No CHARACTER Yes
VARYING(40)
pes_complemento No CHARACTER No
VARYING(40)
pes_cep No CHARACTER No
VARYING(40)
pes_telefone No CHARACTER No
VARYING(40)
pes_celular No CHARACTER No
VARYING(40)
pes_email No CHARACTER No
VARYING(40)
pes_login No CHARACTER No
VARYING(40)
pes_senha No CHARACTER No
VARYING(40)
pes_nivel No INTEGER No
pes_tipo No INTEGER Yes
pes_contato No CHARACTER(40) No
pes_telcontato No CHARACTER(40) No
cid_id No INTEGER No

Relationships:
Name Relationship type Parent Child Cardinality
cidade_pessoa Non Identifying cidade pessoa Zero Or More
pessoa_compra Non Identifying pessoa compra Zero Or More
pessoa_fisica Non Identifying pessoa fisica Zero Or More
pessoa_juridica Non Identifying pessoa juridica Zero Or More
pessoa_venda Non Identifying pessoa venda Zero Or More

Constraints:
Name Type Level Constraint
Not Null Column Constraint NOT NULL (pes_tipo)
Not Null Column Constraint NOT NULL (pes_id)
Default Column Constraint DEFAULT
nextval('pessoa_pes_id_seq')
Not Null Column Constraint NOT NULL (pes_nome)
Not Null Column Constraint NOT NULL (pes_rua)
Not Null Column Constraint NOT NULL (pes_numero)
Not Null Column Constraint NOT NULL (pes_bairro)
cidade_pessoa Foreign Key Table Constraint FOREIGN KEY (cid_id)
REFERENCES cidade(cid_id)
pk_pessoa Primary Key Table Constraint PRIMARY KEY (pes_id)

Entity: raca
Primary key constraint raca_pkey
name
Comment
Table options

13
Attributes:
Column name Primary key Data type Not NULL Comment
raca_id Yes INTEGER Yes
raca_nome No CHARACTER Yes
VARYING(40)

Relationships:
Name Relationship type Parent Child Cardinality
raca_animal Non Identifying raca animal Zero Or More

Constraints:
Name Type Level Constraint
Not Null Column Constraint NOT NULL (raca_nome)
Not Null Column Constraint NOT NULL (raca_id)
Default Column Constraint DEFAULT
nextval('raca_raca_id_seq')
raca_pkey Primary Key Table Constraint PRIMARY KEY (raca_id)

Entity: Rebanho
Primary key constraint PK_Rebanho
name
Comment
Table options

Attributes:
Column name Primary key Data type Not NULL Comment
reb_id Yes SERIAL Yes
reb_nome No CHARACTER Yes
VARYING(40)
reb_data_ini No DATE Yes
reb_data_fim No DATE Yes
reb_desc No CHARACTER No
VARYING(40)

Relationships:
Name Relationship type Parent Child Cardinality
Rebanho_animal Non Identifying Rebanho animal Zero Or More

Constraints:
Name Type Level Constraint
Not Null Column Constraint NOT NULL (reb_data_fim)
Not Null Column Constraint NOT NULL (reb_id)
Not Null Column Constraint NOT NULL (reb_nome)
Not Null Column Constraint NOT NULL (reb_data_ini)
PK_Rebanho Primary Key Table Constraint PRIMARY KEY (reb_id)

Entity: reproducao
Primary key constraint pk_reproducao
name
Comment
Table options

Attributes:
Column name Primary key Data type Not NULL Comment
rep_id Yes INTEGER Yes
14
red_data No DATE No
rep_relatorio No CHARACTER No
VARYING(40)

Relationships:
Name Relationship type Parent Child Cardinality
reproducao_animal_repro Identifying reproducao animal_reproduc Zero Or More
ducao ao

Constraints:
Name Type Level Constraint
Default Column Constraint DEFAULT
nextval('reproducao_rep_id_seq')
Not Null Column Constraint NOT NULL (rep_id)
pk_reproducao Primary Key Table Constraint PRIMARY KEY (rep_id)

Entity: semem
Primary key constraint pk_semem
name
Comment
Table options

Attributes:
Column name Primary key Data type Not NULL Comment
sem_id Yes INTEGER Yes
sem_amostra No CHARACTER Yes
VARYING(40)
sem_data No DATE Yes
sem_quant No INTEGER Yes
ani_id No INTEGER No

Relationships:
Name Relationship type Parent Child Cardinality
animal_semem Non Identifying animal semem Zero Or More

Constraints:
Name Type Level Constraint
Not Null Column Constraint NOT NULL (sem_quant)
Not Null Column Constraint NOT NULL (sem_id)
Default Column Constraint DEFAULT
nextval('semem_sem_id_seq')
Not Null Column Constraint NOT NULL (sem_amostra)
Not Null Column Constraint NOT NULL (sem_data)
animal_semem Foreign Key Table Constraint FOREIGN KEY (ani_id)
REFERENCES animal(ani_id)
pk_semem Primary Key Table Constraint PRIMARY KEY (sem_id)

Entity: Tipo
Primary key constraint PK_Tipo
name
Comment
Table options

Attributes:
Column name Primary key Data type Not NULL Comment
15
tipo_id Yes SERIAL Yes
tipo_nome No CHARACTER No
VARYING(40)

Relationships:
Name Relationship type Parent Child Cardinality
Tipo_animal Non Identifying Tipo animal Exactly One

Constraints:
Name Type Level Constraint
Not Null Column Constraint NOT NULL (tipo_id)
PK_Tipo Primary Key Table Constraint PRIMARY KEY (tipo_id)

Entity: tipos_insumos
Primary key constraint pk_tipos_insumos
name
Comment
Table options

Attributes:
Column name Primary key Data type Not NULL Comment
ti_id Yes INTEGER Yes
ti_nome Yes CHARACTER Yes
VARYING(40)

Relationships:
Name Relationship type Parent Child Cardinality
tipos_insumos_insumos Non Identifying tipos_insumos insumos Zero Or More

Constraints:
Name Type Level Constraint
Not Null Column Constraint NOT NULL (ti_nome)
Not Null Column Constraint NOT NULL (ti_id)
Default Column Constraint DEFAULT
nextval('tipos_insumos_ti_id_seq'
)
pk_tipos_insumos Primary Key Table Constraint PRIMARY KEY (ti_id, ti_nome)

Entity: vacinas
Primary key constraint pk_vacinas
name
Comment
Table options

Attributes:
Column name Primary key Data type Not NULL Comment
vac_id Yes INTEGER Yes
vac_nome No CHARACTER(40) No
vac_estoque No CHARACTER(40) No
vac_validade No DATE No
vac_preco No MONEY No

Relationships:
Name Relationship type Parent Child Cardinality
vacinas_animal_vacinas Identifying vacinas animal_vacinas Zero Or More
16
Constraints:
Name Type Level Constraint
Default Column Constraint DEFAULT
nextval('vacinas_vac_id_seq')
Not Null Column Constraint NOT NULL (vac_id)
pk_vacinas Primary Key Table Constraint PRIMARY KEY (vac_id)

Entity: venda
Primary key constraint pk_venda
name
Comment
Table options

Attributes:
Column name Primary key Data type Not NULL Comment
vend_id Yes INTEGER Yes
vend_data No DATE Yes
vend_total No MONEY Yes
vend_nota No CHARACTER Yes
VARYING(40)
vend_serie_nota No CHARACTER Yes
VARYING(40)
vend_formrec No CHARACTER Yes
VARYING(40)
pes_id No INTEGER No

Relationships:
Name Relationship type Parent Child Cardinality
pessoa_venda Non Identifying pessoa venda Zero Or More
venda_animal Non Identifying venda animal Zero Or More
venda_contas_receber Non Identifying venda contas_receber Zero Or More

Constraints:
Name Type Level Constraint
Not Null Column Constraint NOT NULL (vend_formrec)
Not Null Column Constraint NOT NULL (vend_id)
Default Column Constraint DEFAULT
nextval('venda_vend_id_seq')
Not Null Column Constraint NOT NULL (vend_data)
Not Null Column Constraint NOT NULL (vend_total)
Not Null Column Constraint NOT NULL (vend_nota)
Not Null Column Constraint NOT NULL (vend_serie_nota)
pessoa_venda Foreign Key Table Constraint FOREIGN KEY (pes_id)
REFERENCES pessoa(pes_id)
pk_venda Primary Key Table Constraint PRIMARY KEY (vend_id)

17
Entity details

18
Entity: animal
Primary key constraint pk_animal
name
Comment
Table options

Attributes:
Column name Primary key Data type Not NULL Comment
ani_id Yes INTEGER Yes
ani_numero No CHARACTER Yes
VARYING(40)
ani_nasc No DATE No
ani_morte No DATE No
ani_sexo No CHARACTER No
VARYING(40)
ani_mae No CHARACTER No
VARYING(40)
ani_pai No CHARACTER No
VARYING(40)
ani_peso No CHARACTER No
VARYING(40)
ani_idade No INTEGER No
ani_status No CHARACTER No
VARYING(40)
ani_nome No CHARACTER No
VARYING(40)
ani_serienf No CHARACTER No
VARYING(40)
ani_nf No CHARACTER No
VARYING(40)
ani_pelagem No CHARACTER No
VARYING(40)
ani_preco No MONEY Yes
ani_precoVen No MONEY No
raca_id No INTEGER No
lote_id No INTEGER No
reb_id No INTEGER No
comp_id No INTEGER No
tipo_id No INTEGER Yes
vend_id No INTEGER No

Relationships:
Name Relationship type Parent Child Cardinality
animal_animal_reproduc Identifying animal animal_reproduca Zero Or More
ao o
animal_animal_vacinas Identifying animal animal_vacinas Zero Or More
animal_pesagem Non Identifying animal pesagem Zero Or More
animal_semem Non Identifying animal semem Zero Or More
compra_animal Non Identifying compra animal Zero Or More
lote_animal Non Identifying lote animal Zero Or More
raca_animal Non Identifying raca animal Zero Or More
Rebanho_animal Non Identifying Rebanho animal Zero Or More
Tipo_animal Non Identifying Tipo animal Exactly One
venda_animal Non Identifying venda animal Zero Or More

Constraints:
Name Type Level Constraint
Not Null Column Constraint NOT NULL (tipo_id)

19
Not Null Column Constraint NOT NULL (ani_id)
Default Column Constraint DEFAULT
nextval('animal_ani_id_seq')
Not Null Column Constraint NOT NULL (ani_numero)
Not Null Column Constraint NOT NULL (ani_preco)
compra_animal Foreign Key Table Constraint FOREIGN KEY (comp_id)
REFERENCES compra(comp_id)
lote_animal Foreign Key Table Constraint FOREIGN KEY (lote_id)
REFERENCES lote(lote_id)
pk_animal Primary Key Table Constraint PRIMARY KEY (ani_id)
raca_animal Foreign Key Table Constraint FOREIGN KEY (raca_id)
REFERENCES raca(raca_id)
Rebanho_animal Foreign Key Table Constraint FOREIGN KEY (reb_id)
REFERENCES Rebanho(reb_id)
Tipo_animal Foreign Key Table Constraint FOREIGN KEY (tipo_id)
REFERENCES Tipo(tipo_id)
venda_animal Foreign Key Table Constraint FOREIGN KEY (vend_id)
REFERENCES venda(vend_id)

Entity: animal_reproducao
Primary key constraint pk_animal_reproducao
name
Comment
Table options

Attributes:
Column name Primary key Data type Not NULL Comment
ani_id Yes INTEGER Yes
rep_id Yes INTEGER Yes
ar_data No CHARACTER(40) No
ar_tipo No CHARACTER(40) No
tipo_id Yes INTEGER Yes

Relationships:
Name Relationship type Parent Child Cardinality
animal_animal_reproduca Identifying animal animal_reproduc Zero Or More
o ao
reproducao_animal_repro Identifying reproducao animal_reproduc Zero Or More
ducao ao

Constraints:
Name Type Level Constraint
Not Null Column Constraint NOT NULL (tipo_id)
Not Null Column Constraint NOT NULL (ani_id)
Not Null Column Constraint NOT NULL (rep_id)
animal_animal_reproducao Foreign Key Table Constraint FOREIGN KEY (ani_id)
REFERENCES animal(ani_id)
pk_animal_reproducao Primary Key Table Constraint PRIMARY KEY (ani_id, rep_id,
tipo_id)
reproducao_animal_reproduc Foreign Key Table Constraint FOREIGN KEY (rep_id)
ao REFERENCES reproducao(rep_id)

Entity: animal_vacinas
Primary key constraint pk_animal_vacinas
name

20
Comment
Table options

Attributes:
Column name Primary key Data type Not NULL Comment
ani_id Yes INTEGER Yes
vac_id Yes INTEGER Yes
av_data No CHARACTER Yes
VARYING(40)
av_quant No CHARACTER Yes
VARYING(40)
tipo_id Yes INTEGER Yes

Relationships:
Name Relationship type Parent Child Cardinality
animal_animal_vacinas Identifying animal animal_vacinas Zero Or More
vacinas_animal_vacinas Identifying vacinas animal_vacinas Zero Or More

Constraints:
Name Type Level Constraint
Not Null Column Constraint NOT NULL (tipo_id)
Not Null Column Constraint NOT NULL (ani_id)
Not Null Column Constraint NOT NULL (vac_id)
Not Null Column Constraint NOT NULL (av_data)
Not Null Column Constraint NOT NULL (av_quant)
animal_animal_vacinas Foreign Key Table Constraint FOREIGN KEY (ani_id)
REFERENCES animal(ani_id)
pk_animal_vacinas Primary Key Table Constraint PRIMARY KEY (ani_id, vac_id,
tipo_id)
vacinas_animal_vacinas Foreign Key Table Constraint FOREIGN KEY (vac_id)
REFERENCES vacinas(vac_id)

Entity: cidade
Primary key constraint pk_cidade
name
Comment
Table options

Attributes:
Column name Primary key Data type Not NULL Comment
cid_id Yes INTEGER Yes
cid_nome No CHARACTER Yes
VARYING(40)
est_id No INTEGER No

Relationships:
Name Relationship type Parent Child Cardinality
cidade_pessoa Non Identifying cidade pessoa Zero Or More
estado_cidade Non Identifying estado cidade Zero Or More

Constraints:
Name Type Level Constraint
Not Null Column Constraint NOT NULL (cid_nome)
Not Null Column Constraint NOT NULL (cid_id)
Default Column Constraint DEFAULT
nextval('cidade_cid_id_seq')

21
estado_cidade Foreign Key Table Constraint FOREIGN KEY (est_id)
REFERENCES estado(est_id)
pk_cidade Primary Key Table Constraint PRIMARY KEY (cid_id)

Entity: compra
Primary key constraint pk_compra
name
Comment
Table options

Attributes:
Column name Primary key Data type Not NULL Comment
comp_id Yes INTEGER Yes
comp_data No DATE Yes
comp_total No MONEY Yes
comp_nota No CHARACTER Yes
VARYING(40)
comp_serie_nota No CHARACTER Yes
VARYING(40)
comp_tipo No CHARACTER Yes
VARYING(40)
comp_formapag No CHARACTER Yes
VARYING(40)
pes_id No INTEGER No

Relationships:
Name Relationship type Parent Child Cardinality
compra_animal Non Identifying compra animal Zero Or More
compra_compra_insumo Identifying compra compra_insumo Zero Or More
s s
compra_contas_pagar Non Identifying compra contas_pagar Zero Or More
pessoa_compra Non Identifying pessoa compra Zero Or More

Constraints:
Name Type Level Constraint
Not Null Column Constraint NOT NULL (comp_formapag)
Not Null Column Constraint NOT NULL (comp_id)
Default Column Constraint DEFAULT
nextval('compra_comp_id_seq')
Not Null Column Constraint NOT NULL (comp_data)
Not Null Column Constraint NOT NULL (comp_total)
Not Null Column Constraint NOT NULL (comp_nota)
Not Null Column Constraint NOT NULL (comp_serie_nota)
Not Null Column Constraint NOT NULL (comp_tipo)
pessoa_compra Foreign Key Table Constraint FOREIGN KEY (pes_id)
REFERENCES pessoa(pes_id)
pk_compra Primary Key Table Constraint PRIMARY KEY (comp_id)

Entity: compra_insumos
Primary key constraint pk_compra_insumos
name
Comment
Table options

Attributes:

22
Column name Primary key Data type Not NULL Comment
comp_id Yes INTEGER Yes
ins_id Yes INTEGER Yes
ci_valor No MONEY Yes
ci_quant No INTEGER Yes

Relationships:
Name Relationship type Parent Child Cardinality
compra_compra_insumo Identifying compra compra_insumo Zero Or More
s s
insumos_compra_insum Identifying insumos compra_insumo Zero Or More
os s

Constraints:
Name Type Level Constraint
Not Null Column Constraint NOT NULL (ci_quant)
Not Null Column Constraint NOT NULL (comp_id)
Not Null Column Constraint NOT NULL (ins_id)
Not Null Column Constraint NOT NULL (ci_valor)
compra_compra_insumos Foreign Key Table Constraint FOREIGN KEY (comp_id)
REFERENCES compra(comp_id)
insumos_compra_insumos Foreign Key Table Constraint FOREIGN KEY (ins_id)
REFERENCES insumos(ins_id)
pk_compra_insumos Primary Key Table Constraint PRIMARY KEY (comp_id, ins_id)

Entity: contas_pagar
Primary key constraint pk_contas_pagar
name
Comment
Table options

Attributes:
Column name Primary key Data type Not NULL Comment
pag_id Yes INTEGER Yes
pag_valor No MONEY Yes
pag_date No DATE No
pag_vencimento No DATE No
pag_pagamento No DATE No
pag_cond No CHARACTER No
VARYING(40)
pag_ordem No INTEGER No
comp_id No INTEGER No

Relationships:
Name Relationship type Parent Child Cardinality
compra_contas_pagar Non Identifying compra contas_pagar Zero Or More

Constraints:
Name Type Level Constraint
Not Null Column Constraint NOT NULL (pag_valor)
Not Null Column Constraint NOT NULL (pag_id)
Default Column Constraint DEFAULT
nextval('contas_pagar_pag_id_s
eq')
compra_contas_pagar Foreign Key Table Constraint FOREIGN KEY (comp_id)
REFERENCES compra(comp_id)
pk_contas_pagar Primary Key Table Constraint PRIMARY KEY (pag_id)
23
Entity: contas_receber
Primary key constraint pk_contas_receber
name
Comment
Table options

Attributes:
Column name Primary key Data type Not NULL Comment
rec_id Yes INTEGER Yes
rec_valor No MONEY Yes
rec_vencimento No DATE Yes
rec_pagamento No DATE Yes
rec_ordem No INTEGER Yes
rec_tipo No CHARACTER Yes
VARYING(40)
vend_id No INTEGER No

Relationships:
Name Relationship type Parent Child Cardinality
venda_contas_receber Non Identifying venda contas_receber Zero Or More

Constraints:
Name Type Level Constraint
Not Null Column Constraint NOT NULL (rec_tipo)
Not Null Column Constraint NOT NULL (rec_id)
Default Column Constraint DEFAULT
nextval('contas_receber_rec_id_
seq')
Not Null Column Constraint NOT NULL (rec_valor)
Not Null Column Constraint NOT NULL (rec_vencimento)
Not Null Column Constraint NOT NULL (rec_pagamento)
Not Null Column Constraint NOT NULL (rec_ordem)
pk_contas_receber Primary Key Table Constraint PRIMARY KEY (rec_id)
venda_contas_receber Foreign Key Table Constraint FOREIGN KEY (vend_id)
REFERENCES venda(vend_id)

Entity: estado
Primary key constraint pk_estado
name
Comment
Table options

Attributes:
Column name Primary key Data type Not NULL Comment
est_id Yes INTEGER Yes
est_nome No CHARACTER Yes
VARYING(40)
est_sigla No CHARACTER Yes
VARYING(40)

Relationships:
Name Relationship type Parent Child Cardinality
estado_cidade Non Identifying estado cidade Zero Or More

24
Constraints:
Name Type Level Constraint
Not Null Column Constraint NOT NULL (est_sigla)
Not Null Column Constraint NOT NULL (est_id)
Default Column Constraint DEFAULT
nextval('estado_est_id_seq')
Not Null Column Constraint NOT NULL (est_nome)
pk_estado Primary Key Table Constraint PRIMARY KEY (est_id)

Entity: fisica
Primary key constraint pk_fisica
name
Comment
Table options

Attributes:
Column name Primary key Data type Not NULL Comment
fis_id Yes INTEGER Yes
fis_cpf No CHARACTER(40) Yes
fis_rg No CHARACTER(40) Yes
pes_id No INTEGER No

Relationships:
Name Relationship type Parent Child Cardinality
pessoa_fisica Non Identifying pessoa fisica Zero Or More

Constraints:
Name Type Level Constraint
Not Null Column Constraint NOT NULL (fis_rg)
Not Null Column Constraint NOT NULL (fis_id)
Default Column Constraint DEFAULT
nextval('fisica_fis_id_seq')
Not Null Column Constraint NOT NULL (fis_cpf)
pessoa_fisica Foreign Key Table Constraint FOREIGN KEY (pes_id)
REFERENCES pessoa(pes_id)
pk_fisica Primary Key Table Constraint PRIMARY KEY (fis_id)

Entity: insumos
Primary key constraint pk_insumos
name
Comment
Table options

Attributes:
Column name Primary key Data type Not NULL Comment
ins_id Yes INTEGER Yes
ins_nome No CHARACTER Yes
VARYING(40)
ins_estoque No INTEGER Yes
ins_val No MONEY Yes
ti_id No INTEGER No
ti_nome No CHARACTER No
VARYING(40)

Relationships:
25
Name Relationship type Parent Child Cardinality
insumos_compra_insum Identifying insumos compra_insumo Zero Or More
os s
tipos_insumos_insumos Non Identifying tipos_insumos insumos Zero Or More

Constraints:
Name Type Level Constraint
Not Null Column Constraint NOT NULL (ins_val)
Not Null Column Constraint NOT NULL (ins_id)
Default Column Constraint DEFAULT
nextval('insumos_ins_id_seq')
Not Null Column Constraint NOT NULL (ins_nome)
Not Null Column Constraint NOT NULL (ins_estoque)
pk_insumos Primary Key Table Constraint PRIMARY KEY (ins_id)
tipos_insumos_insumos Foreign Key Table Constraint FOREIGN KEY (ti_id, ti_nome)
REFERENCES tipos_insumos(ti_id,
ti_nome)

Entity: juridica
Primary key constraint pk_juridica
name
Comment
Table options

Attributes:
Column name Primary key Data type Not NULL Comment
jur_id Yes INTEGER Yes
jur_cnpj No CHARACTER(40) Yes
jur_ie No CHARACTER(40) Yes
jur_mun No CHARACTER(40) Yes
pes_id No INTEGER No

Relationships:
Name Relationship type Parent Child Cardinality
pessoa_juridica Non Identifying pessoa juridica Zero Or More

Constraints:
Name Type Level Constraint
Not Null Column Constraint NOT NULL (jur_mun)
Not Null Column Constraint NOT NULL (jur_id)
Default Column Constraint DEFAULT
nextval('juridica_jur_id_seq')
Not Null Column Constraint NOT NULL (jur_cnpj)
Not Null Column Constraint NOT NULL (jur_ie)
pessoa_juridica Foreign Key Table Constraint FOREIGN KEY (pes_id)
REFERENCES pessoa(pes_id)
pk_juridica Primary Key Table Constraint PRIMARY KEY (jur_id)

Entity: lote
Primary key constraint pk_lote
name
Comment
Table options

Attributes:
26
Column name Primary key Data type Not NULL Comment
lote_id Yes INTEGER Yes
lote_nome No CHARACTER Yes
VARYING(40)

Relationships:
Name Relationship type Parent Child Cardinality
lote_animal Non Identifying lote animal Zero Or More

Constraints:
Name Type Level Constraint
Not Null Column Constraint NOT NULL (lote_nome)
Not Null Column Constraint NOT NULL (lote_id)
Default Column Constraint DEFAULT
nextval('lote_lote_id_seq')
pk_lote Primary Key Table Constraint PRIMARY KEY (lote_id)

Entity: pesagem
Primary key constraint pesagem_pkey
name
Comment
Table options

Attributes:
Column name Primary key Data type Not NULL Comment
pes_id Yes INTEGER Yes
pes_data No CHARACTER Yes
VARYING(40)
pes_peso No CHARACTER Yes
VARYING(40)
ani_id No INTEGER No

Relationships:
Name Relationship type Parent Child Cardinality
animal_pesagem Non Identifying animal pesagem Zero Or More

Constraints:
Name Type Level Constraint
Not Null Column Constraint NOT NULL (pes_peso)
Not Null Column Constraint NOT NULL (pes_id)
Default Column Constraint DEFAULT
nextval('pesagem_pes_id_seq')
Not Null Column Constraint NOT NULL (pes_data)
animal_pesagem Foreign Key Table Constraint FOREIGN KEY (ani_id)
REFERENCES animal(ani_id)
pesagem_pkey Primary Key Table Constraint PRIMARY KEY (pes_id)

Entity: pessoa
Primary key constraint pk_pessoa
name
Comment
Table options

Attributes:
Column name Primary key Data type Not NULL Comment
27
pes_id Yes INTEGER Yes
pes_nome No CHARACTER Yes
VARYING(40)
pes_rua No CHARACTER Yes
VARYING(40)
pes_numero No CHARACTER Yes
VARYING(40)
pes_bairro No CHARACTER Yes
VARYING(40)
pes_complemento No CHARACTER No
VARYING(40)
pes_cep No CHARACTER No
VARYING(40)
pes_telefone No CHARACTER No
VARYING(40)
pes_celular No CHARACTER No
VARYING(40)
pes_email No CHARACTER No
VARYING(40)
pes_login No CHARACTER No
VARYING(40)
pes_senha No CHARACTER No
VARYING(40)
pes_nivel No INTEGER No
pes_tipo No INTEGER Yes
pes_contato No CHARACTER(40) No
pes_telcontato No CHARACTER(40) No
cid_id No INTEGER No

Relationships:
Name Relationship type Parent Child Cardinality
cidade_pessoa Non Identifying cidade pessoa Zero Or More
pessoa_compra Non Identifying pessoa compra Zero Or More
pessoa_fisica Non Identifying pessoa fisica Zero Or More
pessoa_juridica Non Identifying pessoa juridica Zero Or More
pessoa_venda Non Identifying pessoa venda Zero Or More

Constraints:
Name Type Level Constraint
Not Null Column Constraint NOT NULL (pes_tipo)
Not Null Column Constraint NOT NULL (pes_id)
Default Column Constraint DEFAULT
nextval('pessoa_pes_id_seq')
Not Null Column Constraint NOT NULL (pes_nome)
Not Null Column Constraint NOT NULL (pes_rua)
Not Null Column Constraint NOT NULL (pes_numero)
Not Null Column Constraint NOT NULL (pes_bairro)
cidade_pessoa Foreign Key Table Constraint FOREIGN KEY (cid_id)
REFERENCES cidade(cid_id)
pk_pessoa Primary Key Table Constraint PRIMARY KEY (pes_id)

Entity: raca
Primary key constraint raca_pkey
name
Comment
Table options

28
Attributes:
Column name Primary key Data type Not NULL Comment
raca_id Yes INTEGER Yes
raca_nome No CHARACTER Yes
VARYING(40)

Relationships:
Name Relationship type Parent Child Cardinality
raca_animal Non Identifying raca animal Zero Or More

Constraints:
Name Type Level Constraint
Not Null Column Constraint NOT NULL (raca_nome)
Not Null Column Constraint NOT NULL (raca_id)
Default Column Constraint DEFAULT
nextval('raca_raca_id_seq')
raca_pkey Primary Key Table Constraint PRIMARY KEY (raca_id)

Entity: Rebanho
Primary key constraint PK_Rebanho
name
Comment
Table options

Attributes:
Column name Primary key Data type Not NULL Comment
reb_id Yes SERIAL Yes
reb_nome No CHARACTER Yes
VARYING(40)
reb_data_ini No DATE Yes
reb_data_fim No DATE Yes
reb_desc No CHARACTER No
VARYING(40)

Relationships:
Name Relationship type Parent Child Cardinality
Rebanho_animal Non Identifying Rebanho animal Zero Or More

Constraints:
Name Type Level Constraint
Not Null Column Constraint NOT NULL (reb_data_fim)
Not Null Column Constraint NOT NULL (reb_id)
Not Null Column Constraint NOT NULL (reb_nome)
Not Null Column Constraint NOT NULL (reb_data_ini)
PK_Rebanho Primary Key Table Constraint PRIMARY KEY (reb_id)

Entity: reproducao
Primary key constraint pk_reproducao
name
Comment
Table options

Attributes:
Column name Primary key Data type Not NULL Comment
rep_id Yes INTEGER Yes
29
red_data No DATE No
rep_relatorio No CHARACTER No
VARYING(40)

Relationships:
Name Relationship type Parent Child Cardinality
reproducao_animal_repro Identifying reproducao animal_reproduc Zero Or More
ducao ao

Constraints:
Name Type Level Constraint
Default Column Constraint DEFAULT
nextval('reproducao_rep_id_seq')
Not Null Column Constraint NOT NULL (rep_id)
pk_reproducao Primary Key Table Constraint PRIMARY KEY (rep_id)

Entity: semem
Primary key constraint pk_semem
name
Comment
Table options

Attributes:
Column name Primary key Data type Not NULL Comment
sem_id Yes INTEGER Yes
sem_amostra No CHARACTER Yes
VARYING(40)
sem_data No DATE Yes
sem_quant No INTEGER Yes
ani_id No INTEGER No

Relationships:
Name Relationship type Parent Child Cardinality
animal_semem Non Identifying animal semem Zero Or More

Constraints:
Name Type Level Constraint
Not Null Column Constraint NOT NULL (sem_quant)
Not Null Column Constraint NOT NULL (sem_id)
Default Column Constraint DEFAULT
nextval('semem_sem_id_seq')
Not Null Column Constraint NOT NULL (sem_amostra)
Not Null Column Constraint NOT NULL (sem_data)
animal_semem Foreign Key Table Constraint FOREIGN KEY (ani_id)
REFERENCES animal(ani_id)
pk_semem Primary Key Table Constraint PRIMARY KEY (sem_id)

Entity: Tipo
Primary key constraint PK_Tipo
name
Comment
Table options

Attributes:
Column name Primary key Data type Not NULL Comment
30
tipo_id Yes SERIAL Yes
tipo_nome No CHARACTER No
VARYING(40)

Relationships:
Name Relationship type Parent Child Cardinality
Tipo_animal Non Identifying Tipo animal Exactly One

Constraints:
Name Type Level Constraint
Not Null Column Constraint NOT NULL (tipo_id)
PK_Tipo Primary Key Table Constraint PRIMARY KEY (tipo_id)

Entity: tipos_insumos
Primary key constraint pk_tipos_insumos
name
Comment
Table options

Attributes:
Column name Primary key Data type Not NULL Comment
ti_id Yes INTEGER Yes
ti_nome Yes CHARACTER Yes
VARYING(40)

Relationships:
Name Relationship type Parent Child Cardinality
tipos_insumos_insumos Non Identifying tipos_insumos insumos Zero Or More

Constraints:
Name Type Level Constraint
Not Null Column Constraint NOT NULL (ti_nome)
Not Null Column Constraint NOT NULL (ti_id)
Default Column Constraint DEFAULT
nextval('tipos_insumos_ti_id_seq'
)
pk_tipos_insumos Primary Key Table Constraint PRIMARY KEY (ti_id, ti_nome)

Entity: vacinas
Primary key constraint pk_vacinas
name
Comment
Table options

Attributes:
Column name Primary key Data type Not NULL Comment
vac_id Yes INTEGER Yes
vac_nome No CHARACTER(40) No
vac_estoque No CHARACTER(40) No
vac_validade No DATE No
vac_preco No MONEY No

Relationships:
Name Relationship type Parent Child Cardinality
vacinas_animal_vacinas Identifying vacinas animal_vacinas Zero Or More
31
Constraints:
Name Type Level Constraint
Default Column Constraint DEFAULT
nextval('vacinas_vac_id_seq')
Not Null Column Constraint NOT NULL (vac_id)
pk_vacinas Primary Key Table Constraint PRIMARY KEY (vac_id)

Entity: venda
Primary key constraint pk_venda
name
Comment
Table options

Attributes:
Column name Primary key Data type Not NULL Comment
vend_id Yes INTEGER Yes
vend_data No DATE Yes
vend_total No MONEY Yes
vend_nota No CHARACTER Yes
VARYING(40)
vend_serie_nota No CHARACTER Yes
VARYING(40)
vend_formrec No CHARACTER Yes
VARYING(40)
pes_id No INTEGER No

Relationships:
Name Relationship type Parent Child Cardinality
pessoa_venda Non Identifying pessoa venda Zero Or More
venda_animal Non Identifying venda animal Zero Or More
venda_contas_receber Non Identifying venda contas_receber Zero Or More

Constraints:
Name Type Level Constraint
Not Null Column Constraint NOT NULL (vend_formrec)
Not Null Column Constraint NOT NULL (vend_id)
Default Column Constraint DEFAULT
nextval('venda_vend_id_seq')
Not Null Column Constraint NOT NULL (vend_data)
Not Null Column Constraint NOT NULL (vend_total)
Not Null Column Constraint NOT NULL (vend_nota)
Not Null Column Constraint NOT NULL (vend_serie_nota)
pessoa_venda Foreign Key Table Constraint FOREIGN KEY (pes_id)
REFERENCES pessoa(pes_id)
pk_venda Primary Key Table Constraint PRIMARY KEY (vend_id)

32
List of attributes

Column name Table Key Data type Not NULL


ani_id animal_vacinas PK, FK INTEGER Yes
ani_id semem FK INTEGER No
ani_id animal_reproducao PK, FK INTEGER Yes
ani_id animal PK INTEGER Yes
ani_id pesagem FK INTEGER No
ani_idade animal INTEGER No
ani_mae animal CHARACTER No
VARYING(40)
ani_morte animal DATE No
ani_nasc animal DATE No
ani_nf animal CHARACTER No
VARYING(40)
ani_nome animal CHARACTER No
VARYING(40)
ani_numero animal CHARACTER Yes
VARYING(40)
ani_pai animal CHARACTER No
VARYING(40)
ani_pelagem animal CHARACTER No
VARYING(40)
ani_peso animal CHARACTER No
VARYING(40)
ani_preco animal MONEY Yes
ani_precoVen animal MONEY No
ani_serienf animal CHARACTER No
VARYING(40)
ani_sexo animal CHARACTER No
VARYING(40)
ani_status animal CHARACTER No
VARYING(40)
ar_data animal_reproducao CHARACTER(40) No
ar_tipo animal_reproducao CHARACTER(40) No
av_data animal_vacinas CHARACTER Yes
VARYING(40)
av_quant animal_vacinas CHARACTER Yes
VARYING(40)
cid_id pessoa FK INTEGER No
cid_id cidade PK INTEGER Yes
cid_nome cidade CHARACTER Yes
VARYING(40)
ci_quant compra_insumos INTEGER Yes
ci_valor compra_insumos MONEY Yes
comp_data compra DATE Yes
comp_formapag compra CHARACTER Yes
VARYING(40)
comp_id compra PK INTEGER Yes
comp_id compra_insumos PK, FK INTEGER Yes
comp_id animal FK INTEGER No
comp_id contas_pagar FK INTEGER No
comp_nota compra CHARACTER Yes
VARYING(40)
comp_serie_nota compra CHARACTER Yes
VARYING(40)
comp_tipo compra CHARACTER Yes
VARYING(40)

33
comp_total compra MONEY Yes
est_id cidade FK INTEGER No
est_id estado PK INTEGER Yes
est_nome estado CHARACTER Yes
VARYING(40)
est_sigla estado CHARACTER Yes
VARYING(40)
fis_cpf fisica CHARACTER(40) Yes
fis_id fisica PK INTEGER Yes
fis_rg fisica CHARACTER(40) Yes
ins_estoque insumos INTEGER Yes
ins_id insumos PK INTEGER Yes
ins_id compra_insumos PK, FK INTEGER Yes
ins_nome insumos CHARACTER Yes
VARYING(40)
ins_val insumos MONEY Yes
jur_cnpj juridica CHARACTER(40) Yes
jur_id juridica PK INTEGER Yes
jur_ie juridica CHARACTER(40) Yes
jur_mun juridica CHARACTER(40) Yes
lote_id lote PK INTEGER Yes
lote_id animal FK INTEGER No
lote_nome lote CHARACTER Yes
VARYING(40)
pag_cond contas_pagar CHARACTER No
VARYING(40)
pag_date contas_pagar DATE No
pag_id contas_pagar PK INTEGER Yes
pag_ordem contas_pagar INTEGER No
pag_pagamento contas_pagar DATE No
pag_valor contas_pagar MONEY Yes
pag_vencimento contas_pagar DATE No
pes_bairro pessoa CHARACTER Yes
VARYING(40)
pes_celular pessoa CHARACTER No
VARYING(40)
pes_cep pessoa CHARACTER No
VARYING(40)
pes_complemento pessoa CHARACTER No
VARYING(40)
pes_contato pessoa CHARACTER(40) No
pes_data pesagem CHARACTER Yes
VARYING(40)
pes_email pessoa CHARACTER No
VARYING(40)
pes_id juridica FK INTEGER No
pes_id compra FK INTEGER No
pes_id venda FK INTEGER No
pes_id pesagem PK INTEGER Yes
pes_id fisica FK INTEGER No
pes_id pessoa PK INTEGER Yes
pes_login pessoa CHARACTER No
VARYING(40)
pes_nivel pessoa INTEGER No
pes_nome pessoa CHARACTER Yes
VARYING(40)
pes_numero pessoa CHARACTER Yes
VARYING(40)
pes_peso pesagem CHARACTER Yes
VARYING(40)
34
pes_rua pessoa CHARACTER Yes
VARYING(40)
pes_senha pessoa CHARACTER No
VARYING(40)
pes_telcontato pessoa CHARACTER(40) No
pes_telefone pessoa CHARACTER No
VARYING(40)
pes_tipo pessoa INTEGER Yes
raca_id animal FK INTEGER No
raca_id raca PK INTEGER Yes
raca_nome raca CHARACTER Yes
VARYING(40)
reb_data_fim Rebanho DATE Yes
reb_data_ini Rebanho DATE Yes
reb_desc Rebanho CHARACTER No
VARYING(40)
reb_id Rebanho PK SERIAL Yes
reb_id animal FK INTEGER No
reb_nome Rebanho CHARACTER Yes
VARYING(40)
rec_id contas_receber PK INTEGER Yes
rec_ordem contas_receber INTEGER Yes
rec_pagamento contas_receber DATE Yes
rec_tipo contas_receber CHARACTER Yes
VARYING(40)
rec_valor contas_receber MONEY Yes
rec_vencimento contas_receber DATE Yes
red_data reproducao DATE No
rep_id reproducao PK INTEGER Yes
rep_id animal_reproducao PK, FK INTEGER Yes
rep_relatorio reproducao CHARACTER No
VARYING(40)
sem_amostra semem CHARACTER Yes
VARYING(40)
sem_data semem DATE Yes
sem_id semem PK INTEGER Yes
sem_quant semem INTEGER Yes
tipo_id animal_reproducao PK INTEGER Yes
tipo_id Tipo PK SERIAL Yes
tipo_id animal_vacinas PK INTEGER Yes
tipo_id animal FK INTEGER Yes
tipo_nome Tipo CHARACTER No
VARYING(40)
ti_id insumos FK INTEGER No
ti_id tipos_insumos PK INTEGER Yes
ti_nome insumos FK CHARACTER No
VARYING(40)
ti_nome tipos_insumos PK CHARACTER Yes
VARYING(40)
vac_estoque vacinas CHARACTER(40) No
vac_id vacinas PK INTEGER Yes
vac_id animal_vacinas PK, FK INTEGER Yes
vac_nome vacinas CHARACTER(40) No
vac_preco vacinas MONEY No
vac_validade vacinas DATE No
vend_data venda DATE Yes
vend_formrec venda CHARACTER Yes
VARYING(40)
vend_id venda PK INTEGER Yes

35
vend_id contas_receber FK INTEGER No
vend_id animal FK INTEGER No
vend_nota venda CHARACTER Yes
VARYING(40)
vend_serie_nota venda CHARACTER Yes
VARYING(40)
vend_total venda MONEY Yes

36
Attribute: ani_id
Table animal_vacinas
Comment
Primary key Yes
Data type INTEGER
Domain name
Not NULL Yes
Default

Attribute: ani_id
Table semem
Comment
Primary key No
Data type INTEGER
Domain name
Not NULL No
Default

Attribute: ani_id
Table animal_reproducao
Comment
Primary key Yes
Data type INTEGER
Domain name
Not NULL Yes
Default

Attribute: ani_id
Table animal
Comment
Primary key Yes
Data type INTEGER
Domain name
Not NULL Yes
Default

Attribute: ani_id
Table pesagem
Comment
Primary key No
Data type INTEGER
Domain name
Not NULL No
Default

Attribute: ani_idade
Table animal
Comment
Primary key No
Data type INTEGER
Domain name
Not NULL No
Default

37
Attribute: ani_mae
Table animal
Comment
Primary key No
Data type CHARACTER VARYING(40)
Domain name
Not NULL No
Default

Attribute: ani_morte
Table animal
Comment
Primary key No
Data type DATE
Domain name
Not NULL No
Default

Attribute: ani_nasc
Table animal
Comment
Primary key No
Data type DATE
Domain name
Not NULL No
Default

Attribute: ani_nf
Table animal
Comment
Primary key No
Data type CHARACTER VARYING(40)
Domain name
Not NULL No
Default

Attribute: ani_nome
Table animal
Comment
Primary key No
Data type CHARACTER VARYING(40)
Domain name
Not NULL No
Default

Attribute: ani_numero
Table animal
Comment
Primary key No
Data type CHARACTER VARYING(40)
Domain name
Not NULL Yes

38
Default

Attribute: ani_pai
Table animal
Comment
Primary key No
Data type CHARACTER VARYING(40)
Domain name
Not NULL No
Default

Attribute: ani_pelagem
Table animal
Comment
Primary key No
Data type CHARACTER VARYING(40)
Domain name
Not NULL No
Default

Attribute: ani_peso
Table animal
Comment
Primary key No
Data type CHARACTER VARYING(40)
Domain name
Not NULL No
Default

Attribute: ani_preco
Table animal
Comment
Primary key No
Data type MONEY
Domain name
Not NULL Yes
Default

Attribute: ani_precoVen
Table animal
Comment
Primary key No
Data type MONEY
Domain name
Not NULL No
Default

Attribute: ani_serienf
Table animal
Comment
Primary key No
Data type CHARACTER VARYING(40)
Domain name

39
Not NULL No
Default

Attribute: ani_sexo
Table animal
Comment
Primary key No
Data type CHARACTER VARYING(40)
Domain name
Not NULL No
Default

Attribute: ani_status
Table animal
Comment
Primary key No
Data type CHARACTER VARYING(40)
Domain name
Not NULL No
Default

Attribute: ar_data
Table animal_reproducao
Comment
Primary key No
Data type CHARACTER(40)
Domain name
Not NULL No
Default

Attribute: ar_tipo
Table animal_reproducao
Comment
Primary key No
Data type CHARACTER(40)
Domain name
Not NULL No
Default

Attribute: av_data
Table animal_vacinas
Comment
Primary key No
Data type CHARACTER VARYING(40)
Domain name
Not NULL Yes
Default

Attribute: av_quant
Table animal_vacinas
Comment
Primary key No
Data type CHARACTER VARYING(40)

40
Domain name
Not NULL Yes
Default

Attribute: cid_id
Table pessoa
Comment
Primary key No
Data type INTEGER
Domain name
Not NULL No
Default

Attribute: cid_id
Table cidade
Comment
Primary key Yes
Data type INTEGER
Domain name
Not NULL Yes
Default

Attribute: cid_nome
Table cidade
Comment
Primary key No
Data type CHARACTER VARYING(40)
Domain name
Not NULL Yes
Default

Attribute: ci_quant
Table compra_insumos
Comment
Primary key No
Data type INTEGER
Domain name
Not NULL Yes
Default

Attribute: ci_valor
Table compra_insumos
Comment
Primary key No
Data type MONEY
Domain name
Not NULL Yes
Default

Attribute: comp_data
Table compra
Comment
Primary key No
41
Data type DATE
Domain name
Not NULL Yes
Default

Attribute: comp_formapag
Table compra
Comment
Primary key No
Data type CHARACTER VARYING(40)
Domain name
Not NULL Yes
Default

Attribute: comp_id
Table compra
Comment
Primary key Yes
Data type INTEGER
Domain name
Not NULL Yes
Default

Attribute: comp_id
Table compra_insumos
Comment
Primary key Yes
Data type INTEGER
Domain name
Not NULL Yes
Default

Attribute: comp_id
Table animal
Comment
Primary key No
Data type INTEGER
Domain name
Not NULL No
Default

Attribute: comp_id
Table contas_pagar
Comment
Primary key No
Data type INTEGER
Domain name
Not NULL No
Default

Attribute: comp_nota
Table compra
Comment

42
Primary key No
Data type CHARACTER VARYING(40)
Domain name
Not NULL Yes
Default

Attribute: comp_serie_nota
Table compra
Comment
Primary key No
Data type CHARACTER VARYING(40)
Domain name
Not NULL Yes
Default

Attribute: comp_tipo
Table compra
Comment
Primary key No
Data type CHARACTER VARYING(40)
Domain name
Not NULL Yes
Default

Attribute: comp_total
Table compra
Comment
Primary key No
Data type MONEY
Domain name
Not NULL Yes
Default

Attribute: est_id
Table cidade
Comment
Primary key No
Data type INTEGER
Domain name
Not NULL No
Default

Attribute: est_id
Table estado
Comment
Primary key Yes
Data type INTEGER
Domain name
Not NULL Yes
Default

Attribute: est_nome
Table estado

43
Comment
Primary key No
Data type CHARACTER VARYING(40)
Domain name
Not NULL Yes
Default

Attribute: est_sigla
Table estado
Comment
Primary key No
Data type CHARACTER VARYING(40)
Domain name
Not NULL Yes
Default

Attribute: fis_cpf
Table fisica
Comment
Primary key No
Data type CHARACTER(40)
Domain name
Not NULL Yes
Default

Attribute: fis_id
Table fisica
Comment
Primary key Yes
Data type INTEGER
Domain name
Not NULL Yes
Default

Attribute: fis_rg
Table fisica
Comment
Primary key No
Data type CHARACTER(40)
Domain name
Not NULL Yes
Default

Attribute: ins_estoque
Table insumos
Comment
Primary key No
Data type INTEGER
Domain name
Not NULL Yes
Default

Attribute: ins_id
44
Table insumos
Comment
Primary key Yes
Data type INTEGER
Domain name
Not NULL Yes
Default

Attribute: ins_id
Table compra_insumos
Comment
Primary key Yes
Data type INTEGER
Domain name
Not NULL Yes
Default

Attribute: ins_nome
Table insumos
Comment
Primary key No
Data type CHARACTER VARYING(40)
Domain name
Not NULL Yes
Default

Attribute: ins_val
Table insumos
Comment
Primary key No
Data type MONEY
Domain name
Not NULL Yes
Default

Attribute: jur_cnpj
Table juridica
Comment
Primary key No
Data type CHARACTER(40)
Domain name
Not NULL Yes
Default

Attribute: jur_id
Table juridica
Comment
Primary key Yes
Data type INTEGER
Domain name
Not NULL Yes
Default

45
Attribute: jur_ie
Table juridica
Comment
Primary key No
Data type CHARACTER(40)
Domain name
Not NULL Yes
Default

Attribute: jur_mun
Table juridica
Comment
Primary key No
Data type CHARACTER(40)
Domain name
Not NULL Yes
Default

Attribute: lote_id
Table lote
Comment
Primary key Yes
Data type INTEGER
Domain name
Not NULL Yes
Default

Attribute: lote_id
Table animal
Comment
Primary key No
Data type INTEGER
Domain name
Not NULL No
Default

Attribute: lote_nome
Table lote
Comment
Primary key No
Data type CHARACTER VARYING(40)
Domain name
Not NULL Yes
Default

Attribute: pag_cond
Table contas_pagar
Comment
Primary key No
Data type CHARACTER VARYING(40)
Domain name
Not NULL No
Default

46
Attribute: pag_date
Table contas_pagar
Comment
Primary key No
Data type DATE
Domain name
Not NULL No
Default

Attribute: pag_id
Table contas_pagar
Comment
Primary key Yes
Data type INTEGER
Domain name
Not NULL Yes
Default

Attribute: pag_ordem
Table contas_pagar
Comment
Primary key No
Data type INTEGER
Domain name
Not NULL No
Default

Attribute: pag_pagamento
Table contas_pagar
Comment
Primary key No
Data type DATE
Domain name
Not NULL No
Default

Attribute: pag_valor
Table contas_pagar
Comment
Primary key No
Data type MONEY
Domain name
Not NULL Yes
Default

Attribute: pag_vencimento
Table contas_pagar
Comment
Primary key No
Data type DATE
Domain name
Not NULL No
Default

47
Attribute: pes_bairro
Table pessoa
Comment
Primary key No
Data type CHARACTER VARYING(40)
Domain name
Not NULL Yes
Default

Attribute: pes_celular
Table pessoa
Comment
Primary key No
Data type CHARACTER VARYING(40)
Domain name
Not NULL No
Default

Attribute: pes_cep
Table pessoa
Comment
Primary key No
Data type CHARACTER VARYING(40)
Domain name
Not NULL No
Default

Attribute: pes_complemento
Table pessoa
Comment
Primary key No
Data type CHARACTER VARYING(40)
Domain name
Not NULL No
Default

Attribute: pes_contato
Table pessoa
Comment
Primary key No
Data type CHARACTER(40)
Domain name
Not NULL No
Default

Attribute: pes_data
Table pesagem
Comment
Primary key No
Data type CHARACTER VARYING(40)
Domain name
Not NULL Yes

48
Default

Attribute: pes_email
Table pessoa
Comment
Primary key No
Data type CHARACTER VARYING(40)
Domain name
Not NULL No
Default

Attribute: pes_id
Table juridica
Comment
Primary key No
Data type INTEGER
Domain name
Not NULL No
Default

Attribute: pes_id
Table compra
Comment
Primary key No
Data type INTEGER
Domain name
Not NULL No
Default

Attribute: pes_id
Table venda
Comment
Primary key No
Data type INTEGER
Domain name
Not NULL No
Default

Attribute: pes_id
Table pesagem
Comment
Primary key Yes
Data type INTEGER
Domain name
Not NULL Yes
Default

Attribute: pes_id
Table fisica
Comment
Primary key No
Data type INTEGER
Domain name

49
Not NULL No
Default

Attribute: pes_id
Table pessoa
Comment
Primary key Yes
Data type INTEGER
Domain name
Not NULL Yes
Default

Attribute: pes_login
Table pessoa
Comment
Primary key No
Data type CHARACTER VARYING(40)
Domain name
Not NULL No
Default

Attribute: pes_nivel
Table pessoa
Comment
Primary key No
Data type INTEGER
Domain name
Not NULL No
Default

Attribute: pes_nome
Table pessoa
Comment
Primary key No
Data type CHARACTER VARYING(40)
Domain name
Not NULL Yes
Default

Attribute: pes_numero
Table pessoa
Comment
Primary key No
Data type CHARACTER VARYING(40)
Domain name
Not NULL Yes
Default

Attribute: pes_peso
Table pesagem
Comment
Primary key No
Data type CHARACTER VARYING(40)

50
Domain name
Not NULL Yes
Default

Attribute: pes_rua
Table pessoa
Comment
Primary key No
Data type CHARACTER VARYING(40)
Domain name
Not NULL Yes
Default

Attribute: pes_senha
Table pessoa
Comment
Primary key No
Data type CHARACTER VARYING(40)
Domain name
Not NULL No
Default

Attribute: pes_telcontato
Table pessoa
Comment
Primary key No
Data type CHARACTER(40)
Domain name
Not NULL No
Default

Attribute: pes_telefone
Table pessoa
Comment
Primary key No
Data type CHARACTER VARYING(40)
Domain name
Not NULL No
Default

Attribute: pes_tipo
Table pessoa
Comment
Primary key No
Data type INTEGER
Domain name
Not NULL Yes
Default

Attribute: raca_id
Table animal
Comment
Primary key No
51
Data type INTEGER
Domain name
Not NULL No
Default

Attribute: raca_id
Table raca
Comment
Primary key Yes
Data type INTEGER
Domain name
Not NULL Yes
Default

Attribute: raca_nome
Table raca
Comment
Primary key No
Data type CHARACTER VARYING(40)
Domain name
Not NULL Yes
Default

Attribute: reb_data_fim
Table Rebanho
Comment
Primary key No
Data type DATE
Domain name
Not NULL Yes
Default

Attribute: reb_data_ini
Table Rebanho
Comment
Primary key No
Data type DATE
Domain name
Not NULL Yes
Default

Attribute: reb_desc
Table Rebanho
Comment
Primary key No
Data type CHARACTER VARYING(40)
Domain name
Not NULL No
Default

Attribute: reb_id
Table Rebanho
Comment

52
Primary key Yes
Data type SERIAL
Domain name
Not NULL Yes
Default

Attribute: reb_id
Table animal
Comment
Primary key No
Data type INTEGER
Domain name
Not NULL No
Default

Attribute: reb_nome
Table Rebanho
Comment
Primary key No
Data type CHARACTER VARYING(40)
Domain name
Not NULL Yes
Default

Attribute: rec_id
Table contas_receber
Comment
Primary key Yes
Data type INTEGER
Domain name
Not NULL Yes
Default

Attribute: rec_ordem
Table contas_receber
Comment
Primary key No
Data type INTEGER
Domain name
Not NULL Yes
Default

Attribute: rec_pagamento
Table contas_receber
Comment
Primary key No
Data type DATE
Domain name
Not NULL Yes
Default

Attribute: rec_tipo
Table contas_receber

53
Comment
Primary key No
Data type CHARACTER VARYING(40)
Domain name
Not NULL Yes
Default

Attribute: rec_valor
Table contas_receber
Comment
Primary key No
Data type MONEY
Domain name
Not NULL Yes
Default

Attribute: rec_vencimento
Table contas_receber
Comment
Primary key No
Data type DATE
Domain name
Not NULL Yes
Default

Attribute: red_data
Table reproducao
Comment
Primary key No
Data type DATE
Domain name
Not NULL No
Default

Attribute: rep_id
Table reproducao
Comment
Primary key Yes
Data type INTEGER
Domain name
Not NULL Yes
Default

Attribute: rep_id
Table animal_reproducao
Comment
Primary key Yes
Data type INTEGER
Domain name
Not NULL Yes
Default

Attribute: rep_relatorio
54
Table reproducao
Comment
Primary key No
Data type CHARACTER VARYING(40)
Domain name
Not NULL No
Default

Attribute: sem_amostra
Table semem
Comment
Primary key No
Data type CHARACTER VARYING(40)
Domain name
Not NULL Yes
Default

Attribute: sem_data
Table semem
Comment
Primary key No
Data type DATE
Domain name
Not NULL Yes
Default

Attribute: sem_id
Table semem
Comment
Primary key Yes
Data type INTEGER
Domain name
Not NULL Yes
Default

Attribute: sem_quant
Table semem
Comment
Primary key No
Data type INTEGER
Domain name
Not NULL Yes
Default

Attribute: tipo_id
Table animal_reproducao
Comment
Primary key Yes
Data type INTEGER
Domain name
Not NULL Yes
Default

55
Attribute: tipo_id
Table Tipo
Comment
Primary key Yes
Data type SERIAL
Domain name
Not NULL Yes
Default

Attribute: tipo_id
Table animal_vacinas
Comment
Primary key Yes
Data type INTEGER
Domain name
Not NULL Yes
Default

Attribute: tipo_id
Table animal
Comment
Primary key No
Data type INTEGER
Domain name
Not NULL Yes
Default

Attribute: tipo_nome
Table Tipo
Comment
Primary key No
Data type CHARACTER VARYING(40)
Domain name
Not NULL No
Default

Attribute: ti_id
Table insumos
Comment
Primary key No
Data type INTEGER
Domain name
Not NULL No
Default

Attribute: ti_id
Table tipos_insumos
Comment
Primary key Yes
Data type INTEGER
Domain name
Not NULL Yes
Default

56
Attribute: ti_nome
Table insumos
Comment
Primary key No
Data type CHARACTER VARYING(40)
Domain name
Not NULL No
Default

Attribute: ti_nome
Table tipos_insumos
Comment
Primary key Yes
Data type CHARACTER VARYING(40)
Domain name
Not NULL Yes
Default

Attribute: vac_estoque
Table vacinas
Comment
Primary key No
Data type CHARACTER(40)
Domain name
Not NULL No
Default

Attribute: vac_id
Table vacinas
Comment
Primary key Yes
Data type INTEGER
Domain name
Not NULL Yes
Default

Attribute: vac_id
Table animal_vacinas
Comment
Primary key Yes
Data type INTEGER
Domain name
Not NULL Yes
Default

Attribute: vac_nome
Table vacinas
Comment
Primary key No
Data type CHARACTER(40)
Domain name
Not NULL No
Default

57
Attribute: vac_preco
Table vacinas
Comment
Primary key No
Data type MONEY
Domain name
Not NULL No
Default

Attribute: vac_validade
Table vacinas
Comment
Primary key No
Data type DATE
Domain name
Not NULL No
Default

Attribute: vend_data
Table venda
Comment
Primary key No
Data type DATE
Domain name
Not NULL Yes
Default

Attribute: vend_formrec
Table venda
Comment
Primary key No
Data type CHARACTER VARYING(40)
Domain name
Not NULL Yes
Default

Attribute: vend_id
Table venda
Comment
Primary key Yes
Data type INTEGER
Domain name
Not NULL Yes
Default

Attribute: vend_id
Table contas_receber
Comment
Primary key No
Data type INTEGER
Domain name
Not NULL No

58
Default

Attribute: vend_id
Table animal
Comment
Primary key No
Data type INTEGER
Domain name
Not NULL No
Default

Attribute: vend_nota
Table venda
Comment
Primary key No
Data type CHARACTER VARYING(40)
Domain name
Not NULL Yes
Default

Attribute: vend_serie_nota
Table venda
Comment
Primary key No
Data type CHARACTER VARYING(40)
Domain name
Not NULL Yes
Default

Attribute: vend_total
Table venda
Comment
Primary key No
Data type MONEY
Domain name
Not NULL Yes
Default

59
Attribute details

60
Attribute: ani_id
Table animal_vacinas
Comment
Primary key Yes
Data type INTEGER
Domain name
Not NULL Yes
Default

Attribute: ani_id
Table semem
Comment
Primary key No
Data type INTEGER
Domain name
Not NULL No
Default

Attribute: ani_id
Table animal_reproducao
Comment
Primary key Yes
Data type INTEGER
Domain name
Not NULL Yes
Default

Attribute: ani_id
Table animal
Comment
Primary key Yes
Data type INTEGER
Domain name
Not NULL Yes
Default

Attribute: ani_id
Table pesagem
Comment
Primary key No
Data type INTEGER
Domain name
Not NULL No
Default

Attribute: ani_idade
Table animal
Comment
Primary key No
Data type INTEGER
Domain name
Not NULL No
Default

61
Attribute: ani_mae
Table animal
Comment
Primary key No
Data type CHARACTER VARYING(40)
Domain name
Not NULL No
Default

Attribute: ani_morte
Table animal
Comment
Primary key No
Data type DATE
Domain name
Not NULL No
Default

Attribute: ani_nasc
Table animal
Comment
Primary key No
Data type DATE
Domain name
Not NULL No
Default

Attribute: ani_nf
Table animal
Comment
Primary key No
Data type CHARACTER VARYING(40)
Domain name
Not NULL No
Default

Attribute: ani_nome
Table animal
Comment
Primary key No
Data type CHARACTER VARYING(40)
Domain name
Not NULL No
Default

Attribute: ani_numero
Table animal
Comment
Primary key No
Data type CHARACTER VARYING(40)
Domain name
Not NULL Yes

62
Default

Attribute: ani_pai
Table animal
Comment
Primary key No
Data type CHARACTER VARYING(40)
Domain name
Not NULL No
Default

Attribute: ani_pelagem
Table animal
Comment
Primary key No
Data type CHARACTER VARYING(40)
Domain name
Not NULL No
Default

Attribute: ani_peso
Table animal
Comment
Primary key No
Data type CHARACTER VARYING(40)
Domain name
Not NULL No
Default

Attribute: ani_preco
Table animal
Comment
Primary key No
Data type MONEY
Domain name
Not NULL Yes
Default

Attribute: ani_precoVen
Table animal
Comment
Primary key No
Data type MONEY
Domain name
Not NULL No
Default

Attribute: ani_serienf
Table animal
Comment
Primary key No
Data type CHARACTER VARYING(40)
Domain name

63
Not NULL No
Default

Attribute: ani_sexo
Table animal
Comment
Primary key No
Data type CHARACTER VARYING(40)
Domain name
Not NULL No
Default

Attribute: ani_status
Table animal
Comment
Primary key No
Data type CHARACTER VARYING(40)
Domain name
Not NULL No
Default

Attribute: ar_data
Table animal_reproducao
Comment
Primary key No
Data type CHARACTER(40)
Domain name
Not NULL No
Default

Attribute: ar_tipo
Table animal_reproducao
Comment
Primary key No
Data type CHARACTER(40)
Domain name
Not NULL No
Default

Attribute: av_data
Table animal_vacinas
Comment
Primary key No
Data type CHARACTER VARYING(40)
Domain name
Not NULL Yes
Default

Attribute: av_quant
Table animal_vacinas
Comment
Primary key No
Data type CHARACTER VARYING(40)

64
Domain name
Not NULL Yes
Default

Attribute: cid_id
Table pessoa
Comment
Primary key No
Data type INTEGER
Domain name
Not NULL No
Default

Attribute: cid_id
Table cidade
Comment
Primary key Yes
Data type INTEGER
Domain name
Not NULL Yes
Default

Attribute: cid_nome
Table cidade
Comment
Primary key No
Data type CHARACTER VARYING(40)
Domain name
Not NULL Yes
Default

Attribute: ci_quant
Table compra_insumos
Comment
Primary key No
Data type INTEGER
Domain name
Not NULL Yes
Default

Attribute: ci_valor
Table compra_insumos
Comment
Primary key No
Data type MONEY
Domain name
Not NULL Yes
Default

Attribute: comp_data
Table compra
Comment
Primary key No
65
Data type DATE
Domain name
Not NULL Yes
Default

Attribute: comp_formapag
Table compra
Comment
Primary key No
Data type CHARACTER VARYING(40)
Domain name
Not NULL Yes
Default

Attribute: comp_id
Table compra
Comment
Primary key Yes
Data type INTEGER
Domain name
Not NULL Yes
Default

Attribute: comp_id
Table compra_insumos
Comment
Primary key Yes
Data type INTEGER
Domain name
Not NULL Yes
Default

Attribute: comp_id
Table animal
Comment
Primary key No
Data type INTEGER
Domain name
Not NULL No
Default

Attribute: comp_id
Table contas_pagar
Comment
Primary key No
Data type INTEGER
Domain name
Not NULL No
Default

Attribute: comp_nota
Table compra
Comment

66
Primary key No
Data type CHARACTER VARYING(40)
Domain name
Not NULL Yes
Default

Attribute: comp_serie_nota
Table compra
Comment
Primary key No
Data type CHARACTER VARYING(40)
Domain name
Not NULL Yes
Default

Attribute: comp_tipo
Table compra
Comment
Primary key No
Data type CHARACTER VARYING(40)
Domain name
Not NULL Yes
Default

Attribute: comp_total
Table compra
Comment
Primary key No
Data type MONEY
Domain name
Not NULL Yes
Default

Attribute: est_id
Table cidade
Comment
Primary key No
Data type INTEGER
Domain name
Not NULL No
Default

Attribute: est_id
Table estado
Comment
Primary key Yes
Data type INTEGER
Domain name
Not NULL Yes
Default

Attribute: est_nome
Table estado

67
Comment
Primary key No
Data type CHARACTER VARYING(40)
Domain name
Not NULL Yes
Default

Attribute: est_sigla
Table estado
Comment
Primary key No
Data type CHARACTER VARYING(40)
Domain name
Not NULL Yes
Default

Attribute: fis_cpf
Table fisica
Comment
Primary key No
Data type CHARACTER(40)
Domain name
Not NULL Yes
Default

Attribute: fis_id
Table fisica
Comment
Primary key Yes
Data type INTEGER
Domain name
Not NULL Yes
Default

Attribute: fis_rg
Table fisica
Comment
Primary key No
Data type CHARACTER(40)
Domain name
Not NULL Yes
Default

Attribute: ins_estoque
Table insumos
Comment
Primary key No
Data type INTEGER
Domain name
Not NULL Yes
Default

Attribute: ins_id
68
Table insumos
Comment
Primary key Yes
Data type INTEGER
Domain name
Not NULL Yes
Default

Attribute: ins_id
Table compra_insumos
Comment
Primary key Yes
Data type INTEGER
Domain name
Not NULL Yes
Default

Attribute: ins_nome
Table insumos
Comment
Primary key No
Data type CHARACTER VARYING(40)
Domain name
Not NULL Yes
Default

Attribute: ins_val
Table insumos
Comment
Primary key No
Data type MONEY
Domain name
Not NULL Yes
Default

Attribute: jur_cnpj
Table juridica
Comment
Primary key No
Data type CHARACTER(40)
Domain name
Not NULL Yes
Default

Attribute: jur_id
Table juridica
Comment
Primary key Yes
Data type INTEGER
Domain name
Not NULL Yes
Default

69
Attribute: jur_ie
Table juridica
Comment
Primary key No
Data type CHARACTER(40)
Domain name
Not NULL Yes
Default

Attribute: jur_mun
Table juridica
Comment
Primary key No
Data type CHARACTER(40)
Domain name
Not NULL Yes
Default

Attribute: lote_id
Table lote
Comment
Primary key Yes
Data type INTEGER
Domain name
Not NULL Yes
Default

Attribute: lote_id
Table animal
Comment
Primary key No
Data type INTEGER
Domain name
Not NULL No
Default

Attribute: lote_nome
Table lote
Comment
Primary key No
Data type CHARACTER VARYING(40)
Domain name
Not NULL Yes
Default

Attribute: pag_cond
Table contas_pagar
Comment
Primary key No
Data type CHARACTER VARYING(40)
Domain name
Not NULL No
Default

70
Attribute: pag_date
Table contas_pagar
Comment
Primary key No
Data type DATE
Domain name
Not NULL No
Default

Attribute: pag_id
Table contas_pagar
Comment
Primary key Yes
Data type INTEGER
Domain name
Not NULL Yes
Default

Attribute: pag_ordem
Table contas_pagar
Comment
Primary key No
Data type INTEGER
Domain name
Not NULL No
Default

Attribute: pag_pagamento
Table contas_pagar
Comment
Primary key No
Data type DATE
Domain name
Not NULL No
Default

Attribute: pag_valor
Table contas_pagar
Comment
Primary key No
Data type MONEY
Domain name
Not NULL Yes
Default

Attribute: pag_vencimento
Table contas_pagar
Comment
Primary key No
Data type DATE
Domain name
Not NULL No
Default

71
Attribute: pes_bairro
Table pessoa
Comment
Primary key No
Data type CHARACTER VARYING(40)
Domain name
Not NULL Yes
Default

Attribute: pes_celular
Table pessoa
Comment
Primary key No
Data type CHARACTER VARYING(40)
Domain name
Not NULL No
Default

Attribute: pes_cep
Table pessoa
Comment
Primary key No
Data type CHARACTER VARYING(40)
Domain name
Not NULL No
Default

Attribute: pes_complemento
Table pessoa
Comment
Primary key No
Data type CHARACTER VARYING(40)
Domain name
Not NULL No
Default

Attribute: pes_contato
Table pessoa
Comment
Primary key No
Data type CHARACTER(40)
Domain name
Not NULL No
Default

Attribute: pes_data
Table pesagem
Comment
Primary key No
Data type CHARACTER VARYING(40)
Domain name
Not NULL Yes

72
Default

Attribute: pes_email
Table pessoa
Comment
Primary key No
Data type CHARACTER VARYING(40)
Domain name
Not NULL No
Default

Attribute: pes_id
Table juridica
Comment
Primary key No
Data type INTEGER
Domain name
Not NULL No
Default

Attribute: pes_id
Table compra
Comment
Primary key No
Data type INTEGER
Domain name
Not NULL No
Default

Attribute: pes_id
Table venda
Comment
Primary key No
Data type INTEGER
Domain name
Not NULL No
Default

Attribute: pes_id
Table pesagem
Comment
Primary key Yes
Data type INTEGER
Domain name
Not NULL Yes
Default

Attribute: pes_id
Table fisica
Comment
Primary key No
Data type INTEGER
Domain name

73
Not NULL No
Default

Attribute: pes_id
Table pessoa
Comment
Primary key Yes
Data type INTEGER
Domain name
Not NULL Yes
Default

Attribute: pes_login
Table pessoa
Comment
Primary key No
Data type CHARACTER VARYING(40)
Domain name
Not NULL No
Default

Attribute: pes_nivel
Table pessoa
Comment
Primary key No
Data type INTEGER
Domain name
Not NULL No
Default

Attribute: pes_nome
Table pessoa
Comment
Primary key No
Data type CHARACTER VARYING(40)
Domain name
Not NULL Yes
Default

Attribute: pes_numero
Table pessoa
Comment
Primary key No
Data type CHARACTER VARYING(40)
Domain name
Not NULL Yes
Default

Attribute: pes_peso
Table pesagem
Comment
Primary key No
Data type CHARACTER VARYING(40)

74
Domain name
Not NULL Yes
Default

Attribute: pes_rua
Table pessoa
Comment
Primary key No
Data type CHARACTER VARYING(40)
Domain name
Not NULL Yes
Default

Attribute: pes_senha
Table pessoa
Comment
Primary key No
Data type CHARACTER VARYING(40)
Domain name
Not NULL No
Default

Attribute: pes_telcontato
Table pessoa
Comment
Primary key No
Data type CHARACTER(40)
Domain name
Not NULL No
Default

Attribute: pes_telefone
Table pessoa
Comment
Primary key No
Data type CHARACTER VARYING(40)
Domain name
Not NULL No
Default

Attribute: pes_tipo
Table pessoa
Comment
Primary key No
Data type INTEGER
Domain name
Not NULL Yes
Default

Attribute: raca_id
Table animal
Comment
Primary key No
75
Data type INTEGER
Domain name
Not NULL No
Default

Attribute: raca_id
Table raca
Comment
Primary key Yes
Data type INTEGER
Domain name
Not NULL Yes
Default

Attribute: raca_nome
Table raca
Comment
Primary key No
Data type CHARACTER VARYING(40)
Domain name
Not NULL Yes
Default

Attribute: reb_data_fim
Table Rebanho
Comment
Primary key No
Data type DATE
Domain name
Not NULL Yes
Default

Attribute: reb_data_ini
Table Rebanho
Comment
Primary key No
Data type DATE
Domain name
Not NULL Yes
Default

Attribute: reb_desc
Table Rebanho
Comment
Primary key No
Data type CHARACTER VARYING(40)
Domain name
Not NULL No
Default

Attribute: reb_id
Table Rebanho
Comment

76
Primary key Yes
Data type SERIAL
Domain name
Not NULL Yes
Default

Attribute: reb_id
Table animal
Comment
Primary key No
Data type INTEGER
Domain name
Not NULL No
Default

Attribute: reb_nome
Table Rebanho
Comment
Primary key No
Data type CHARACTER VARYING(40)
Domain name
Not NULL Yes
Default

Attribute: rec_id
Table contas_receber
Comment
Primary key Yes
Data type INTEGER
Domain name
Not NULL Yes
Default

Attribute: rec_ordem
Table contas_receber
Comment
Primary key No
Data type INTEGER
Domain name
Not NULL Yes
Default

Attribute: rec_pagamento
Table contas_receber
Comment
Primary key No
Data type DATE
Domain name
Not NULL Yes
Default

Attribute: rec_tipo
Table contas_receber

77
Comment
Primary key No
Data type CHARACTER VARYING(40)
Domain name
Not NULL Yes
Default

Attribute: rec_valor
Table contas_receber
Comment
Primary key No
Data type MONEY
Domain name
Not NULL Yes
Default

Attribute: rec_vencimento
Table contas_receber
Comment
Primary key No
Data type DATE
Domain name
Not NULL Yes
Default

Attribute: red_data
Table reproducao
Comment
Primary key No
Data type DATE
Domain name
Not NULL No
Default

Attribute: rep_id
Table reproducao
Comment
Primary key Yes
Data type INTEGER
Domain name
Not NULL Yes
Default

Attribute: rep_id
Table animal_reproducao
Comment
Primary key Yes
Data type INTEGER
Domain name
Not NULL Yes
Default

Attribute: rep_relatorio
78
Table reproducao
Comment
Primary key No
Data type CHARACTER VARYING(40)
Domain name
Not NULL No
Default

Attribute: sem_amostra
Table semem
Comment
Primary key No
Data type CHARACTER VARYING(40)
Domain name
Not NULL Yes
Default

Attribute: sem_data
Table semem
Comment
Primary key No
Data type DATE
Domain name
Not NULL Yes
Default

Attribute: sem_id
Table semem
Comment
Primary key Yes
Data type INTEGER
Domain name
Not NULL Yes
Default

Attribute: sem_quant
Table semem
Comment
Primary key No
Data type INTEGER
Domain name
Not NULL Yes
Default

Attribute: tipo_id
Table animal_reproducao
Comment
Primary key Yes
Data type INTEGER
Domain name
Not NULL Yes
Default

79
Attribute: tipo_id
Table Tipo
Comment
Primary key Yes
Data type SERIAL
Domain name
Not NULL Yes
Default

Attribute: tipo_id
Table animal_vacinas
Comment
Primary key Yes
Data type INTEGER
Domain name
Not NULL Yes
Default

Attribute: tipo_id
Table animal
Comment
Primary key No
Data type INTEGER
Domain name
Not NULL Yes
Default

Attribute: tipo_nome
Table Tipo
Comment
Primary key No
Data type CHARACTER VARYING(40)
Domain name
Not NULL No
Default

Attribute: ti_id
Table insumos
Comment
Primary key No
Data type INTEGER
Domain name
Not NULL No
Default

Attribute: ti_id
Table tipos_insumos
Comment
Primary key Yes
Data type INTEGER
Domain name
Not NULL Yes
Default

80
Attribute: ti_nome
Table insumos
Comment
Primary key No
Data type CHARACTER VARYING(40)
Domain name
Not NULL No
Default

Attribute: ti_nome
Table tipos_insumos
Comment
Primary key Yes
Data type CHARACTER VARYING(40)
Domain name
Not NULL Yes
Default

Attribute: vac_estoque
Table vacinas
Comment
Primary key No
Data type CHARACTER(40)
Domain name
Not NULL No
Default

Attribute: vac_id
Table vacinas
Comment
Primary key Yes
Data type INTEGER
Domain name
Not NULL Yes
Default

Attribute: vac_id
Table animal_vacinas
Comment
Primary key Yes
Data type INTEGER
Domain name
Not NULL Yes
Default

Attribute: vac_nome
Table vacinas
Comment
Primary key No
Data type CHARACTER(40)
Domain name
Not NULL No
Default

81
Attribute: vac_preco
Table vacinas
Comment
Primary key No
Data type MONEY
Domain name
Not NULL No
Default

Attribute: vac_validade
Table vacinas
Comment
Primary key No
Data type DATE
Domain name
Not NULL No
Default

Attribute: vend_data
Table venda
Comment
Primary key No
Data type DATE
Domain name
Not NULL Yes
Default

Attribute: vend_formrec
Table venda
Comment
Primary key No
Data type CHARACTER VARYING(40)
Domain name
Not NULL Yes
Default

Attribute: vend_id
Table venda
Comment
Primary key Yes
Data type INTEGER
Domain name
Not NULL Yes
Default

Attribute: vend_id
Table contas_receber
Comment
Primary key No
Data type INTEGER
Domain name
Not NULL No

82
Default

Attribute: vend_id
Table animal
Comment
Primary key No
Data type INTEGER
Domain name
Not NULL No
Default

Attribute: vend_nota
Table venda
Comment
Primary key No
Data type CHARACTER VARYING(40)
Domain name
Not NULL Yes
Default

Attribute: vend_serie_nota
Table venda
Comment
Primary key No
Data type CHARACTER VARYING(40)
Domain name
Not NULL Yes
Default

Attribute: vend_total
Table venda
Comment
Primary key No
Data type MONEY
Domain name
Not NULL Yes
Default

83
List of relationships

Name Relationship type Parent Child Cardinality


animal_animal_reproduca Identifying animal animal_reproduc Zero Or More
o ao
animal_animal_vacinas Identifying animal animal_vacinas Zero Or More
animal_pesagem Non Identifying animal pesagem Zero Or More
animal_semem Non Identifying animal semem Zero Or More
cidade_pessoa Non Identifying cidade pessoa Zero Or More
compra_animal Non Identifying compra animal Zero Or More
compra_compra_insumos Identifying compra compra_insumos Zero Or More
compra_contas_pagar Non Identifying compra contas_pagar Zero Or More
estado_cidade Non Identifying estado cidade Zero Or More
insumos_compra_insumo Identifying insumos compra_insumos Zero Or More
s
lote_animal Non Identifying lote animal Zero Or More
pessoa_compra Non Identifying pessoa compra Zero Or More
pessoa_fisica Non Identifying pessoa fisica Zero Or More
pessoa_juridica Non Identifying pessoa juridica Zero Or More
pessoa_venda Non Identifying pessoa venda Zero Or More
raca_animal Non Identifying raca animal Zero Or More
Rebanho_animal Non Identifying Rebanho animal Zero Or More
reproducao_animal_repro Identifying reproducao animal_reproduc Zero Or More
ducao ao
tipos_insumos_insumos Non Identifying tipos_insumos insumos Zero Or More
Tipo_animal Non Identifying Tipo animal Exactly One
vacinas_animal_vacinas Identifying vacinas animal_vacinas Zero Or More
venda_animal Non Identifying venda animal Zero Or More
venda_contas_receber Non Identifying venda contas_receber Zero Or More

84
Relationship: animal_animal_reproducao
Name animal_animal_reproducao
Relationship type Identifying
Cardinality Zero Or More
Parent with columns animal (ani_id)
Child with columns animal_reproducao (ani_id)
Update rule None
Delete rule None

Relationship: animal_animal_vacinas
Name animal_animal_vacinas
Relationship type Identifying
Cardinality Zero Or More
Parent with columns animal (ani_id)
Child with columns animal_vacinas (ani_id)
Update rule None
Delete rule None

Relationship: animal_pesagem
Name animal_pesagem
Relationship type Non Identifying
Cardinality Zero Or More
Parent with columns animal (ani_id)
Child with columns pesagem (ani_id)
Update rule None
Delete rule None

Relationship: animal_semem
Name animal_semem
Relationship type Non Identifying
Cardinality Zero Or More
Parent with columns animal (ani_id)
Child with columns semem (ani_id)
Update rule None
Delete rule None

Relationship: cidade_pessoa
Name cidade_pessoa
Relationship type Non Identifying
Cardinality Zero Or More
Parent with columns cidade (cid_id)
Child with columns pessoa (cid_id)
Update rule None
Delete rule None

Relationship: compra_animal
Name compra_animal
Relationship type Non Identifying
Cardinality Zero Or More
Parent with columns compra (comp_id)
Child with columns animal (comp_id)
Update rule None
Delete rule None

85
Relationship: compra_compra_insumos
Name compra_compra_insumos
Relationship type Identifying
Cardinality Zero Or More
Parent with columns compra (comp_id)
Child with columns compra_insumos (comp_id)
Update rule None
Delete rule None

Relationship: compra_contas_pagar
Name compra_contas_pagar
Relationship type Non Identifying
Cardinality Zero Or More
Parent with columns compra (comp_id)
Child with columns contas_pagar (comp_id)
Update rule None
Delete rule None

Relationship: estado_cidade
Name estado_cidade
Relationship type Non Identifying
Cardinality Zero Or More
Parent with columns estado (est_id)
Child with columns cidade (est_id)
Update rule None
Delete rule None

Relationship: insumos_compra_insumos
Name insumos_compra_insumos
Relationship type Identifying
Cardinality Zero Or More
Parent with columns insumos (ins_id)
Child with columns compra_insumos (ins_id)
Update rule None
Delete rule None

Relationship: lote_animal
Name lote_animal
Relationship type Non Identifying
Cardinality Zero Or More
Parent with columns lote (lote_id)
Child with columns animal (lote_id)
Update rule None
Delete rule None

Relationship: pessoa_compra
Name pessoa_compra
Relationship type Non Identifying
Cardinality Zero Or More
Parent with columns pessoa (pes_id)
Child with columns compra (pes_id)
Update rule None
Delete rule None

86
Relationship: pessoa_fisica
Name pessoa_fisica
Relationship type Non Identifying
Cardinality Zero Or More
Parent with columns pessoa (pes_id)
Child with columns fisica (pes_id)
Update rule None
Delete rule None

Relationship: pessoa_juridica
Name pessoa_juridica
Relationship type Non Identifying
Cardinality Zero Or More
Parent with columns pessoa (pes_id)
Child with columns juridica (pes_id)
Update rule None
Delete rule None

Relationship: pessoa_venda
Name pessoa_venda
Relationship type Non Identifying
Cardinality Zero Or More
Parent with columns pessoa (pes_id)
Child with columns venda (pes_id)
Update rule None
Delete rule None

Relationship: raca_animal
Name raca_animal
Relationship type Non Identifying
Cardinality Zero Or More
Parent with columns raca (raca_id)
Child with columns animal (raca_id)
Update rule None
Delete rule None

Relationship: Rebanho_animal
Name Rebanho_animal
Relationship type Non Identifying
Cardinality Zero Or More
Parent with columns Rebanho (reb_id)
Child with columns animal (reb_id)
Update rule None
Delete rule None

Relationship: reproducao_animal_reproducao
Name reproducao_animal_reproducao
Relationship type Identifying
Cardinality Zero Or More
Parent with columns reproducao (rep_id)
Child with columns animal_reproducao (rep_id)
Update rule None
Delete rule None

87
Relationship: tipos_insumos_insumos
Name tipos_insumos_insumos
Relationship type Non Identifying
Cardinality Zero Or More
Parent with columns tipos_insumos (ti_id, ti_nome)
Child with columns insumos (ti_id, ti_nome)
Update rule None
Delete rule None

Relationship: Tipo_animal
Name Tipo_animal
Relationship type Non Identifying
Cardinality Exactly One
Parent with columns Tipo (tipo_id)
Child with columns animal (tipo_id)
Update rule None
Delete rule None

Relationship: vacinas_animal_vacinas
Name vacinas_animal_vacinas
Relationship type Identifying
Cardinality Zero Or More
Parent with columns vacinas (vac_id)
Child with columns animal_vacinas (vac_id)
Update rule None
Delete rule None

Relationship: venda_animal
Name venda_animal
Relationship type Non Identifying
Cardinality Zero Or More
Parent with columns venda (vend_id)
Child with columns animal (vend_id)
Update rule None
Delete rule None

Relationship: venda_contas_receber
Name venda_contas_receber
Relationship type Non Identifying
Cardinality Zero Or More
Parent with columns venda (vend_id)
Child with columns contas_receber (vend_id)
Update rule None
Delete rule None

88
Relationship details

89
Relationship: animal_animal_reproducao
Name animal_animal_reproducao
Relationship type Identifying
Cardinality Zero Or More
Parent with columns animal (ani_id)
Child with columns animal_reproducao (ani_id)
Update rule None
Delete rule None

Relationship: animal_animal_vacinas
Name animal_animal_vacinas
Relationship type Identifying
Cardinality Zero Or More
Parent with columns animal (ani_id)
Child with columns animal_vacinas (ani_id)
Update rule None
Delete rule None

Relationship: animal_pesagem
Name animal_pesagem
Relationship type Non Identifying
Cardinality Zero Or More
Parent with columns animal (ani_id)
Child with columns pesagem (ani_id)
Update rule None
Delete rule None

Relationship: animal_semem
Name animal_semem
Relationship type Non Identifying
Cardinality Zero Or More
Parent with columns animal (ani_id)
Child with columns semem (ani_id)
Update rule None
Delete rule None

Relationship: cidade_pessoa
Name cidade_pessoa
Relationship type Non Identifying
Cardinality Zero Or More
Parent with columns cidade (cid_id)
Child with columns pessoa (cid_id)
Update rule None
Delete rule None

Relationship: compra_animal
Name compra_animal
Relationship type Non Identifying
Cardinality Zero Or More
Parent with columns compra (comp_id)
Child with columns animal (comp_id)
Update rule None
Delete rule None

90
Relationship: compra_compra_insumos
Name compra_compra_insumos
Relationship type Identifying
Cardinality Zero Or More
Parent with columns compra (comp_id)
Child with columns compra_insumos (comp_id)
Update rule None
Delete rule None

Relationship: compra_contas_pagar
Name compra_contas_pagar
Relationship type Non Identifying
Cardinality Zero Or More
Parent with columns compra (comp_id)
Child with columns contas_pagar (comp_id)
Update rule None
Delete rule None

Relationship: estado_cidade
Name estado_cidade
Relationship type Non Identifying
Cardinality Zero Or More
Parent with columns estado (est_id)
Child with columns cidade (est_id)
Update rule None
Delete rule None

Relationship: insumos_compra_insumos
Name insumos_compra_insumos
Relationship type Identifying
Cardinality Zero Or More
Parent with columns insumos (ins_id)
Child with columns compra_insumos (ins_id)
Update rule None
Delete rule None

Relationship: lote_animal
Name lote_animal
Relationship type Non Identifying
Cardinality Zero Or More
Parent with columns lote (lote_id)
Child with columns animal (lote_id)
Update rule None
Delete rule None

Relationship: pessoa_compra
Name pessoa_compra
Relationship type Non Identifying
Cardinality Zero Or More
Parent with columns pessoa (pes_id)
Child with columns compra (pes_id)
Update rule None
Delete rule None

91
Relationship: pessoa_fisica
Name pessoa_fisica
Relationship type Non Identifying
Cardinality Zero Or More
Parent with columns pessoa (pes_id)
Child with columns fisica (pes_id)
Update rule None
Delete rule None

Relationship: pessoa_juridica
Name pessoa_juridica
Relationship type Non Identifying
Cardinality Zero Or More
Parent with columns pessoa (pes_id)
Child with columns juridica (pes_id)
Update rule None
Delete rule None

Relationship: pessoa_venda
Name pessoa_venda
Relationship type Non Identifying
Cardinality Zero Or More
Parent with columns pessoa (pes_id)
Child with columns venda (pes_id)
Update rule None
Delete rule None

Relationship: raca_animal
Name raca_animal
Relationship type Non Identifying
Cardinality Zero Or More
Parent with columns raca (raca_id)
Child with columns animal (raca_id)
Update rule None
Delete rule None

Relationship: Rebanho_animal
Name Rebanho_animal
Relationship type Non Identifying
Cardinality Zero Or More
Parent with columns Rebanho (reb_id)
Child with columns animal (reb_id)
Update rule None
Delete rule None

Relationship: reproducao_animal_reproducao
Name reproducao_animal_reproducao
Relationship type Identifying
Cardinality Zero Or More
Parent with columns reproducao (rep_id)
Child with columns animal_reproducao (rep_id)
Update rule None
Delete rule None

92
Relationship: tipos_insumos_insumos
Name tipos_insumos_insumos
Relationship type Non Identifying
Cardinality Zero Or More
Parent with columns tipos_insumos (ti_id, ti_nome)
Child with columns insumos (ti_id, ti_nome)
Update rule None
Delete rule None

Relationship: Tipo_animal
Name Tipo_animal
Relationship type Non Identifying
Cardinality Exactly One
Parent with columns Tipo (tipo_id)
Child with columns animal (tipo_id)
Update rule None
Delete rule None

Relationship: vacinas_animal_vacinas
Name vacinas_animal_vacinas
Relationship type Identifying
Cardinality Zero Or More
Parent with columns vacinas (vac_id)
Child with columns animal_vacinas (vac_id)
Update rule None
Delete rule None

Relationship: venda_animal
Name venda_animal
Relationship type Non Identifying
Cardinality Zero Or More
Parent with columns venda (vend_id)
Child with columns animal (vend_id)
Update rule None
Delete rule None

Relationship: venda_contas_receber
Name venda_contas_receber
Relationship type Non Identifying
Cardinality Zero Or More
Parent with columns venda (vend_id)
Child with columns contas_receber (vend_id)
Update rule None
Delete rule None

93
List of domains

No domains available.

94
No domains available.

95
Domain details

96
No domains available.

97
List of views

No views available.

98
No views available.

99
View details

100
No views available.

101
List of procedures

No procedures available.

102
No procedures available.

103
Procedure details

104
No procedures available.

105
List of sequences

Name
animal_ani_id_seq
cidade_cid_id_seq
compra_comp_id_seq
contas_pagar_pag_id_seq
contas_receber_rec_id_seq
estado_est_id_seq
fisica_fis_id_seq
grupo_gru_id_seq
insumos_ins_id_seq
juridica_jur_id_seq
lote_lote_id_seq
pesagem_pes_id_seq
pessoa_pes_id_seq
raca_raca_id_seq
reproducao_rep_id_seq
semem_sem_id_seq
tipos_insumos_ti_id_seq
vacinas_vac_id_seq
venda_vend_id_seq

106
Sequence: animal_ani_id_seq
Name animal_ani_id_seq
Increment 1
Seed 51
Max 9223372036854775807
Min 1

Sequence: cidade_cid_id_seq
Name cidade_cid_id_seq
Increment 1
Seed 1
Max 9223372036854775807
Min 1

Sequence: compra_comp_id_seq
Name compra_comp_id_seq
Increment 1
Seed 23
Max 9223372036854775807
Min 1

Sequence: contas_pagar_pag_id_seq
Name contas_pagar_pag_id_seq
Increment 1
Seed 17
Max 9223372036854775807
Min 1

Sequence: contas_receber_rec_id_seq
Name contas_receber_rec_id_seq
Increment 1
Seed 1
Max 9223372036854775807
Min 1

Sequence: estado_est_id_seq
Name estado_est_id_seq
Increment 1
Seed 1
Max 9223372036854775807
Min 1

Sequence: fisica_fis_id_seq
Name fisica_fis_id_seq
Increment 1
Seed 4
Max 9223372036854775807
Min 1

Sequence: grupo_gru_id_seq
Name grupo_gru_id_seq
Increment 1
107
Seed 2
Max 9223372036854775807
Min 1

Sequence: insumos_ins_id_seq
Name insumos_ins_id_seq
Increment 1
Seed 7
Max 9223372036854775807
Min 1

Sequence: juridica_jur_id_seq
Name juridica_jur_id_seq
Increment 1
Seed 10
Max 9223372036854775807
Min 1

Sequence: lote_lote_id_seq
Name lote_lote_id_seq
Increment 1
Seed 3
Max 9223372036854775807
Min 1

Sequence: pesagem_pes_id_seq
Name pesagem_pes_id_seq
Increment 1
Seed 1
Max 9223372036854775807
Min 1

Sequence: pessoa_pes_id_seq
Name pessoa_pes_id_seq
Increment 1
Seed 24
Max 9223372036854775807
Min 1

Sequence: raca_raca_id_seq
Name raca_raca_id_seq
Increment 1
Seed 1
Max 9223372036854775807
Min 1

Sequence: reproducao_rep_id_seq
Name reproducao_rep_id_seq
Increment 1
Seed 1
Max 9223372036854775807
Min 1

108
Sequence: semem_sem_id_seq
Name semem_sem_id_seq
Increment 1
Seed 1
Max 9223372036854775807
Min 1

Sequence: tipos_insumos_ti_id_seq
Name tipos_insumos_ti_id_seq
Increment 1
Seed 3
Max 9223372036854775807
Min 1

Sequence: vacinas_vac_id_seq
Name vacinas_vac_id_seq
Increment 1
Seed 3
Max 9223372036854775807
Min 1

Sequence: venda_vend_id_seq
Name venda_vend_id_seq
Increment 1
Seed 1
Max 9223372036854775807
Min 1

109
Sequence details

110
Sequence: animal_ani_id_seq
Name animal_ani_id_seq
Increment 1
Seed 51
Max 9223372036854775807
Min 1

Sequence: cidade_cid_id_seq
Name cidade_cid_id_seq
Increment 1
Seed 1
Max 9223372036854775807
Min 1

Sequence: compra_comp_id_seq
Name compra_comp_id_seq
Increment 1
Seed 23
Max 9223372036854775807
Min 1

Sequence: contas_pagar_pag_id_seq
Name contas_pagar_pag_id_seq
Increment 1
Seed 17
Max 9223372036854775807
Min 1

Sequence: contas_receber_rec_id_seq
Name contas_receber_rec_id_seq
Increment 1
Seed 1
Max 9223372036854775807
Min 1

Sequence: estado_est_id_seq
Name estado_est_id_seq
Increment 1
Seed 1
Max 9223372036854775807
Min 1

Sequence: fisica_fis_id_seq
Name fisica_fis_id_seq
Increment 1
Seed 4
Max 9223372036854775807
Min 1

Sequence: grupo_gru_id_seq
Name grupo_gru_id_seq
Increment 1
111
Seed 2
Max 9223372036854775807
Min 1

Sequence: insumos_ins_id_seq
Name insumos_ins_id_seq
Increment 1
Seed 7
Max 9223372036854775807
Min 1

Sequence: juridica_jur_id_seq
Name juridica_jur_id_seq
Increment 1
Seed 10
Max 9223372036854775807
Min 1

Sequence: lote_lote_id_seq
Name lote_lote_id_seq
Increment 1
Seed 3
Max 9223372036854775807
Min 1

Sequence: pesagem_pes_id_seq
Name pesagem_pes_id_seq
Increment 1
Seed 1
Max 9223372036854775807
Min 1

Sequence: pessoa_pes_id_seq
Name pessoa_pes_id_seq
Increment 1
Seed 24
Max 9223372036854775807
Min 1

Sequence: raca_raca_id_seq
Name raca_raca_id_seq
Increment 1
Seed 1
Max 9223372036854775807
Min 1

Sequence: reproducao_rep_id_seq
Name reproducao_rep_id_seq
Increment 1
Seed 1
Max 9223372036854775807
Min 1

112
Sequence: semem_sem_id_seq
Name semem_sem_id_seq
Increment 1
Seed 1
Max 9223372036854775807
Min 1

Sequence: tipos_insumos_ti_id_seq
Name tipos_insumos_ti_id_seq
Increment 1
Seed 3
Max 9223372036854775807
Min 1

Sequence: vacinas_vac_id_seq
Name vacinas_vac_id_seq
Increment 1
Seed 3
Max 9223372036854775807
Min 1

Sequence: venda_vend_id_seq
Name venda_vend_id_seq
Increment 1
Seed 1
Max 9223372036854775807
Min 1

113

Você também pode gostar