Você está na página 1de 89

0226v1 tabelas

DatabaseType PostgreSQL 8.3


Date 22/11/2018

1
ER diagram

2
List of entities

Name Primary key constraint Number Comment


name of
columns
animal pk_animal 20
animal_compra pk_animal_compra 3
animal_reproducao pk_animal_reproducao 5
animal_vacinas pk_animal_vacinas 5
animal_venda pk_animal_venda 3
cidade pk_cidade 3
compra pk_compra 9
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
funcionario pk_funcionario 7
insumos pk_insumos 5
juridica pk_juridica 5
lote pk_lote 6
pesagem pesagem_pkey 5
pessoa pk_pessoa 14
piquete pk_piquete 4
raca raca_pkey 2
reproducao pk_reproducao 3
semem pk_semem 5
tipos_insumos pk_tipos_insumos 2
vacinas pk_vacinas 7
venda pk_venda 9

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 No
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_nome No CHARACTER No
VARYING(40)
lote_id No INTEGER No
ani_serienf No CHARACTER No
VARYING(40)
ani_nf No CHARACTER No
VARYING(40)
raca_id No INTEGER No
ani_pelagem No CHARACTER(40) No
ani_preco No MONEY No
ani_precoven No MONEY No
piq_id No INTEGER No
ani_desc No CHARACTER No
VARYING(40)
ani_status No BOOLEAN No

Relationships:
Name Relationship type Parent Child Cardinality
animal_animal_compra Identifying animal animal_compra Zero Or More
animal_animal_reproduc Identifying animal animal_reproduca Zero Or More
ao o
animal_animal_vacinas Identifying animal animal_vacinas Zero Or More
animal_animal_venda Identifying animal animal_venda Zero Or More
animal_pesagem Non Identifying animal pesagem Zero Or More
animal_semem Non Identifying animal semem Zero Or More
lote_animal Non Identifying lote animal Zero Or More
piquete_animal Non Identifying piquete animal Zero Or More
raca_animal Non Identifying raca animal Zero Or More

Constraints:
Name Type Level Constraint
Default Column Constraint DEFAULT
nextval('animal_ani_id_seq')
Not Null Column Constraint NOT NULL (ani_id)
lote_animal Foreign Key Table Constraint FOREIGN KEY (lote_id)
REFERENCES lote(lote_id)

4
piquete_animal Foreign Key Table Constraint FOREIGN KEY (piq_id)
REFERENCES piquete(piq_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)

Entity: animal_compra
Primary key constraint pk_animal_compra
name
Comment
Table options

Attributes:
Column name Primary key Data type Not NULL Comment
ani_id Yes INTEGER Yes
comp_id Yes INTEGER Yes
ac_valor No MONEY Yes

Relationships:
Name Relationship type Parent Child Cardinality
animal_animal_compra Identifying animal animal_compra Zero Or More
compra_animal_compra Identifying compra animal_compra Zero Or More

Constraints:
Name Type Level Constraint
Not Null Column Constraint NOT NULL (ac_valor)
Not Null Column Constraint NOT NULL (ani_id)
Not Null Column Constraint NOT NULL (comp_id)
animal_animal_compra Foreign Key Table Constraint FOREIGN KEY (ani_id)
REFERENCES animal(ani_id)
compra_animal_compra Foreign Key Table Constraint FOREIGN KEY (comp_id)
REFERENCES compra(comp_id)
pk_animal_compra Primary Key Table Constraint PRIMARY KEY (ani_id, comp_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
sem_id No INTEGER No

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

5
semem_animal_reproduc Non Identifying semem animal_reproduc Zero Or More
ao ao

Constraints:
Name Type Level Constraint
Not Null Column Constraint NOT NULL (rep_id)
Not Null Column Constraint NOT NULL (ani_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)
reproducao_animal_reproduc Foreign Key Table Constraint FOREIGN KEY (rep_id)
ao REFERENCES reproducao(rep_id)
semem_animal_reproducao Foreign Key Table Constraint FOREIGN KEY (sem_id)
REFERENCES semem(sem_id)

Entity: animal_vacinas
Primary key constraint pk_animal_vacinas
name
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)
comp_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 (comp_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,
comp_id)
vacinas_animal_vacinas Foreign Key Table Constraint FOREIGN KEY (vac_id)
REFERENCES vacinas(vac_id)

Entity: animal_venda
Primary key constraint pk_animal_venda
name
Comment
Table options

6
Attributes:
Column name Primary key Data type Not NULL Comment
ani_id Yes INTEGER Yes
vend_id Yes INTEGER Yes
av_valor No MONEY Yes

Relationships:
Name Relationship type Parent Child Cardinality
animal_animal_venda Identifying animal animal_venda Zero Or More
venda_animal_venda Identifying venda animal_venda Zero Or More

Constraints:
Name Type Level Constraint
Not Null Column Constraint NOT NULL (av_valor)
Not Null Column Constraint NOT NULL (ani_id)
Not Null Column Constraint NOT NULL (vend_id)
animal_animal_venda Foreign Key Table Constraint FOREIGN KEY (ani_id)
REFERENCES animal(ani_id)
pk_animal_venda Primary Key Table Constraint PRIMARY KEY (ani_id, vend_id)
venda_animal_venda Foreign Key Table Constraint FOREIGN KEY (vend_id)
REFERENCES venda(vend_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')
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
7
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
comp_forma No CHARACTER No
VARYING(40)

Relationships:
Name Relationship type Parent Child Cardinality
compra_animal_compra Identifying compra animal_compra 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:
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
8
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)

Entity: contas_receber
Primary key constraint pk_contas_receber
name
Comment
Table options
9
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 No
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_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

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)

10
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 Yes INTEGER Yes

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

Constraints:
Name Type Level Constraint
Not Null Column Constraint NOT NULL (pes_id)
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)
Not Null Column Constraint NOT NULL (fis_rg)
pessoa_fisica Foreign Key Table Constraint FOREIGN KEY (pes_id)
REFERENCES pessoa(pes_id)
pk_fisica Primary Key Table Constraint PRIMARY KEY (fis_id, pes_id)

Entity: funcionario
Primary key constraint pk_funcionario
name
Comment
Table options

Attributes:
Column name Primary key Data type Not NULL Comment
func_id Yes INTEGER Yes
func_login No CHARACTER No
VARYING(40)
func_senha No CHARACTER No
VARYING(40)
func_nivel No INTEGER No
func_cargo No CHARACTER(40) No
fis_id Yes INTEGER Yes
pes_id Yes INTEGER Yes

Relationships:
Name Relationship type Parent Child Cardinality
fisica_funcionario Identifying fisica funcionario Zero Or More

Constraints:
Name Type Level Constraint
Not Null Column Constraint NOT NULL (pes_id)
11
Not Null Column Constraint NOT NULL (func_id)
Default Column Constraint DEFAULT
nextval('funcionario_func_id_seq'
)
Not Null Column Constraint NOT NULL (fis_id)
fisica_funcionario Foreign Key Table Constraint FOREIGN KEY (fis_id, pes_id)
REFERENCES fisica(fis_id, pes_id)
pk_funcionario Primary Key Table Constraint PRIMARY KEY (func_id, fis_id,
pes_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

Relationships:
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)
REFERENCES tipos_insumos(ti_id)

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
12
pes_id Yes INTEGER Yes

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

Constraints:
Name Type Level Constraint
Not Null Column Constraint NOT NULL (pes_id)
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)
Not Null Column Constraint NOT NULL (jur_mun)
pessoa_juridica Foreign Key Table Constraint FOREIGN KEY (pes_id)
REFERENCES pessoa(pes_id)
pk_juridica Primary Key Table Constraint PRIMARY KEY (jur_id, pes_id)

Entity: lote
Primary key constraint pk_lote
name
Comment
Table options

Attributes:
Column name Primary key Data type Not NULL Comment
lote_id Yes INTEGER Yes
lote_nome No CHARACTER Yes
VARYING(40)
lote_ini No DATE No
lote_fim No CHARACTER(40) No
lote_quant No INTEGER No
lote_obs No CHARACTER No
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:
13
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
pes_obs No TEXT 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
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_tipo No INTEGER Yes
pes_contato No CHARACTER(40) No
pes_telcontato No CHARACTER(40) No
cid_id No INTEGER No

Relationships:

14
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 Identifying pessoa fisica Zero Or More
pessoa_juridica 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: piquete
Primary key constraint pk_piquete
name
Comment
Table options

Attributes:
Column name Primary key Data type Not NULL Comment
piq_id Yes INTEGER Yes
piq_numero No INTEGER No
piq_lotacao No INTEGER No
piq_obs No CHARACTER No
VARYING(40)

Relationships:
Name Relationship type Parent Child Cardinality
piquete_animal Non Identifying piquete animal Zero Or More

Constraints:
Name Type Level Constraint
Default Column Constraint DEFAULT
nextval('piquete_piq_id_seq')
Not Null Column Constraint NOT NULL (piq_id)
pk_piquete Primary Key Table Constraint PRIMARY KEY (piq_id)

Entity: raca
Primary key constraint raca_pkey
name
Comment
Table options

Attributes:
Column name Primary key Data type Not NULL Comment
raca_id Yes INTEGER Yes
15
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: 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
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

16
Relationships:
Name Relationship type Parent Child Cardinality
animal_semem Non Identifying animal semem Zero Or More
semem_animal_reprodu Non Identifying semem animal_reproduca Zero Or More
cao o

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: 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 No 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)

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
17
vac_preco No MONEY No
vac_serie No CHARACTER No
VARYING(40)
vac_lote No CHARACTER No
VARYING(40)

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

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
vend_val_arroba No MONEY No
vend_tipo No CHARACTER No
VARYING(40)

Relationships:
Name Relationship type Parent Child Cardinality
pessoa_venda Non Identifying pessoa venda Zero Or More
venda_animal_venda Identifying venda animal_venda 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)

18
pk_venda Primary Key Table Constraint PRIMARY KEY (vend_id)

19
Entity details

20
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 No
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_nome No CHARACTER No
VARYING(40)
lote_id No INTEGER No
ani_serienf No CHARACTER No
VARYING(40)
ani_nf No CHARACTER No
VARYING(40)
raca_id No INTEGER No
ani_pelagem No CHARACTER(40) No
ani_preco No MONEY No
ani_precoven No MONEY No
piq_id No INTEGER No
ani_desc No CHARACTER No
VARYING(40)
ani_status No BOOLEAN No

Relationships:
Name Relationship type Parent Child Cardinality
animal_animal_compra Identifying animal animal_compra Zero Or More
animal_animal_reproduc Identifying animal animal_reproduca Zero Or More
ao o
animal_animal_vacinas Identifying animal animal_vacinas Zero Or More
animal_animal_venda Identifying animal animal_venda Zero Or More
animal_pesagem Non Identifying animal pesagem Zero Or More
animal_semem Non Identifying animal semem Zero Or More
lote_animal Non Identifying lote animal Zero Or More
piquete_animal Non Identifying piquete animal Zero Or More
raca_animal Non Identifying raca animal Zero Or More

Constraints:
Name Type Level Constraint
Default Column Constraint DEFAULT
nextval('animal_ani_id_seq')
Not Null Column Constraint NOT NULL (ani_id)
lote_animal Foreign Key Table Constraint FOREIGN KEY (lote_id)
REFERENCES lote(lote_id)

21
piquete_animal Foreign Key Table Constraint FOREIGN KEY (piq_id)
REFERENCES piquete(piq_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)

Entity: animal_compra
Primary key constraint pk_animal_compra
name
Comment
Table options

Attributes:
Column name Primary key Data type Not NULL Comment
ani_id Yes INTEGER Yes
comp_id Yes INTEGER Yes
ac_valor No MONEY Yes

Relationships:
Name Relationship type Parent Child Cardinality
animal_animal_compra Identifying animal animal_compra Zero Or More
compra_animal_compra Identifying compra animal_compra Zero Or More

Constraints:
Name Type Level Constraint
Not Null Column Constraint NOT NULL (ac_valor)
Not Null Column Constraint NOT NULL (ani_id)
Not Null Column Constraint NOT NULL (comp_id)
animal_animal_compra Foreign Key Table Constraint FOREIGN KEY (ani_id)
REFERENCES animal(ani_id)
compra_animal_compra Foreign Key Table Constraint FOREIGN KEY (comp_id)
REFERENCES compra(comp_id)
pk_animal_compra Primary Key Table Constraint PRIMARY KEY (ani_id, comp_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
sem_id No INTEGER No

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

22
semem_animal_reproduc Non Identifying semem animal_reproduc Zero Or More
ao ao

Constraints:
Name Type Level Constraint
Not Null Column Constraint NOT NULL (rep_id)
Not Null Column Constraint NOT NULL (ani_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)
reproducao_animal_reproduc Foreign Key Table Constraint FOREIGN KEY (rep_id)
ao REFERENCES reproducao(rep_id)
semem_animal_reproducao Foreign Key Table Constraint FOREIGN KEY (sem_id)
REFERENCES semem(sem_id)

Entity: animal_vacinas
Primary key constraint pk_animal_vacinas
name
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)
comp_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 (comp_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,
comp_id)
vacinas_animal_vacinas Foreign Key Table Constraint FOREIGN KEY (vac_id)
REFERENCES vacinas(vac_id)

Entity: animal_venda
Primary key constraint pk_animal_venda
name
Comment
Table options

23
Attributes:
Column name Primary key Data type Not NULL Comment
ani_id Yes INTEGER Yes
vend_id Yes INTEGER Yes
av_valor No MONEY Yes

Relationships:
Name Relationship type Parent Child Cardinality
animal_animal_venda Identifying animal animal_venda Zero Or More
venda_animal_venda Identifying venda animal_venda Zero Or More

Constraints:
Name Type Level Constraint
Not Null Column Constraint NOT NULL (av_valor)
Not Null Column Constraint NOT NULL (ani_id)
Not Null Column Constraint NOT NULL (vend_id)
animal_animal_venda Foreign Key Table Constraint FOREIGN KEY (ani_id)
REFERENCES animal(ani_id)
pk_animal_venda Primary Key Table Constraint PRIMARY KEY (ani_id, vend_id)
venda_animal_venda Foreign Key Table Constraint FOREIGN KEY (vend_id)
REFERENCES venda(vend_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')
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
24
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
comp_forma No CHARACTER No
VARYING(40)

Relationships:
Name Relationship type Parent Child Cardinality
compra_animal_compra Identifying compra animal_compra 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:
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
25
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)

Entity: contas_receber
Primary key constraint pk_contas_receber
name
Comment
Table options
26
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 No
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_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

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)

27
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 Yes INTEGER Yes

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

Constraints:
Name Type Level Constraint
Not Null Column Constraint NOT NULL (pes_id)
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)
Not Null Column Constraint NOT NULL (fis_rg)
pessoa_fisica Foreign Key Table Constraint FOREIGN KEY (pes_id)
REFERENCES pessoa(pes_id)
pk_fisica Primary Key Table Constraint PRIMARY KEY (fis_id, pes_id)

Entity: funcionario
Primary key constraint pk_funcionario
name
Comment
Table options

Attributes:
Column name Primary key Data type Not NULL Comment
func_id Yes INTEGER Yes
func_login No CHARACTER No
VARYING(40)
func_senha No CHARACTER No
VARYING(40)
func_nivel No INTEGER No
func_cargo No CHARACTER(40) No
fis_id Yes INTEGER Yes
pes_id Yes INTEGER Yes

Relationships:
Name Relationship type Parent Child Cardinality
fisica_funcionario Identifying fisica funcionario Zero Or More

Constraints:
Name Type Level Constraint
Not Null Column Constraint NOT NULL (pes_id)
28
Not Null Column Constraint NOT NULL (func_id)
Default Column Constraint DEFAULT
nextval('funcionario_func_id_seq'
)
Not Null Column Constraint NOT NULL (fis_id)
fisica_funcionario Foreign Key Table Constraint FOREIGN KEY (fis_id, pes_id)
REFERENCES fisica(fis_id, pes_id)
pk_funcionario Primary Key Table Constraint PRIMARY KEY (func_id, fis_id,
pes_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

Relationships:
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)
REFERENCES tipos_insumos(ti_id)

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
29
pes_id Yes INTEGER Yes

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

Constraints:
Name Type Level Constraint
Not Null Column Constraint NOT NULL (pes_id)
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)
Not Null Column Constraint NOT NULL (jur_mun)
pessoa_juridica Foreign Key Table Constraint FOREIGN KEY (pes_id)
REFERENCES pessoa(pes_id)
pk_juridica Primary Key Table Constraint PRIMARY KEY (jur_id, pes_id)

Entity: lote
Primary key constraint pk_lote
name
Comment
Table options

Attributes:
Column name Primary key Data type Not NULL Comment
lote_id Yes INTEGER Yes
lote_nome No CHARACTER Yes
VARYING(40)
lote_ini No DATE No
lote_fim No CHARACTER(40) No
lote_quant No INTEGER No
lote_obs No CHARACTER No
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:
30
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
pes_obs No TEXT 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
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_tipo No INTEGER Yes
pes_contato No CHARACTER(40) No
pes_telcontato No CHARACTER(40) No
cid_id No INTEGER No

Relationships:

31
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 Identifying pessoa fisica Zero Or More
pessoa_juridica 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: piquete
Primary key constraint pk_piquete
name
Comment
Table options

Attributes:
Column name Primary key Data type Not NULL Comment
piq_id Yes INTEGER Yes
piq_numero No INTEGER No
piq_lotacao No INTEGER No
piq_obs No CHARACTER No
VARYING(40)

Relationships:
Name Relationship type Parent Child Cardinality
piquete_animal Non Identifying piquete animal Zero Or More

Constraints:
Name Type Level Constraint
Default Column Constraint DEFAULT
nextval('piquete_piq_id_seq')
Not Null Column Constraint NOT NULL (piq_id)
pk_piquete Primary Key Table Constraint PRIMARY KEY (piq_id)

Entity: raca
Primary key constraint raca_pkey
name
Comment
Table options

Attributes:
Column name Primary key Data type Not NULL Comment
raca_id Yes INTEGER Yes
32
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: 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
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

33
Relationships:
Name Relationship type Parent Child Cardinality
animal_semem Non Identifying animal semem Zero Or More
semem_animal_reprodu Non Identifying semem animal_reproduca Zero Or More
cao o

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: 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 No 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)

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
34
vac_preco No MONEY No
vac_serie No CHARACTER No
VARYING(40)
vac_lote No CHARACTER No
VARYING(40)

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

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
vend_val_arroba No MONEY No
vend_tipo No CHARACTER No
VARYING(40)

Relationships:
Name Relationship type Parent Child Cardinality
pessoa_venda Non Identifying pessoa venda Zero Or More
venda_animal_venda Identifying venda animal_venda 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)

35
pk_venda Primary Key Table Constraint PRIMARY KEY (vend_id)

36
Attribute: ac_valor
Table animal_compra
Comment
Primary key No
Data type MONEY
Domain name
Not NULL Yes
Default

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

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

Attribute: ani_id
Table animal_compra
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_id
Table animal_venda
Comment
Primary key Yes
Data type INTEGER
Domain name
Not NULL Yes
Default

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

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

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

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

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

38
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 No
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(40)
Domain name

39
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 No
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
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 BOOLEAN

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)
Domain name
Not NULL Yes
Default

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

Attribute: cid_id
Table cidade
Comment
Primary key Yes
41
Data type INTEGER
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_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
Data type DATE
Domain name
Not NULL Yes
Default

Attribute: comp_forma
Table compra
Comment

42
Primary key No
Data type CHARACTER VARYING(40)
Domain name
Not NULL No
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_insumos
Comment
Primary key Yes
Data type INTEGER
Domain name
Not NULL Yes
Default

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

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

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

Attribute: comp_id
Table compra

43
Comment
Primary key Yes
Data type INTEGER
Domain name
Not NULL Yes
Default

Attribute: comp_nota
Table compra
Comment
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
44
Table estado
Comment
Primary key Yes
Data type INTEGER
Domain name
Not NULL Yes
Default

Attribute: est_nome
Table estado
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_id
Table funcionario
Comment
Primary key Yes
Data type INTEGER
Domain name
Not NULL Yes
Default

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

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

Attribute: func_id
Table funcionario
Comment
Primary key Yes
Data type INTEGER
Domain name
Not NULL Yes
Default

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

Attribute: func_nivel
Table funcionario
Comment
Primary key No
Data type INTEGER
Domain name
Not NULL No
Default

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

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

Attribute: ins_id
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

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

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_fim
Table lote
Comment
Primary key No
Data type CHARACTER(40)
Domain name
Not NULL No
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

48
Default

Attribute: lote_ini
Table lote
Comment
Primary key No
Data type DATE
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: lote_obs
Table lote
Comment
Primary key No
Data type CHARACTER VARYING(40)
Domain name
Not NULL No
Default

Attribute: lote_quant
Table lote
Comment
Primary key No
Data type INTEGER
Domain name
Not NULL No
Default

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

Attribute: pag_date
Table contas_pagar
Comment
Primary key No
Data type DATE
Domain name

49
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

Attribute: pes_bairro
Table pessoa
Comment
Primary key No
Data type CHARACTER VARYING(40)

50
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
Default

Attribute: pes_email
Table pessoa
Comment
Primary key No
51
Data type CHARACTER VARYING(40)
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 pessoa
Comment
Primary key Yes
Data type INTEGER
Domain name
Not NULL Yes
Default

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

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

Attribute: pes_id
Table juridica
Comment

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

Attribute: pes_id
Table compra
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_obs
Table pesagem
Comment
Primary key No
Data type TEXT
Domain name
Not NULL No
Default

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

Attribute: pes_rua
Table pessoa

53
Comment
Primary key No
Data type CHARACTER VARYING(40)
Domain name
Not NULL Yes
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: piq_id
Table animal
Comment
Primary key No
Data type INTEGER
Domain name
Not NULL No
Default

Attribute: piq_id
Table piquete
Comment
Primary key Yes
Data type INTEGER
Domain name
Not NULL Yes
Default

Attribute: piq_lotacao
54
Table piquete
Comment
Primary key No
Data type INTEGER
Domain name
Not NULL No
Default

Attribute: piq_numero
Table piquete
Comment
Primary key No
Data type INTEGER
Domain name
Not NULL No
Default

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

Attribute: raca_id
Table animal
Comment
Primary key No
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

55
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 No
Default

Attribute: rec_tipo
Table contas_receber
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

56
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
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

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

Attribute: sem_id
Table animal_reproducao
Comment
Primary key No
Data type INTEGER
Domain name
Not NULL No
Default

Attribute: sem_quant
Table semem
Comment
Primary key No
Data type INTEGER
Domain name
Not NULL Yes
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

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

58
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_lote
Table vacinas
Comment
Primary key No
Data type CHARACTER VARYING(40)
Domain name
Not NULL No
Default

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

Attribute: vac_preco
Table vacinas
Comment
Primary key No
Data type MONEY
Domain name

59
Not NULL No
Default

Attribute: vac_serie
Table vacinas
Comment
Primary key No
Data type CHARACTER VARYING(40)
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 animal_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

60
Domain name
Not NULL No
Default

Attribute: vend_id
Table venda
Comment
Primary key Yes
Data type INTEGER
Domain name
Not NULL Yes
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_tipo
Table venda
Comment
Primary key No
Data type CHARACTER VARYING(40)
Domain name
Not NULL No
Default

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

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

62
Attribute details

63
Attribute: ac_valor
Table animal_compra
Comment
Primary key No
Data type MONEY
Domain name
Not NULL Yes
Default

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

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

Attribute: ani_id
Table animal_compra
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_id
Table animal_venda
Comment
Primary key Yes
Data type INTEGER
Domain name
Not NULL Yes
Default

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

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

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

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

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

65
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 No
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(40)
Domain name

66
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 No
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
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 BOOLEAN

67
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)
Domain name
Not NULL Yes
Default

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

Attribute: cid_id
Table cidade
Comment
Primary key Yes
68
Data type INTEGER
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_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
Data type DATE
Domain name
Not NULL Yes
Default

Attribute: comp_forma
Table compra
Comment

69
Primary key No
Data type CHARACTER VARYING(40)
Domain name
Not NULL No
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_insumos
Comment
Primary key Yes
Data type INTEGER
Domain name
Not NULL Yes
Default

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

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

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

Attribute: comp_id
Table compra

70
Comment
Primary key Yes
Data type INTEGER
Domain name
Not NULL Yes
Default

Attribute: comp_nota
Table compra
Comment
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
71
Table estado
Comment
Primary key Yes
Data type INTEGER
Domain name
Not NULL Yes
Default

Attribute: est_nome
Table estado
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_id
Table funcionario
Comment
Primary key Yes
Data type INTEGER
Domain name
Not NULL Yes
Default

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

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

Attribute: func_id
Table funcionario
Comment
Primary key Yes
Data type INTEGER
Domain name
Not NULL Yes
Default

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

Attribute: func_nivel
Table funcionario
Comment
Primary key No
Data type INTEGER
Domain name
Not NULL No
Default

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

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

Attribute: ins_id
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

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

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_fim
Table lote
Comment
Primary key No
Data type CHARACTER(40)
Domain name
Not NULL No
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

75
Default

Attribute: lote_ini
Table lote
Comment
Primary key No
Data type DATE
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: lote_obs
Table lote
Comment
Primary key No
Data type CHARACTER VARYING(40)
Domain name
Not NULL No
Default

Attribute: lote_quant
Table lote
Comment
Primary key No
Data type INTEGER
Domain name
Not NULL No
Default

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

Attribute: pag_date
Table contas_pagar
Comment
Primary key No
Data type DATE
Domain name

76
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

Attribute: pes_bairro
Table pessoa
Comment
Primary key No
Data type CHARACTER VARYING(40)

77
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
Default

Attribute: pes_email
Table pessoa
Comment
Primary key No
78
Data type CHARACTER VARYING(40)
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 pessoa
Comment
Primary key Yes
Data type INTEGER
Domain name
Not NULL Yes
Default

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

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

Attribute: pes_id
Table juridica
Comment

79
Primary key Yes
Data type INTEGER
Domain name
Not NULL Yes
Default

Attribute: pes_id
Table compra
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_obs
Table pesagem
Comment
Primary key No
Data type TEXT
Domain name
Not NULL No
Default

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

Attribute: pes_rua
Table pessoa

80
Comment
Primary key No
Data type CHARACTER VARYING(40)
Domain name
Not NULL Yes
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: piq_id
Table animal
Comment
Primary key No
Data type INTEGER
Domain name
Not NULL No
Default

Attribute: piq_id
Table piquete
Comment
Primary key Yes
Data type INTEGER
Domain name
Not NULL Yes
Default

Attribute: piq_lotacao
81
Table piquete
Comment
Primary key No
Data type INTEGER
Domain name
Not NULL No
Default

Attribute: piq_numero
Table piquete
Comment
Primary key No
Data type INTEGER
Domain name
Not NULL No
Default

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

Attribute: raca_id
Table animal
Comment
Primary key No
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

82
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 No
Default

Attribute: rec_tipo
Table contas_receber
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

83
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
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

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

Attribute: sem_id
Table animal_reproducao
Comment
Primary key No
Data type INTEGER
Domain name
Not NULL No
Default

Attribute: sem_quant
Table semem
Comment
Primary key No
Data type INTEGER
Domain name
Not NULL Yes
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

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

85
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_lote
Table vacinas
Comment
Primary key No
Data type CHARACTER VARYING(40)
Domain name
Not NULL No
Default

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

Attribute: vac_preco
Table vacinas
Comment
Primary key No
Data type MONEY
Domain name

86
Not NULL No
Default

Attribute: vac_serie
Table vacinas
Comment
Primary key No
Data type CHARACTER VARYING(40)
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 animal_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

87
Domain name
Not NULL No
Default

Attribute: vend_id
Table venda
Comment
Primary key Yes
Data type INTEGER
Domain name
Not NULL Yes
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_tipo
Table venda
Comment
Primary key No
Data type CHARACTER VARYING(40)
Domain name
Not NULL No
Default

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

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

89

Você também pode gostar