--

-- ER/Studio 8.0 SQL Code Generation

-- Company :      Microsoft

-- Project :      Model1.DM1

-- Author :       Microsoft

--

-- Date Created : Tuesday, September 11, 2012 12:40:44

-- Target DBMS : PostgreSQL 8.0

--



-- 

-- TABLE: bitacora 

--



CREATE TABLE bitacora(

    idbitacora    int4           NOT NULL,

    idusuario     int4           NOT NULL,

    nomtabl       varchar(15)    NOT NULL,

    accion        varchar(1)     NOT NULL,

    fecha         timestamp      NOT NULL,

    idreg         int4           NOT NULL,

    CONSTRAINT "PK97" PRIMARY KEY (idbitacora)

)

;







-- 

-- TABLE: c01clavepres 

--



CREATE TABLE c01clavepres(

    idclavepres    int4              NOT NULL,

    importanual    numeric(13, 2),

    idsector       int2              NOT NULL,

    iddepend       int2              NOT NULL,

    idobjeti       int2              NOT NULL,

    idprogra       int2              NOT NULL,

    idsubpro       int2              NOT NULL,

    idproyec       int2              NOT NULL,

    idactivi       int2              NOT NULL,

    idsubact       int2              NOT NULL,

    idpartida      int4              NOT NULL,

    idfuente       int4              NOT NULL,

    CONSTRAINT "PK2" PRIMARY KEY (idclavepres)

)

;







-- 

-- TABLE: c01sector 

--



CREATE TABLE c01sector(

    idsector    int2            NOT NULL,

    descri      varchar(150)    NOT NULL,

    CONSTRAINT pk_sector PRIMARY KEY (idsector)

)

;







-- 

-- TABLE: c02depend 

--



CREATE TABLE c02depend(

    idsector    int2            NOT NULL,

    iddepend    int2            NOT NULL,

    descri      varchar(150)    NOT NULL,

    CONSTRAINT pk_depend PRIMARY KEY (idsector, iddepend)

)

;







-- 

-- TABLE: c03objeti 

--



CREATE TABLE c03objeti(

    idsector    int2            NOT NULL,

    iddepend    int2            NOT NULL,

    idobjeti    int2            NOT NULL,

    descri      varchar(150)    NOT NULL,

    CONSTRAINT pk_objeti PRIMARY KEY (idsector, iddepend, idobjeti)

)

;







-- 

-- TABLE: c04progra 

--



CREATE TABLE c04progra(

    idsector    int2            NOT NULL,

    iddepend    int2            NOT NULL,

    idobjeti    int2            NOT NULL,

    idprogra    int2            NOT NULL,

    despro      varchar(150)    NOT NULL,

    CONSTRAINT pk_progra PRIMARY KEY (idsector, iddepend, idobjeti, idprogra)

)

;







-- 

-- TABLE: c05subpro 

--



CREATE TABLE c05subpro(

    idsector    int2            NOT NULL,

    iddepend    int2            NOT NULL,

    idobjeti    int2            NOT NULL,

    idprogra    int2            NOT NULL,

    idsubpro    int2            NOT NULL,

    desubp      varchar(150)    NOT NULL,

    CONSTRAINT pk_subpro PRIMARY KEY (idsector, iddepend, idobjeti, idprogra, idsubpro)

)

;







-- 

-- TABLE: c06proyec 

--



CREATE TABLE c06proyec(

    idsector    int2            NOT NULL,

    iddepend    int2            NOT NULL,

    idobjeti    int2            NOT NULL,

    idprogra    int2            NOT NULL,

    idsubpro    int2            NOT NULL,

    idproyec    int2            NOT NULL,

    deproy      varchar(200),

    unidep      int2,

    CONSTRAINT pk_proyec PRIMARY KEY (idsector, iddepend, idobjeti, idprogra, idsubpro, idproyec)

)

;







-- 

-- TABLE: c07activi 

--



CREATE TABLE c07activi(

    idsector    int2            NOT NULL,

    iddepend    int2            NOT NULL,

    idobjeti    int2            NOT NULL,

    idprogra    int2            NOT NULL,

    idsubpro    int2            NOT NULL,

    idproyec    int2            NOT NULL,

    idactivi    int2            NOT NULL,

    desact      varchar(200),

    CONSTRAINT pk_activi PRIMARY KEY (idsector, iddepend, idobjeti, idprogra, idsubpro, idproyec, idactivi)

)

;







-- 

-- TABLE: c08subact 

--



CREATE TABLE c08subact(

    idsector    int2            NOT NULL,

    iddepend    int2            NOT NULL,

    idobjeti    int2            NOT NULL,

    idprogra    int2            NOT NULL,

    idsubpro    int2            NOT NULL,

    idproyec    int2            NOT NULL,

    idactivi    int2            NOT NULL,

    idsubact    int2            NOT NULL,

    dessub      varchar(200),

    CONSTRAINT pk_subact PRIMARY KEY (idsector, iddepend, idobjeti, idprogra, idsubpro, idproyec, idactivi, idsubact)

)

;







-- 

-- TABLE: c09partida 

--



CREATE TABLE c09partida(

    idpartida    int4            NOT NULL,

    descri       varchar(150)    NOT NULL,

    CONSTRAINT "PK20" PRIMARY KEY (idpartida)

)

;







-- 

-- TABLE: c10fuente 

--



CREATE TABLE c10fuente(

    idfuente    int4            NOT NULL,

    descri      varchar(200)    NOT NULL,

    CONSTRAINT "PK21" PRIMARY KEY (idfuente)

)

;







-- 

-- TABLE: c11tipben 

--



CREATE TABLE c11tipben(

    idtipben    int2           NOT NULL,

    tipben      varchar(2)     NOT NULL,

    descr       varchar(50)    NOT NULL,

    n0          int4           NOT NULL,

    n2          int4           NOT NULL,

    CONSTRAINT "PK23" PRIMARY KEY (idtipben)

)

;







-- 

-- TABLE: c12benefi 

--



CREATE TABLE c12benefi(

    idbenefi       int4            NOT NULL,

    claveben       int4            NOT NULL,

    tipoper        char(1)         NOT NULL,

    appaterno      varchar(50),

    apmaterno      varchar(50),

    nombre         varchar(200),

    rfc            varchar(13)     NOT NULL,

    curp           varchar(18),

    iddireccion    int4            NOT NULL,

    idtipben       int2            NOT NULL,

    CONSTRAINT "PK24" PRIMARY KEY (idbenefi)

)

;







-- 

-- TABLE: c13direccion 

--



CREATE TABLE c13direccion(

    iddireccion    int4           NOT NULL,

    calle          varchar(50),

    numero         int4,

    CONSTRAINT "PK25" PRIMARY KEY (iddireccion)

)

;







-- 

-- TABLE: c14banco 

--



CREATE TABLE c14banco(

    idbanco    int4           NOT NULL,

    numban     varchar(5)     NOT NULL,

    nomban     varchar(40)    NOT NULL,

    CONSTRAINT "PK26" PRIMARY KEY (idbanco)

)

;







-- 

-- TABLE: c15ctaban 

--



CREATE TABLE c15ctaban(

    idctaban    int4           NOT NULL,

    cveban      varchar(4)     NOT NULL,

    cta         int4,

    numcta      varchar(14)    NOT NULL,

    clabe       varchar(18)    NOT NULL,

    idbanco     int4           NOT NULL,

    CONSTRAINT "PK28" PRIMARY KEY (idctaban)

)

;







-- 

-- TABLE: c16modali 

--



CREATE TABLE c16modali(

    idmodali    int2           NOT NULL,

    descri      varchar(50)    NOT NULL,

    CONSTRAINT "PK27" PRIMARY KEY (idmodali)

)

;







-- 

-- TABLE: c17ctacont 

--



CREATE TABLE c17ctacont(

    idctacont    int4            NOT NULL,

    n1           int4            NOT NULL,

    n2           int4            NOT NULL,

    n3           int4            NOT NULL,

    n4           int4            NOT NULL,

    n5           int4            NOT NULL,

    n0           int4            NOT NULL,

    nombre       varchar(100)    NOT NULL,

    natura       int4            NOT NULL,

    nivel        int4            NOT NULL,

    activa       int4            NOT NULL,

    CONSTRAINT "PK29" PRIMARY KEY (idctacont)

)

;







-- 

-- TABLE: c18nomcamp 

--



CREATE TABLE c18nomcamp(

    idnomcamp    int2           NOT NULL,

    nomcamp      varchar(30)    NOT NULL,

    CONSTRAINT "PK30" PRIMARY KEY (idnomcamp)

)

;







-- 

-- TABLE: c19datcamp 

--



CREATE TABLE c19datcamp(

    iddatcamp    int4           NOT NULL,

    valor        varchar(10)    NOT NULL,

    descri       varchar(30)    NOT NULL,

    idnomcamp    int2           NOT NULL,

    CONSTRAINT "PK31" PRIMARY KEY (iddatcamp)

)

;







-- 

-- TABLE: c20tippol 

--



CREATE TABLE c20tippol(

    idtippol    varchar(2)     NOT NULL,

    descri      varchar(30)    NOT NULL,

    uautoriz    varchar(25),

    CONSTRAINT u126_140 PRIMARY KEY (idtippol)

)

;







-- 

-- TABLE: c21conpol 

--



CREATE TABLE c21conpol(

    idconpol    int2           NOT NULL,

    descri      varchar(40)    NOT NULL,

    CONSTRAINT u127_143 PRIMARY KEY (idconpol)

)

;







-- 

-- TABLE: c22cierre 

--



CREATE TABLE c22cierre(

    idmes     int2           NOT NULL,

    descri    varchar(15)    NOT NULL,

    status    varchar(1)     NOT NULL,

    CONSTRAINT u122_107 PRIMARY KEY (idmes)

)

;







-- 

-- TABLE: c23connom 

--



CREATE TABLE c23connom(

    idconnom    int2           NOT NULL,

    conce       varchar(3)     NOT NULL,

    descri      varchar(50)    NOT NULL,

    tipcon      char(1)        NOT NULL,

    tipafe      char(1)        NOT NULL,

    status      boolean        NOT NULL,

    parcue      int4           NOT NULL,

    idfuente    int4           NOT NULL,

    CONSTRAINT "PK37" PRIMARY KEY (idconnom)

)

;







-- 

-- TABLE: c24mayor 

--



CREATE TABLE c24mayor(

    n0        int4            NOT NULL,

    grupo     int2            NOT NULL,

    grufin    varchar(4)      NOT NULL,

    desgru    varchar(30)     NOT NULL,

    nombre    varchar(100)    NOT NULL,

    CONSTRAINT "PK38" PRIMARY KEY (n0)

)

;







-- 

-- TABLE: c25relrei 

--



CREATE TABLE c25relrei(

    idrelrei    int2              NOT NULL,

    segun       varchar(40)       NOT NULL,

    numrec      int4              NOT NULL,

    imprec      numeric(13, 2),

    CONSTRAINT "PK39" PRIMARY KEY (idrelrei)

)

;







-- 

-- TABLE: c26retenc 

--



CREATE TABLE c26retenc(

    idrete    int2            NOT NULL,

    primar    int4            NOT NULL,

    n0        int4            NOT NULL,

    n1        int4            NOT NULL,

    n2        int4            NOT NULL,

    n3        int4            NOT NULL,

    n4        int4            NOT NULL,

    n5        int4            NOT NULL,

    nombre    varchar(150)    NOT NULL,

    CONSTRAINT pk_retenc PRIMARY KEY (idrete)

)

;







-- 

-- TABLE: c27parvia 

--



CREATE TABLE c27parvia(

    idpartida    int4           NOT NULL,

    descri       varchar(50)    NOT NULL,

    CONSTRAINT "PK41" PRIMARY KEY (idpartida)

)

;







-- 

-- TABLE: c28seplaobra 

--



CREATE TABLE c28seplaobra(

    idseplaobra    int4            NOT NULL,

    obrsep         varchar(10),

    desobr         varchar(254),

    CONSTRAINT u184_527 PRIMARY KEY (idseplaobra)

)

;







-- 

-- TABLE: c29proyco 

--



CREATE TABLE c29proyco(

    idproyco       int2       NOT NULL,

    sectorf        int2       NOT NULL,

    dependf        int2       NOT NULL,

    objetif        int2       NOT NULL,

    prograf        int2       NOT NULL,

    subprof        int2       NOT NULL,

    proyecf        int2       NOT NULL,

    compo          int2       NOT NULL,

    accion         int2       NOT NULL,

    fuentef        int4       NOT NULL,

    partidf        int2       NOT NULL,

    idclavepres    int4       NOT NULL,

    status         boolean    NOT NULL,

    CONSTRAINT "PK44" PRIMARY KEY (idproyco)

)

;







-- 

-- TABLE: c30titular 

--



CREATE TABLE c30titular(

    idtitular    int2           NOT NULL,

    nombre       varchar(70),

    puesto       varchar(70),

    linea        varchar(70),

    CONSTRAINT "PK46" PRIMARY KEY (idtitular)

)

;







-- 

-- TABLE: c31concepfin 

--



CREATE TABLE c31concepfin(

    idconcepfin    int4    NOT NULL,

    n1             int4    NOT NULL,

    n2             int4    NOT NULL,

    n3             int4    NOT NULL,

    n4             int4    NOT NULL,

    n5             int4    NOT NULL,

    n6             int4    NOT NULL,

    idconnom       int2    NOT NULL,

    CONSTRAINT "PK47" PRIMARY KEY (idconcepfin)

)

;







-- 

-- TABLE: c32ctamayor 

--



CREATE TABLE c32ctamayor(

    partida    int4    NOT NULL,

    cuenta     int4    NOT NULL,

    CONSTRAINT "PK48" PRIMARY KEY (partida)

)

;







-- 

-- TABLE: c33vehicu 

--



CREATE TABLE c33vehicu(

    idvehicu    int2           NOT NULL,

    matric      varchar(8)     NOT NULL,

    descri      varchar(30)    NOT NULL,

    CONSTRAINT "PK77" PRIMARY KEY (idvehicu)

)

;







-- 

-- TABLE: c34ctagto 

--



CREATE TABLE c34ctagto(

    idctagto    int2       NOT NULL,

    tipgto      char(1)    NOT NULL,

    idctaban    int4       NOT NULL,

    CONSTRAINT "PK87" PRIMARY KEY (idctagto)

)

;







-- 

-- TABLE: c36conver 

--



CREATE TABLE c36conver(

    idconver    int4       NOT NULL,

    proyec      int4       NOT NULL,

    activi      int4       NOT NULL,

    n1          int4,

    n2          int4,

    n3          int4,

    n4          int4,

    n5          int4,

    n6          int4,

    activo      boolean    NOT NULL,

    CONSTRAINT "PK92" PRIMARY KEY (idconver)

)

;







-- 

-- TABLE: p01acumya 

--



CREATE TABLE p01acumya(

    mespres        int2              NOT NULL,

    idclavepres    int4              NOT NULL,

    preasi         numeric(13, 2)    NOT NULL,

    amplia         numeric(13, 2)    NOT NULL,

    reducc         numeric(13, 2)    NOT NULL,

    tranam         numeric(13, 2)    NOT NULL,

    trared         numeric(13, 2)    NOT NULL,

    gascom         numeric(13, 2)    NOT NULL,

    ejecom         numeric(13, 2)    NOT NULL,

    presec         numeric(13, 2)    NOT NULL,

    modifi         numeric(13, 2)    NOT NULL,

    gtorea         numeric(13, 2)    NOT NULL,

    gtodis         numeric(13, 2)    NOT NULL,

    CONSTRAINT "PK1" PRIMARY KEY (mespres, idclavepres)

)

;







-- 

-- TABLE: p02movpar 

--



CREATE TABLE p02movpar(

    idmovpar    int4              NOT NULL,

    importe     numeric(13, 2)    NOT NULL,

    numofi      varchar(25)       NOT NULL,

    numdep      varchar(25)       NOT NULL,

    justi       varchar(255)      NOT NULL,

    area        int4              NOT NULL,

    cvedest     int4              NOT NULL,

    cveori      int4              NOT NULL,

    estatus     int4              NOT NULL,

    CONSTRAINT "PK49" PRIMARY KEY (idmovpar)

)

;







-- 

-- TABLE: p03orddel 

--



CREATE TABLE p03orddel(

    idordpag       int4              NOT NULL,

    numpag         int4              NOT NULL,

    consec         int4              NOT NULL,

    folio          varchar(20)       NOT NULL,

    concep         varchar(250)      NOT NULL,

    clavmov        varchar(5)        NOT NULL,

    fecreg         date              NOT NULL,

    importe        numeric(13, 2)    NOT NULL,

    area           int4              NOT NULL,

    depeje         varchar(40)       NOT NULL,

    autori         varchar(30)       NOT NULL,

    ejeacu         numeric(13, 2)    NOT NULL,

    idclavepres    int4              NOT NULL,

    idbenefi       int4              NOT NULL,

    idctaban       int4              NOT NULL,

    tipopago       int4              NOT NULL,

    estatus        int4              NOT NULL,

    CONSTRAINT "PK50_1" PRIMARY KEY (idordpag)

)

;







-- 

-- TABLE: p03ordpag 

--



CREATE TABLE p03ordpag(

    idordpag       int4            NOT NULL,

    folio          varchar(20)     NOT NULL,

    concep         varchar(250)    NOT NULL,

    area           int4            NOT NULL,

    depeje         varchar(40)     NOT NULL,

    autori         varchar(30)     NOT NULL,

    idclavepres    int4            NOT NULL,

    idbenefi       int4            NOT NULL,

    idctaban       int4            NOT NULL,

    tipopago       int4            NOT NULL,

    estatus        int4            NOT NULL,

    CONSTRAINT "PK50" PRIMARY KEY (idordpag)

)

;







-- 

-- TABLE: p045acucta 

--



CREATE TABLE p045acucta(

    idctacont    int4              NOT NULL,

    mes          int2              NOT NULL,

    cargo        numeric(13, 2)    NOT NULL,

    saldo        numeric(13, 2)    NOT NULL,

    abono        numeric(13, 2)    NOT NULL,

    CONSTRAINT "PK53" PRIMARY KEY (idctacont, mes)

)

;







-- 

-- TABLE: p04detorp 

--



CREATE TABLE p04detorp(

    iddetor     int4              NOT NULL,

    mes         int2              NOT NULL,

    numpag      int4              NOT NULL,

    consec      int4              NOT NULL,

    clamov      varchar(3)        NOT NULL,

    importe     numeric(13, 2),

    ejeacu      numeric(13, 2),

    fecreg      date              NOT NULL,

    idordpag    int4              NOT NULL,

    CONSTRAINT "PK82" PRIMARY KEY (iddetor)

)

;







-- 

-- TABLE: p06conrec 

--



CREATE TABLE p06conrec(

    idconrec    int4              NOT NULL,

    folio       varchar(20)       NOT NULL,

    fecreg      date              NOT NULL,

    importe     numeric(13, 2),

    feccon      date              NOT NULL,

    cheque      int4              NOT NULL,

    entrega     varchar(100),

    fecent      date,

    area        int4              NOT NULL,

    estatus     int4              NOT NULL,

    tippag      int4              NOT NULL,

    tipcon      int4              NOT NULL,

    idbenefi    int4              NOT NULL,

    idctaban    int4              NOT NULL,

    CONSTRAINT "PK52" PRIMARY KEY (idconrec)

)

;







-- 

-- TABLE: p07ctapag 

--



CREATE TABLE p07ctapag(

    idctapag       int4              NOT NULL,

    fechop         date              NOT NULL,

    importe        numeric(13, 2)    NOT NULL,

    fechcan        date              NOT NULL,

    fechpro        date,

    numrel         char(10),

    idconrec       int4              NOT NULL,

    idconcepfin    int4              NOT NULL,

    idctaban       int4              NOT NULL,

    estatus        int4              NOT NULL,

    CONSTRAINT "PK54" PRIMARY KEY (idctapag)

)

;







-- 

-- TABLE: p08poliza 

--



CREATE TABLE p08poliza(

    idpoliza    int4              NOT NULL,

    polizref    int4              NOT NULL,

    poliza      int4              NOT NULL,

    fechpol     date              NOT NULL,

    mpoliz      int2              NOT NULL,

    importe     numeric(13, 2)    NOT NULL,

    refere      varchar(50)       NOT NULL,

    idconpol    int2              NOT NULL,

    idtippol    varchar(2)        NOT NULL,

    estatus     int4              NOT NULL,

    CONSTRAINT "PK56" PRIMARY KEY (idpoliza)

)

;







-- 

-- TABLE: p09detpol 

--



CREATE TABLE p09detpol(

    iddetpol     int4              NOT NULL,

    tipdoc       char(1)           NOT NULL,

    importe      numeric(13, 2)    NOT NULL,

    movcon       char(1)           NOT NULL,

    sufici       char(1)           NOT NULL,

    reclas       char(1)           NOT NULL,

    manejo       char(1)           NOT NULL,

    idctacont    int4              NOT NULL,

    CONSTRAINT "PK58" PRIMARY KEY (iddetpol)

)

;







-- 

-- TABLE: p10salban 

--



CREATE TABLE p10salban(

    idsalban    int4              NOT NULL,

    fechop      date              NOT NULL,

    salini      numeric(13, 2)    NOT NULL,

    salfin      numeric(13, 2)    NOT NULL,

    importe     numeric(13, 2)    NOT NULL,

    movban      char(1)           NOT NULL,

    idctaban    int4              NOT NULL,

    idpoliza    int4              NOT NULL,

    tipsald     int4              NOT NULL,

    CONSTRAINT "PK61" PRIMARY KEY (idsalban)

)

;







-- 

-- TABLE: p11cheytra 

--



CREATE TABLE p11cheytra(

    idcheytra    int4              NOT NULL,

    importe      numeric(13, 2)    NOT NULL,

    fechpa       date,

    fecent       date,

    idpoliza     int4              NOT NULL,

    idbenefi     int4              NOT NULL,

    nivcanc      int4              NOT NULL,

    estatus      int4              NOT NULL,

    CONSTRAINT u142_250 PRIMARY KEY (idcheytra)

)

;







-- 

-- TABLE: p12ingres 

--



CREATE TABLE p12ingres(

    idingres    int4              NOT NULL,

    fechain     date              NOT NULL,

    concep      varchar(160)      NOT NULL,

    impefe      numeric(13, 3)    NOT NULL,

    impche      numeric(13, 2)    NOT NULL,

    estatus     int4              NOT NULL,

    idconrec    int4              NOT NULL,

    CONSTRAINT "PK67" PRIMARY KEY (idingres)

)

;







-- 

-- TABLE: p13deting 

--



CREATE TABLE p13deting(

    iddeting       int4              NOT NULL,

    s24p_consec    int2              NOT NULL,

    numpag         int4,

    consec         int4,

    import         numeric(13, 2)    NOT NULL,

    movcon         char(1)           NOT NULL,

    idingres       int4              NOT NULL,

    idctacont      int4              NOT NULL,

    CONSTRAINT u146_272 PRIMARY KEY (iddeting)

)

;







-- 

-- TABLE: p14ctanom 

--



CREATE TABLE p14ctanom(

    idctanom       int4              NOT NULL,

    fechop         date              NOT NULL,

    c25p_desnom    varchar(40)       NOT NULL,

    import         numeric(13, 2)    NOT NULL,

    numcre         varchar(20)       NOT NULL,

    quince         int2              NOT NULL,

    cveban         int4              NOT NULL,

    tipnom         int4              NOT NULL,

    estatus        int4              NOT NULL,

    idbenefi       int4              NOT NULL,

    CONSTRAINT "PK70" PRIMARY KEY (idctanom)

)

;







-- 

-- TABLE: p15detnom 

--



CREATE TABLE p15detnom(

    numren       int4              NOT NULL,

    idctanom     int4              NOT NULL,

    tipdoc       char(1)           NOT NULL,

    importe      numeric(13, 2)    NOT NULL,

    movcon       char(1)           NOT NULL,

    sufici       char(1)           NOT NULL,

    idctacont    int4              NOT NULL,

    CONSTRAINT u165_367 PRIMARY KEY (numren, idctanom)

)

;







-- 

-- TABLE: p16viatic 

--



CREATE TABLE p16viatic(

    idviatic    char(10)        NOT NULL,

    fechini     date            NOT NULL,

    fechfin     date            NOT NULL,

    lugar       varchar(250)    NOT NULL,

    motivo      varchar(250)    NOT NULL,

    dnoper      int2            NOT NULL,

    dsiper      int2            NOT NULL,

    idordpag    int4            NOT NULL,

    CONSTRAINT "PK75" PRIMARY KEY (idviatic)

)

;







-- 

-- TABLE: p17detvia 

--



CREATE TABLE p17detvia(

    iddetvia     int4             NOT NULL,

    importe      numeric(8, 2),

    idviatic     char(10)         NOT NULL,

    idpartida    int4             NOT NULL,

    iddatcamp    int4             NOT NULL,

    CONSTRAINT "PK76" PRIMARY KEY (iddetvia)

)

;







-- 

-- TABLE: p18auxfac 

--



CREATE TABLE p18auxfac(

    idauxfac    int2              NOT NULL,

    recibo      varchar(25)       NOT NULL,

    subtot      numeric(13, 2)    DEFAULT  0.00 NOT NULL,

    iva         numeric(13, 2)    DEFAULT  0.00 NOT NULL,

    impvar      numeric(13, 2)    DEFAULT  0.00 NOT NULL,

    reten       numeric(13, 2)    DEFAULT  0.00 NOT NULL,

    import      numeric(13, 2)    DEFAULT  0.00 NOT NULL,

    idbenefi    int4              NOT NULL,

    estatus     int4              NOT NULL,

    CONSTRAINT "PK79" PRIMARY KEY (idauxfac)

)

;







-- 

-- TABLE: p19relaci 

--



CREATE TABLE p19relaci(

    idrelaci    int4       NOT NULL,

    idordpag    int4       NOT NULL,

    activo      boolean    NOT NULL,

    fecrel      date       NOT NULL,

    CONSTRAINT "PK83" PRIMARY KEY (idrelaci, idordpag)

)

;







-- 

-- TABLE: p20relfin 

--



CREATE TABLE p20relfin(

    idrelfin    int4           NOT NULL,

    idordpag    int4           NOT NULL,

    folfin      varchar(25)    NOT NULL,

    activo      boolean        NOT NULL,

    fecrel      date           NOT NULL,

    CONSTRAINT "PK83_1" PRIMARY KEY (idrelfin, idordpag)

)

;







-- 

-- TABLE: p21retenc 

--



CREATE TABLE p21retenc(

    idauxfac     int2              NOT NULL,

    importe      numeric(13, 2),

    idctacont    int4              NOT NULL,

    CONSTRAINT "PK85" PRIMARY KEY (idauxfac)

)

;







-- 

-- TABLE: p22nomori 

--



CREATE TABLE p22nomori(

    banche    char(9)    NOT NULL,

    subpro    int2       NOT NULL,

    proyec    int2       NOT NULL,

    fuente    int4       NOT NULL,

    noquin    int2       NOT NULL,

    anioqu    int2,

    tipnom    int4       NOT NULL,

    CONSTRAINT u193_556 PRIMARY KEY (banche)

)

;







-- 

-- TABLE: p23detori 

--



CREATE TABLE p23detori(

    banche    char(9),

    tipmov    char(1)           NOT NULL,

    concep    varchar(5)        NOT NULL,

    import    numeric(13, 2)    NOT NULL

)

;







-- 

-- TABLE: p24tradeu 

--



CREATE TABLE p24tradeu(

    idtradeu     int2              NOT NULL,

    folio        varchar(25)       NOT NULL,

    fecrec       date              NOT NULL,

    numpag       int4              NOT NULL,

    consec       int4              NOT NULL,

    sector       int2              NOT NULL,

    depend       int2              NOT NULL,

    objeti       int2              NOT NULL,

    progra       int2              NOT NULL,

    subpro       int2              NOT NULL,

    proyec       int2              NOT NULL,

    activi       int2              NOT NULL,

    subact       int2              NOT NULL,

    origen       int4              NOT NULL,

    partid       int2              NOT NULL,

    anopre       int2              NOT NULL,

    mespre       int2              NOT NULL,

    import       numeric(13, 3)    NOT NULL,

    nconreant    int4,

    jusrec       varchar(1000),

    cvebep       int4              NOT NULL,

    tipbep       char(1)           NOT NULL,

    area         interval,

    nconre       int4              DEFAULT  0.0000000000000000 NOT NULL,

    CONSTRAINT u173_459 PRIMARY KEY (idtradeu)

)

;







-- 

-- TABLE: p25cuebal 

--



CREATE TABLE p25cuebal(

    idordpag    int4           NOT NULL,

    foliofin    varchar(25)    NOT NULL,

    CONSTRAINT "PK91" PRIMARY KEY (idordpag)

)

;







-- 

-- TABLE: p26relco 

--



CREATE TABLE p26relco(

    idrelco     int4            NOT NULL,

    fechrel     date            NOT NULL,

    obserb      varchar(100)    NOT NULL,

    foliofin    varchar(25)     NOT NULL,

    estatus     int4            NOT NULL,

    estatusf    int4            NOT NULL,

    CONSTRAINT "PK94" PRIMARY KEY (idrelco)

)

;







-- 

-- TABLE: p27detrel 

--



CREATE TABLE p27detrel(

    idrelco      int4    NOT NULL,

    idconrec     int4    NOT NULL,

    acuse        int4    NOT NULL,

    idcheytra    int4    NOT NULL,

    CONSTRAINT "PK95" PRIMARY KEY (idrelco, idconrec)

)

;







-- 

-- TABLE: p28presec 

--



CREATE TABLE p28presec(

    sector    int2              NOT NULL,

    depend    int2              NOT NULL,

    objeti    int2              NOT NULL,

    progra    int2              NOT NULL,

    subpro    int2              NOT NULL,

    proyec    int2              NOT NULL,

    deno      varchar(80),

    activi    int2              NOT NULL,

    subact    int2              NOT NULL,

    origen    int4              NOT NULL,

    partid    int2              NOT NULL,

    tot       decimal(16, 2)    DEFAULT  0.00 NOT NULL,

    ene       decimal(16, 2)    DEFAULT  0.00 NOT NULL,

    feb       decimal(16, 2)    DEFAULT  0.00 NOT NULL,

    mar       decimal(16, 2)    DEFAULT  0.00 NOT NULL,

    abr       decimal(16, 2)    DEFAULT  0.00 NOT NULL,

    may       decimal(16, 2)    DEFAULT  0.00 NOT NULL,

    jun       decimal(16, 2)    DEFAULT  0.00 NOT NULL,

    jul       decimal(16, 2)    DEFAULT  0.00 NOT NULL,

    ago       decimal(16, 2)    DEFAULT  0.00 NOT NULL,

    sep       decimal(16, 2)    DEFAULT  0.00 NOT NULL,

    oct       decimal(16, 2)    DEFAULT  0.00 NOT NULL,

    nov       decimal(16, 2)    DEFAULT  0.00 NOT NULL,

    dic       decimal(16, 2)    DEFAULT  0.00 NOT NULL

)

;







-- 

-- TABLE: rc01c28 

--



CREATE TABLE rc01c28(

    idclavepres    int4    NOT NULL,

    idseplaobra    int4    NOT NULL,

    CONSTRAINT "PK43" PRIMARY KEY (idclavepres)

)

;







-- 

-- TABLE: rc06c10 

--



CREATE TABLE rc06c10(

    idsector    int2    NOT NULL,

    iddepend    int2    NOT NULL,

    idobjeti    int2    NOT NULL,

    idprogra    int2    NOT NULL,

    idsubpro    int2    NOT NULL,

    idproyec    int2    NOT NULL,

    idfuente    int4    NOT NULL,

    CONSTRAINT "PK22" PRIMARY KEY (idsector, iddepend, idobjeti, idprogra, idsubpro, idproyec, idfuente)

)

;







-- 

-- TABLE: rc06c10c15 

--



CREATE TABLE rc06c10c15(

    idfuente    int4    NOT NULL,

    idsector    int2    NOT NULL,

    iddepend    int2    NOT NULL,

    idobjeti    int2    NOT NULL,

    idprogra    int2    NOT NULL,

    idsubpro    int2    NOT NULL,

    idproyec    int2    NOT NULL,

    idctaban    int4    NOT NULL,

    CONSTRAINT "PK86" PRIMARY KEY (idfuente, idsector, iddepend, idobjeti, idprogra, idsubpro, idproyec)

)

;







-- 

-- TABLE: rc12c15 

--



CREATE TABLE rc12c15(

    idctaban    int4            NOT NULL,

    idbenefi    int4            NOT NULL,

    descri      varchar(100),

    sucursal    varchar(6),

    ctaact      boolean         NOT NULL,

    edocta      int4            NOT NULL,

    CONSTRAINT "PK33" PRIMARY KEY (idctaban, idbenefi)

)

;







-- 

-- TABLE: rc15c16 

--



CREATE TABLE rc15c16(

    idctaban    int4    NOT NULL,

    tipofor     int2    NOT NULL,

    idmodali    int2    NOT NULL,

    CONSTRAINT "PK32" PRIMARY KEY (idctaban)

)

;







-- 

-- TABLE: rc24c15 

--



CREATE TABLE rc24c15(

    n0          int4    NOT NULL,

    idctaban    int4    NOT NULL,

    CONSTRAINT "PK66" PRIMARY KEY (n0)

)

;







-- 

-- TABLE: rc33p14 

--



CREATE TABLE rc33p14(

    iddetvia    int4    NOT NULL,

    idvehicu    int2    NOT NULL,

    CONSTRAINT "PK78" PRIMARY KEY (iddetvia)

)

;







-- 

-- TABLE: rp03p08 

--



CREATE TABLE rp03p08(

    iddetpol    int4    NOT NULL,

    idordpag    int4    NOT NULL,

    CONSTRAINT "PK60" PRIMARY KEY (iddetpol)

)

;







-- 

-- TABLE: rp06p07 

--



CREATE TABLE rp06p07(

    idctapag    int4    NOT NULL,

    idpoliza    int4    NOT NULL,

    CONSTRAINT "PK55" PRIMARY KEY (idctapag, idpoliza)

)

;







-- 

-- TABLE: rp06p08 

--



CREATE TABLE rp06p08(

    idctapag    int4    NOT NULL,

    iddetpol    int4    NOT NULL,

    CONSTRAINT "PK57" PRIMARY KEY (idctapag, iddetpol)

)

;







-- 

-- TABLE: rp07c07 

--



CREATE TABLE rp07c07(

    idcheytra    int4    NOT NULL,

    idctaban     int4    NOT NULL,

    CONSTRAINT "PK65" PRIMARY KEY (idcheytra)

)

;







-- 

-- TABLE: rp07p08 

--



CREATE TABLE rp07p08(

    idpoliza    int4    NOT NULL,

    iddetpol    int4    NOT NULL,

    CONSTRAINT "PK59" PRIMARY KEY (idpoliza, iddetpol)

)

;







-- 

-- TABLE: rp12p07 

--



CREATE TABLE rp12p07(

    idctanom    int4    NOT NULL,

    idpoliza    int4    NOT NULL,

    CONSTRAINT "PK71" PRIMARY KEY (idctanom)

)

;







-- 

-- TABLE: rp13p03 

--



CREATE TABLE rp13p03(

    numren      int4    NOT NULL,

    idctanom    int4    NOT NULL,

    idordpag    int4    NOT NULL,

    CONSTRAINT "PK73" PRIMARY KEY (numren, idctanom)

)

;







-- 

-- TABLE: rp16p03 

--



CREATE TABLE rp16p03(

    idauxfac    int2    NOT NULL,

    idordpag    int4    NOT NULL,

    CONSTRAINT "PK80" PRIMARY KEY (idauxfac, idordpag)

)

;







-- 

-- TABLE: rp16p05 

--



CREATE TABLE rp16p05(

    idauxfac    int2    NOT NULL,

    idconrec    int4    NOT NULL,

    CONSTRAINT "PK81" PRIMARY KEY (idauxfac)

)

;







-- 

-- INDEX: "Ref1210" 

--



CREATE INDEX "Ref1210" ON c01clavepres(idactivi, iddepend, idsubpro, idsubact, idobjeti, idproyec, idsector, idprogra)

;

-- 

-- INDEX: "Ref2011" 

--



CREATE INDEX "Ref2011" ON c01clavepres(idpartida)

;

-- 

-- INDEX: "Ref2114" 

--



CREATE INDEX "Ref2114" ON c01clavepres(idfuente)

;

-- 

-- INDEX: fk_sector 

--



CREATE INDEX fk_sector ON c02depend(idsector)

;

-- 

-- INDEX: fk_depend 

--



CREATE INDEX fk_depend ON c03objeti(iddepend, idsector)

;

-- 

-- INDEX: fk_objeti 

--



CREATE INDEX fk_objeti ON c04progra(idobjeti, idsector, iddepend)

;

-- 

-- INDEX: fk_progra 

--



CREATE INDEX fk_progra ON c05subpro(iddepend, idprogra, idobjeti, idsector)

;

-- 

-- INDEX: fk_subpro 

--



CREATE INDEX fk_subpro ON c06proyec(iddepend, idsubpro, idobjeti, idprogra, idsector)

;

-- 

-- INDEX: fk_proyec 

--



CREATE INDEX fk_proyec ON c07activi(iddepend, idsubpro, idsector, idobjeti, idproyec, idprogra)

;

-- 

-- INDEX: fk_activi 

--



CREATE INDEX fk_activi ON c08subact(idactivi, idsector, idobjeti, idprogra, idproyec, iddepend, idsubpro)

;

-- 

-- INDEX: "Ref2515" 

--



CREATE INDEX "Ref2515" ON c12benefi(iddireccion)

;

-- 

-- INDEX: "Ref2316" 

--



CREATE INDEX "Ref2316" ON c12benefi(idtipben)

;

-- 

-- INDEX: "Ref2617" 

--



CREATE INDEX "Ref2617" ON c15ctaban(idbanco)

;

-- 

-- INDEX: "Ref3120" 

--



CREATE INDEX "Ref3120" ON c17ctacont(activa)

;

-- 

-- INDEX: "Ref3121" 

--



CREATE INDEX "Ref3121" ON c17ctacont(natura)

;

-- 

-- INDEX: "Ref3122" 

--



CREATE INDEX "Ref3122" ON c17ctacont(nivel)

;

-- 

-- INDEX: "Ref3019" 

--



CREATE INDEX "Ref3019" ON c19datcamp(idnomcamp)

;

-- 

-- INDEX: "Ref2128" 

--



CREATE INDEX "Ref2128" ON c23connom(idfuente)

;

-- 

-- INDEX: "Ref2029" 

--



CREATE INDEX "Ref2029" ON c27parvia(idpartida)

;

-- 

-- INDEX: "Ref233" 

--



CREATE INDEX "Ref233" ON c29proyco(idclavepres)

;

-- 

-- INDEX: "Ref3734" 

--



CREATE INDEX "Ref3734" ON c31concepfin(idconnom)

;

-- 

-- INDEX: "Ref28120" 

--



CREATE INDEX "Ref28120" ON c34ctagto(idctaban)

;

-- 

-- INDEX: "Ref21" 

--



CREATE INDEX "Ref21" ON p01acumya(idclavepres)

;

-- 

-- INDEX: "Ref235" 

--



CREATE INDEX "Ref235" ON p02movpar(cvedest)

;

-- 

-- INDEX: "Ref236" 

--



CREATE INDEX "Ref236" ON p02movpar(cveori)

;

-- 

-- INDEX: "Ref3137" 

--



CREATE INDEX "Ref3137" ON p02movpar(estatus)

;

-- 

-- INDEX: "Ref238" 

--



CREATE INDEX "Ref238" ON p03ordpag(idclavepres)

;

-- 

-- INDEX: "Ref2439" 

--



CREATE INDEX "Ref2439" ON p03ordpag(idbenefi)

;

-- 

-- INDEX: "Ref2840" 

--



CREATE INDEX "Ref2840" ON p03ordpag(idctaban)

;

-- 

-- INDEX: "Ref3141" 

--



CREATE INDEX "Ref3141" ON p03ordpag(tipopago)

;

-- 

-- INDEX: "Ref3142" 

--



CREATE INDEX "Ref3142" ON p03ordpag(estatus)

;

-- 

-- INDEX: "Ref2943" 

--



CREATE INDEX "Ref2943" ON p045acucta(idctacont)

;

-- 

-- INDEX: "Ref50103" 

--



CREATE INDEX "Ref50103" ON p04detorp(idordpag)

;

-- 

-- INDEX: "Ref3144" 

--



CREATE INDEX "Ref3144" ON p06conrec(estatus)

;

-- 

-- INDEX: "Ref3145" 

--



CREATE INDEX "Ref3145" ON p06conrec(tipcon)

;

-- 

-- INDEX: "Ref3146" 

--



CREATE INDEX "Ref3146" ON p06conrec(tippag)

;

-- 

-- INDEX: "Ref2447" 

--



CREATE INDEX "Ref2447" ON p06conrec(idbenefi)

;

-- 

-- INDEX: "Ref2848" 

--



CREATE INDEX "Ref2848" ON p06conrec(idctaban)

;

-- 

-- INDEX: "Ref5256" 

--



CREATE INDEX "Ref5256" ON p07ctapag(idconrec)

;

-- 

-- INDEX: "Ref4757" 

--



CREATE INDEX "Ref4757" ON p07ctapag(idconcepfin)

;

-- 

-- INDEX: "Ref2858" 

--



CREATE INDEX "Ref2858" ON p07ctapag(idctaban)

;

-- 

-- INDEX: "Ref3159" 

--



CREATE INDEX "Ref3159" ON p07ctapag(estatus)

;

-- 

-- INDEX: "Ref5649" 

--



CREATE INDEX "Ref5649" ON p08poliza(polizref)

;

-- 

-- INDEX: "Ref3560" 

--



CREATE INDEX "Ref3560" ON p08poliza(idconpol)

;

-- 

-- INDEX: "Ref3461" 

--



CREATE INDEX "Ref3461" ON p08poliza(idtippol)

;

-- 

-- INDEX: "Ref3162" 

--



CREATE INDEX "Ref3162" ON p08poliza(estatus)

;

-- 

-- INDEX: "Ref2963" 

--



CREATE INDEX "Ref2963" ON p09detpol(idctacont)

;

-- 

-- INDEX: "Ref2866" 

--



CREATE INDEX "Ref2866" ON p10salban(idctaban)

;

-- 

-- INDEX: "Ref5667" 

--



CREATE INDEX "Ref5667" ON p10salban(idpoliza)

;

-- 

-- INDEX: "Ref3177" 

--



CREATE INDEX "Ref3177" ON p10salban(tipsald)

;

-- 

-- INDEX: "Ref5668" 

--



CREATE INDEX "Ref5668" ON p11cheytra(idpoliza)

;

-- 

-- INDEX: "Ref2470" 

--



CREATE INDEX "Ref2470" ON p11cheytra(idbenefi)

;

-- 

-- INDEX: "Ref3173" 

--



CREATE INDEX "Ref3173" ON p11cheytra(nivcanc)

;

-- 

-- INDEX: "Ref3174" 

--



CREATE INDEX "Ref3174" ON p11cheytra(estatus)

;

-- 

-- INDEX: "Ref3178" 

--



CREATE INDEX "Ref3178" ON p12ingres(estatus)

;

-- 

-- INDEX: "Ref5279" 

--



CREATE INDEX "Ref5279" ON p12ingres(idconrec)

;

-- 

-- INDEX: "Ref6780" 

--



CREATE INDEX "Ref6780" ON p13deting(idingres)

;

-- 

-- INDEX: "Ref2981" 

--



CREATE INDEX "Ref2981" ON p13deting(idctacont)

;

-- 

-- INDEX: "Ref3184" 

--



CREATE INDEX "Ref3184" ON p14ctanom(tipnom)

;

-- 

-- INDEX: "Ref3185" 

--



CREATE INDEX "Ref3185" ON p14ctanom(estatus)

;

-- 

-- INDEX: "Ref2486" 

--



CREATE INDEX "Ref2486" ON p14ctanom(idbenefi)

;

-- 

-- INDEX: "Ref7087" 

--



CREATE INDEX "Ref7087" ON p15detnom(idctanom)

;

-- 

-- INDEX: "Ref2991" 

--



CREATE INDEX "Ref2991" ON p15detnom(idctacont)

;

-- 

-- INDEX: "Ref5092" 

--



CREATE INDEX "Ref5092" ON p16viatic(idordpag)

;

-- 

-- INDEX: "Ref7594" 

--



CREATE INDEX "Ref7594" ON p17detvia(idviatic)

;

-- 

-- INDEX: "Ref2095" 

--



CREATE INDEX "Ref2095" ON p17detvia(idpartida)

;

-- 

-- INDEX: "Ref3196" 

--



CREATE INDEX "Ref3196" ON p17detvia(iddatcamp)

;

-- 

-- INDEX: "Ref24104" 

--



CREATE INDEX "Ref24104" ON p18auxfac(idbenefi)

;

-- 

-- INDEX: "Ref31109" 

--



CREATE INDEX "Ref31109" ON p18auxfac(estatus)

;

-- 

-- INDEX: "Ref50106" 

--



CREATE INDEX "Ref50106" ON p19relaci(idordpag)

;

-- 

-- INDEX: "Ref50107" 

--



CREATE INDEX "Ref50107" ON p20relfin(idordpag)

;

-- 

-- INDEX: "Ref79110" 

--



CREATE INDEX "Ref79110" ON p21retenc(idauxfac)

;

-- 

-- INDEX: "Ref29112" 

--



CREATE INDEX "Ref29112" ON p21retenc(idctacont)

;

-- 

-- INDEX: "Ref31122" 

--



CREATE INDEX "Ref31122" ON p22nomori(tipnom)

;

-- 

-- INDEX: r_2 

--



CREATE INDEX r_2 ON p23detori(banche)

;

-- 

-- INDEX: "Ref50123" 

--



CREATE INDEX "Ref50123" ON p25cuebal(idordpag)

;

-- 

-- INDEX: "Ref31124" 

--



CREATE INDEX "Ref31124" ON p26relco(estatus)

;

-- 

-- INDEX: "Ref31125" 

--



CREATE INDEX "Ref31125" ON p26relco(estatusf)

;

-- 

-- INDEX: "Ref94126" 

--



CREATE INDEX "Ref94126" ON p27detrel(idrelco)

;

-- 

-- INDEX: "Ref52127" 

--



CREATE INDEX "Ref52127" ON p27detrel(idconrec)

;

-- 

-- INDEX: "Ref64128" 

--



CREATE INDEX "Ref64128" ON p27detrel(idcheytra)

;

-- 

-- INDEX: "Ref230" 

--



CREATE INDEX "Ref230" ON rc01c28(idclavepres)

;

-- 

-- INDEX: "Ref4231" 

--



CREATE INDEX "Ref4231" ON rc01c28(idseplaobra)

;

-- 

-- INDEX: "Ref1912" 

--



CREATE INDEX "Ref1912" ON rc06c10(idproyec, idsector, idprogra, iddepend, idsubpro, idobjeti)

;

-- 

-- INDEX: "Ref2113" 

--



CREATE INDEX "Ref2113" ON rc06c10(idfuente)

;

-- 

-- INDEX: "Ref21113" 

--



CREATE INDEX "Ref21113" ON rc06c10c15(idfuente)

;

-- 

-- INDEX: "Ref19114" 

--



CREATE INDEX "Ref19114" ON rc06c10c15(iddepend, idsubpro, idobjeti, idproyec, idsector, idprogra)

;

-- 

-- INDEX: "Ref28115" 

--



CREATE INDEX "Ref28115" ON rc06c10c15(idctaban)

;

-- 

-- INDEX: "Ref2823" 

--



CREATE INDEX "Ref2823" ON rc12c15(idctaban)

;

-- 

-- INDEX: "Ref2424" 

--



CREATE INDEX "Ref2424" ON rc12c15(idbenefi)

;

-- 

-- INDEX: "Ref3125" 

--



CREATE INDEX "Ref3125" ON rc12c15(edocta)

;

-- 

-- INDEX: "Ref2826" 

--



CREATE INDEX "Ref2826" ON rc15c16(idctaban)

;

-- 

-- INDEX: "Ref2727" 

--



CREATE INDEX "Ref2727" ON rc15c16(idmodali)

;

-- 

-- INDEX: "Ref3875" 

--



CREATE INDEX "Ref3875" ON rc24c15(n0)

;

-- 

-- INDEX: "Ref2876" 

--



CREATE INDEX "Ref2876" ON rc24c15(idctaban)

;

-- 

-- INDEX: "Ref7697" 

--



CREATE INDEX "Ref7697" ON rc33p14(iddetvia)

;

-- 

-- INDEX: "Ref7798" 

--



CREATE INDEX "Ref7798" ON rc33p14(idvehicu)

;

-- 

-- INDEX: "Ref5864" 

--



CREATE INDEX "Ref5864" ON rp03p08(iddetpol)

;

-- 

-- INDEX: "Ref5065" 

--



CREATE INDEX "Ref5065" ON rp03p08(idordpag)

;

-- 

-- INDEX: "Ref5450" 

--



CREATE INDEX "Ref5450" ON rp06p07(idctapag)

;

-- 

-- INDEX: "Ref5651" 

--



CREATE INDEX "Ref5651" ON rp06p07(idpoliza)

;

-- 

-- INDEX: "Ref5452" 

--



CREATE INDEX "Ref5452" ON rp06p08(idctapag)

;

-- 

-- INDEX: "Ref5853" 

--



CREATE INDEX "Ref5853" ON rp06p08(iddetpol)

;

-- 

-- INDEX: "Ref6471" 

--



CREATE INDEX "Ref6471" ON rp07c07(idcheytra)

;

-- 

-- INDEX: "Ref2872" 

--



CREATE INDEX "Ref2872" ON rp07c07(idctaban)

;

-- 

-- INDEX: "Ref5654" 

--



CREATE INDEX "Ref5654" ON rp07p08(idpoliza)

;

-- 

-- INDEX: "Ref5855" 

--



CREATE INDEX "Ref5855" ON rp07p08(iddetpol)

;

-- 

-- INDEX: "Ref7082" 

--



CREATE INDEX "Ref7082" ON rp12p07(idctanom)

;

-- 

-- INDEX: "Ref5683" 

--



CREATE INDEX "Ref5683" ON rp12p07(idpoliza)

;

-- 

-- INDEX: "Ref7289" 

--



CREATE INDEX "Ref7289" ON rp13p03(numren, idctanom)

;

-- 

-- INDEX: "Ref5090" 

--



CREATE INDEX "Ref5090" ON rp13p03(idordpag)

;

-- 

-- INDEX: "Ref7999" 

--



CREATE INDEX "Ref7999" ON rp16p03(idauxfac)

;

-- 

-- INDEX: "Ref50100" 

--



CREATE INDEX "Ref50100" ON rp16p03(idordpag)

;

-- 

-- INDEX: "Ref79101" 

--



CREATE INDEX "Ref79101" ON rp16p05(idauxfac)

;

-- 

-- INDEX: "Ref52102" 

--



CREATE INDEX "Ref52102" ON rp16p05(idconrec)

;

-- 

-- TABLE: c01clavepres 

--



ALTER TABLE c01clavepres ADD CONSTRAINT "Refc08subact10" 

    FOREIGN KEY (idsector, iddepend, idobjeti, idprogra, idsubpro, idproyec, idactivi, idsubact)

    REFERENCES c08subact(idsector, iddepend, idobjeti, idprogra, idsubpro, idproyec, idactivi, idsubact)

;



ALTER TABLE c01clavepres ADD CONSTRAINT "Refc09partida11" 

    FOREIGN KEY (idpartida)

    REFERENCES c09partida(idpartida)

;



ALTER TABLE c01clavepres ADD CONSTRAINT "Refc10fuente14" 

    FOREIGN KEY (idfuente)

    REFERENCES c10fuente(idfuente)

;





-- 

-- TABLE: c02depend 

--



ALTER TABLE c02depend ADD CONSTRAINT fk_sector 

    FOREIGN KEY (idsector)

    REFERENCES c01sector(idsector)

;





-- 

-- TABLE: c03objeti 

--



ALTER TABLE c03objeti ADD CONSTRAINT fk_depend 

    FOREIGN KEY (idsector, iddepend)

    REFERENCES c02depend(idsector, iddepend)

;





-- 

-- TABLE: c04progra 

--



ALTER TABLE c04progra ADD CONSTRAINT fk_objeti 

    FOREIGN KEY (idsector, iddepend, idobjeti)

    REFERENCES c03objeti(idsector, iddepend, idobjeti)

;





-- 

-- TABLE: c05subpro 

--



ALTER TABLE c05subpro ADD CONSTRAINT fk_progra 

    FOREIGN KEY (idsector, iddepend, idobjeti, idprogra)

    REFERENCES c04progra(idsector, iddepend, idobjeti, idprogra)

;





-- 

-- TABLE: c06proyec 

--



ALTER TABLE c06proyec ADD CONSTRAINT fk_subpro 

    FOREIGN KEY (idsector, iddepend, idobjeti, idprogra, idsubpro)

    REFERENCES c05subpro(idsector, iddepend, idobjeti, idprogra, idsubpro)

;





-- 

-- TABLE: c07activi 

--



ALTER TABLE c07activi ADD CONSTRAINT fk_proyec 

    FOREIGN KEY (idsector, iddepend, idobjeti, idprogra, idsubpro, idproyec)

    REFERENCES c06proyec(idsector, iddepend, idobjeti, idprogra, idsubpro, idproyec)

;





-- 

-- TABLE: c08subact 

--



ALTER TABLE c08subact ADD CONSTRAINT fk_activi 

    FOREIGN KEY (idsector, iddepend, idobjeti, idprogra, idsubpro, idproyec, idactivi)

    REFERENCES c07activi(idsector, iddepend, idobjeti, idprogra, idsubpro, idproyec, idactivi)

;





-- 

-- TABLE: c12benefi 

--



ALTER TABLE c12benefi ADD CONSTRAINT "Refc13direccion15" 

    FOREIGN KEY (iddireccion)

    REFERENCES c13direccion(iddireccion)

;



ALTER TABLE c12benefi ADD CONSTRAINT "Refc11tipben16" 

    FOREIGN KEY (idtipben)

    REFERENCES c11tipben(idtipben)

;





-- 

-- TABLE: c15ctaban 

--



ALTER TABLE c15ctaban ADD CONSTRAINT "Refc14banco17" 

    FOREIGN KEY (idbanco)

    REFERENCES c14banco(idbanco)

;





-- 

-- TABLE: c17ctacont 

--



ALTER TABLE c17ctacont ADD CONSTRAINT "Refc19datcamp20" 

    FOREIGN KEY (activa)

    REFERENCES c19datcamp(iddatcamp)

;



ALTER TABLE c17ctacont ADD CONSTRAINT "Refc19datcamp21" 

    FOREIGN KEY (natura)

    REFERENCES c19datcamp(iddatcamp)

;



ALTER TABLE c17ctacont ADD CONSTRAINT "Refc19datcamp22" 

    FOREIGN KEY (nivel)

    REFERENCES c19datcamp(iddatcamp)

;





-- 

-- TABLE: c19datcamp 

--



ALTER TABLE c19datcamp ADD CONSTRAINT "Refc18nomcamp19" 

    FOREIGN KEY (idnomcamp)

    REFERENCES c18nomcamp(idnomcamp)

;





-- 

-- TABLE: c23connom 

--



ALTER TABLE c23connom ADD CONSTRAINT "Refc10fuente28" 

    FOREIGN KEY (idfuente)

    REFERENCES c10fuente(idfuente)

;





-- 

-- TABLE: c27parvia 

--



ALTER TABLE c27parvia ADD CONSTRAINT "Refc09partida29" 

    FOREIGN KEY (idpartida)

    REFERENCES c09partida(idpartida)

;





-- 

-- TABLE: c29proyco 

--



ALTER TABLE c29proyco ADD CONSTRAINT "Refc01clavepres33" 

    FOREIGN KEY (idclavepres)

    REFERENCES c01clavepres(idclavepres)

;





-- 

-- TABLE: c31concepfin 

--



ALTER TABLE c31concepfin ADD CONSTRAINT "Refc23connom34" 

    FOREIGN KEY (idconnom)

    REFERENCES c23connom(idconnom)

;





-- 

-- TABLE: c34ctagto 

--



ALTER TABLE c34ctagto ADD CONSTRAINT "Refc15ctaban120" 

    FOREIGN KEY (idctaban)

    REFERENCES c15ctaban(idctaban)

;





-- 

-- TABLE: p01acumya 

--



ALTER TABLE p01acumya ADD CONSTRAINT "Refc01clavepres1" 

    FOREIGN KEY (idclavepres)

    REFERENCES c01clavepres(idclavepres)

;





-- 

-- TABLE: p02movpar 

--



ALTER TABLE p02movpar ADD CONSTRAINT "Refc01clavepres35" 

    FOREIGN KEY (cvedest)

    REFERENCES c01clavepres(idclavepres)

;



ALTER TABLE p02movpar ADD CONSTRAINT "Refc01clavepres36" 

    FOREIGN KEY (cveori)

    REFERENCES c01clavepres(idclavepres)

;



ALTER TABLE p02movpar ADD CONSTRAINT "Refc19datcamp37" 

    FOREIGN KEY (estatus)

    REFERENCES c19datcamp(iddatcamp)

;





-- 

-- TABLE: p03ordpag 

--



ALTER TABLE p03ordpag ADD CONSTRAINT "Refc01clavepres38" 

    FOREIGN KEY (idclavepres)

    REFERENCES c01clavepres(idclavepres)

;



ALTER TABLE p03ordpag ADD CONSTRAINT "Refc12benefi39" 

    FOREIGN KEY (idbenefi)

    REFERENCES c12benefi(idbenefi)

;



ALTER TABLE p03ordpag ADD CONSTRAINT "Refc15ctaban40" 

    FOREIGN KEY (idctaban)

    REFERENCES c15ctaban(idctaban)

;



ALTER TABLE p03ordpag ADD CONSTRAINT "Refc19datcamp41" 

    FOREIGN KEY (tipopago)

    REFERENCES c19datcamp(iddatcamp)

;



ALTER TABLE p03ordpag ADD CONSTRAINT "Refc19datcamp42" 

    FOREIGN KEY (estatus)

    REFERENCES c19datcamp(iddatcamp)

;





-- 

-- TABLE: p045acucta 

--



ALTER TABLE p045acucta ADD CONSTRAINT "Refc17ctacont43" 

    FOREIGN KEY (idctacont)

    REFERENCES c17ctacont(idctacont)

;





-- 

-- TABLE: p04detorp 

--



ALTER TABLE p04detorp ADD CONSTRAINT "Refp03ordpag103" 

    FOREIGN KEY (idordpag)

    REFERENCES p03ordpag(idordpag)

;





-- 

-- TABLE: p06conrec 

--



ALTER TABLE p06conrec ADD CONSTRAINT "Refc19datcamp44" 

    FOREIGN KEY (estatus)

    REFERENCES c19datcamp(iddatcamp)

;



ALTER TABLE p06conrec ADD CONSTRAINT "Refc19datcamp45" 

    FOREIGN KEY (tipcon)

    REFERENCES c19datcamp(iddatcamp)

;



ALTER TABLE p06conrec ADD CONSTRAINT "Refc19datcamp46" 

    FOREIGN KEY (tippag)

    REFERENCES c19datcamp(iddatcamp)

;



ALTER TABLE p06conrec ADD CONSTRAINT "Refc12benefi47" 

    FOREIGN KEY (idbenefi)

    REFERENCES c12benefi(idbenefi)

;



ALTER TABLE p06conrec ADD CONSTRAINT "Refc15ctaban48" 

    FOREIGN KEY (idctaban)

    REFERENCES c15ctaban(idctaban)

;





-- 

-- TABLE: p07ctapag 

--



ALTER TABLE p07ctapag ADD CONSTRAINT "Refp06conrec56" 

    FOREIGN KEY (idconrec)

    REFERENCES p06conrec(idconrec)

;



ALTER TABLE p07ctapag ADD CONSTRAINT "Refc31concepfin57" 

    FOREIGN KEY (idconcepfin)

    REFERENCES c31concepfin(idconcepfin)

;



ALTER TABLE p07ctapag ADD CONSTRAINT "Refc15ctaban58" 

    FOREIGN KEY (idctaban)

    REFERENCES c15ctaban(idctaban)

;



ALTER TABLE p07ctapag ADD CONSTRAINT "Refc19datcamp59" 

    FOREIGN KEY (estatus)

    REFERENCES c19datcamp(iddatcamp)

;





-- 

-- TABLE: p08poliza 

--



ALTER TABLE p08poliza ADD CONSTRAINT "Refp08poliza49" 

    FOREIGN KEY (polizref)

    REFERENCES p08poliza(idpoliza)

;



ALTER TABLE p08poliza ADD CONSTRAINT "Refc21conpol60" 

    FOREIGN KEY (idconpol)

    REFERENCES c21conpol(idconpol)

;



ALTER TABLE p08poliza ADD CONSTRAINT "Refc20tippol61" 

    FOREIGN KEY (idtippol)

    REFERENCES c20tippol(idtippol)

;



ALTER TABLE p08poliza ADD CONSTRAINT "Refc19datcamp62" 

    FOREIGN KEY (estatus)

    REFERENCES c19datcamp(iddatcamp)

;





-- 

-- TABLE: p09detpol 

--



ALTER TABLE p09detpol ADD CONSTRAINT "Refc17ctacont63" 

    FOREIGN KEY (idctacont)

    REFERENCES c17ctacont(idctacont)

;





-- 

-- TABLE: p10salban 

--



ALTER TABLE p10salban ADD CONSTRAINT "Refc15ctaban66" 

    FOREIGN KEY (idctaban)

    REFERENCES c15ctaban(idctaban)

;



ALTER TABLE p10salban ADD CONSTRAINT "Refp08poliza67" 

    FOREIGN KEY (idpoliza)

    REFERENCES p08poliza(idpoliza)

;



ALTER TABLE p10salban ADD CONSTRAINT "Refc19datcamp77" 

    FOREIGN KEY (tipsald)

    REFERENCES c19datcamp(iddatcamp)

;





-- 

-- TABLE: p11cheytra 

--



ALTER TABLE p11cheytra ADD CONSTRAINT "Refp08poliza68" 

    FOREIGN KEY (idpoliza)

    REFERENCES p08poliza(idpoliza)

;



ALTER TABLE p11cheytra ADD CONSTRAINT "Refc12benefi70" 

    FOREIGN KEY (idbenefi)

    REFERENCES c12benefi(idbenefi)

;



ALTER TABLE p11cheytra ADD CONSTRAINT "Refc19datcamp73" 

    FOREIGN KEY (nivcanc)

    REFERENCES c19datcamp(iddatcamp)

;



ALTER TABLE p11cheytra ADD CONSTRAINT "Refc19datcamp74" 

    FOREIGN KEY (estatus)

    REFERENCES c19datcamp(iddatcamp)

;





-- 

-- TABLE: p12ingres 

--



ALTER TABLE p12ingres ADD CONSTRAINT "Refc19datcamp78" 

    FOREIGN KEY (estatus)

    REFERENCES c19datcamp(iddatcamp)

;



ALTER TABLE p12ingres ADD CONSTRAINT "Refp06conrec79" 

    FOREIGN KEY (idconrec)

    REFERENCES p06conrec(idconrec)

;





-- 

-- TABLE: p13deting 

--



ALTER TABLE p13deting ADD CONSTRAINT "Refp12ingres80" 

    FOREIGN KEY (idingres)

    REFERENCES p12ingres(idingres)

;



ALTER TABLE p13deting ADD CONSTRAINT "Refc17ctacont81" 

    FOREIGN KEY (idctacont)

    REFERENCES c17ctacont(idctacont)

;





-- 

-- TABLE: p14ctanom 

--



ALTER TABLE p14ctanom ADD CONSTRAINT "Refc19datcamp84" 

    FOREIGN KEY (tipnom)

    REFERENCES c19datcamp(iddatcamp)

;



ALTER TABLE p14ctanom ADD CONSTRAINT "Refc19datcamp85" 

    FOREIGN KEY (estatus)

    REFERENCES c19datcamp(iddatcamp)

;



ALTER TABLE p14ctanom ADD CONSTRAINT "Refc12benefi86" 

    FOREIGN KEY (idbenefi)

    REFERENCES c12benefi(idbenefi)

;





-- 

-- TABLE: p15detnom 

--



ALTER TABLE p15detnom ADD CONSTRAINT "Refp14ctanom87" 

    FOREIGN KEY (idctanom)

    REFERENCES p14ctanom(idctanom)

;



ALTER TABLE p15detnom ADD CONSTRAINT "Refc17ctacont91" 

    FOREIGN KEY (idctacont)

    REFERENCES c17ctacont(idctacont)

;





-- 

-- TABLE: p16viatic 

--



ALTER TABLE p16viatic ADD CONSTRAINT "Refp03ordpag92" 

    FOREIGN KEY (idordpag)

    REFERENCES p03ordpag(idordpag)

;





-- 

-- TABLE: p17detvia 

--



ALTER TABLE p17detvia ADD CONSTRAINT "Refp16viatic94" 

    FOREIGN KEY (idviatic)

    REFERENCES p16viatic(idviatic)

;



ALTER TABLE p17detvia ADD CONSTRAINT "Refc09partida95" 

    FOREIGN KEY (idpartida)

    REFERENCES c09partida(idpartida)

;



ALTER TABLE p17detvia ADD CONSTRAINT "Refc19datcamp96" 

    FOREIGN KEY (iddatcamp)

    REFERENCES c19datcamp(iddatcamp)

;





-- 

-- TABLE: p18auxfac 

--



ALTER TABLE p18auxfac ADD CONSTRAINT "Refc12benefi104" 

    FOREIGN KEY (idbenefi)

    REFERENCES c12benefi(idbenefi)

;



ALTER TABLE p18auxfac ADD CONSTRAINT "Refc19datcamp109" 

    FOREIGN KEY (estatus)

    REFERENCES c19datcamp(iddatcamp)

;





-- 

-- TABLE: p19relaci 

--



ALTER TABLE p19relaci ADD CONSTRAINT "Refp03ordpag106" 

    FOREIGN KEY (idordpag)

    REFERENCES p03ordpag(idordpag)

;





-- 

-- TABLE: p20relfin 

--



ALTER TABLE p20relfin ADD CONSTRAINT "Refp03ordpag107" 

    FOREIGN KEY (idordpag)

    REFERENCES p03ordpag(idordpag)

;





-- 

-- TABLE: p21retenc 

--



ALTER TABLE p21retenc ADD CONSTRAINT "Refp18auxfac110" 

    FOREIGN KEY (idauxfac)

    REFERENCES p18auxfac(idauxfac)

;



ALTER TABLE p21retenc ADD CONSTRAINT "Refc17ctacont112" 

    FOREIGN KEY (idctacont)

    REFERENCES c17ctacont(idctacont)

;





-- 

-- TABLE: p22nomori 

--



ALTER TABLE p22nomori ADD CONSTRAINT "Refc19datcamp122" 

    FOREIGN KEY (tipnom)

    REFERENCES c19datcamp(iddatcamp)

;





-- 

-- TABLE: p23detori 

--



ALTER TABLE p23detori ADD CONSTRAINT r_2 

    FOREIGN KEY (banche)

    REFERENCES p22nomori(banche)

;





-- 

-- TABLE: p25cuebal 

--



ALTER TABLE p25cuebal ADD CONSTRAINT "Refp03ordpag123" 

    FOREIGN KEY (idordpag)

    REFERENCES p03ordpag(idordpag)

;





-- 

-- TABLE: p26relco 

--



ALTER TABLE p26relco ADD CONSTRAINT "Refc19datcamp124" 

    FOREIGN KEY (estatus)

    REFERENCES c19datcamp(iddatcamp)

;



ALTER TABLE p26relco ADD CONSTRAINT "Refc19datcamp125" 

    FOREIGN KEY (estatusf)

    REFERENCES c19datcamp(iddatcamp)

;





-- 

-- TABLE: p27detrel 

--



ALTER TABLE p27detrel ADD CONSTRAINT "Refp26relco126" 

    FOREIGN KEY (idrelco)

    REFERENCES p26relco(idrelco)

;



ALTER TABLE p27detrel ADD CONSTRAINT "Refp06conrec127" 

    FOREIGN KEY (idconrec)

    REFERENCES p06conrec(idconrec)

;



ALTER TABLE p27detrel ADD CONSTRAINT "Refp11cheytra128" 

    FOREIGN KEY (idcheytra)

    REFERENCES p11cheytra(idcheytra)

;





-- 

-- TABLE: rc01c28 

--



ALTER TABLE rc01c28 ADD CONSTRAINT "Refc01clavepres30" 

    FOREIGN KEY (idclavepres)

    REFERENCES c01clavepres(idclavepres)

;



ALTER TABLE rc01c28 ADD CONSTRAINT "Refc28seplaobra31" 

    FOREIGN KEY (idseplaobra)

    REFERENCES c28seplaobra(idseplaobra)

;





-- 

-- TABLE: rc06c10 

--



ALTER TABLE rc06c10 ADD CONSTRAINT "Refc06proyec12" 

    FOREIGN KEY (idsector, iddepend, idobjeti, idprogra, idsubpro, idproyec)

    REFERENCES c06proyec(idsector, iddepend, idobjeti, idprogra, idsubpro, idproyec)

;



ALTER TABLE rc06c10 ADD CONSTRAINT "Refc10fuente13" 

    FOREIGN KEY (idfuente)

    REFERENCES c10fuente(idfuente)

;





-- 

-- TABLE: rc06c10c15 

--



ALTER TABLE rc06c10c15 ADD CONSTRAINT "Refc10fuente113" 

    FOREIGN KEY (idfuente)

    REFERENCES c10fuente(idfuente)

;



ALTER TABLE rc06c10c15 ADD CONSTRAINT "Refc06proyec114" 

    FOREIGN KEY (idsector, iddepend, idobjeti, idprogra, idsubpro, idproyec)

    REFERENCES c06proyec(idsector, iddepend, idobjeti, idprogra, idsubpro, idproyec)

;



ALTER TABLE rc06c10c15 ADD CONSTRAINT "Refc15ctaban115" 

    FOREIGN KEY (idctaban)

    REFERENCES c15ctaban(idctaban)

;





-- 

-- TABLE: rc12c15 

--



ALTER TABLE rc12c15 ADD CONSTRAINT "Refc15ctaban23" 

    FOREIGN KEY (idctaban)

    REFERENCES c15ctaban(idctaban)

;



ALTER TABLE rc12c15 ADD CONSTRAINT "Refc12benefi24" 

    FOREIGN KEY (idbenefi)

    REFERENCES c12benefi(idbenefi)

;



ALTER TABLE rc12c15 ADD CONSTRAINT "Refc19datcamp25" 

    FOREIGN KEY (edocta)

    REFERENCES c19datcamp(iddatcamp)

;





-- 

-- TABLE: rc15c16 

--



ALTER TABLE rc15c16 ADD CONSTRAINT "Refc15ctaban26" 

    FOREIGN KEY (idctaban)

    REFERENCES c15ctaban(idctaban)

;



ALTER TABLE rc15c16 ADD CONSTRAINT "Refc16modali27" 

    FOREIGN KEY (idmodali)

    REFERENCES c16modali(idmodali)

;





-- 

-- TABLE: rc24c15 

--



ALTER TABLE rc24c15 ADD CONSTRAINT "Refc24mayor75" 

    FOREIGN KEY (n0)

    REFERENCES c24mayor(n0)

;



ALTER TABLE rc24c15 ADD CONSTRAINT "Refc15ctaban76" 

    FOREIGN KEY (idctaban)

    REFERENCES c15ctaban(idctaban)

;





-- 

-- TABLE: rc33p14 

--



ALTER TABLE rc33p14 ADD CONSTRAINT "Refp17detvia97" 

    FOREIGN KEY (iddetvia)

    REFERENCES p17detvia(iddetvia)

;



ALTER TABLE rc33p14 ADD CONSTRAINT "Refc33vehicu98" 

    FOREIGN KEY (idvehicu)

    REFERENCES c33vehicu(idvehicu)

;





-- 

-- TABLE: rp03p08 

--



ALTER TABLE rp03p08 ADD CONSTRAINT "Refp09detpol64" 

    FOREIGN KEY (iddetpol)

    REFERENCES p09detpol(iddetpol)

;



ALTER TABLE rp03p08 ADD CONSTRAINT "Refp03ordpag65" 

    FOREIGN KEY (idordpag)

    REFERENCES p03ordpag(idordpag)

;





-- 

-- TABLE: rp06p07 

--



ALTER TABLE rp06p07 ADD CONSTRAINT "Refp07ctapag50" 

    FOREIGN KEY (idctapag)

    REFERENCES p07ctapag(idctapag)

;



ALTER TABLE rp06p07 ADD CONSTRAINT "Refp08poliza51" 

    FOREIGN KEY (idpoliza)

    REFERENCES p08poliza(idpoliza)

;





-- 

-- TABLE: rp06p08 

--



ALTER TABLE rp06p08 ADD CONSTRAINT "Refp07ctapag52" 

    FOREIGN KEY (idctapag)

    REFERENCES p07ctapag(idctapag)

;



ALTER TABLE rp06p08 ADD CONSTRAINT "Refp09detpol53" 

    FOREIGN KEY (iddetpol)

    REFERENCES p09detpol(iddetpol)

;





-- 

-- TABLE: rp07c07 

--



ALTER TABLE rp07c07 ADD CONSTRAINT "Refp11cheytra71" 

    FOREIGN KEY (idcheytra)

    REFERENCES p11cheytra(idcheytra)

;



ALTER TABLE rp07c07 ADD CONSTRAINT "Refc15ctaban72" 

    FOREIGN KEY (idctaban)

    REFERENCES c15ctaban(idctaban)

;





-- 

-- TABLE: rp07p08 

--



ALTER TABLE rp07p08 ADD CONSTRAINT "Refp08poliza54" 

    FOREIGN KEY (idpoliza)

    REFERENCES p08poliza(idpoliza)

;



ALTER TABLE rp07p08 ADD CONSTRAINT "Refp09detpol55" 

    FOREIGN KEY (iddetpol)

    REFERENCES p09detpol(iddetpol)

;





-- 

-- TABLE: rp12p07 

--



ALTER TABLE rp12p07 ADD CONSTRAINT "Refp14ctanom82" 

    FOREIGN KEY (idctanom)

    REFERENCES p14ctanom(idctanom)

;



ALTER TABLE rp12p07 ADD CONSTRAINT "Refp08poliza83" 

    FOREIGN KEY (idpoliza)

    REFERENCES p08poliza(idpoliza)

;





-- 

-- TABLE: rp13p03 

--



ALTER TABLE rp13p03 ADD CONSTRAINT "Refp15detnom89" 

    FOREIGN KEY (numren, idctanom)

    REFERENCES p15detnom(numren, idctanom)

;



ALTER TABLE rp13p03 ADD CONSTRAINT "Refp03ordpag90" 

    FOREIGN KEY (idordpag)

    REFERENCES p03ordpag(idordpag)

;





-- 

-- TABLE: rp16p03 

--



ALTER TABLE rp16p03 ADD CONSTRAINT "Refp18auxfac99" 

    FOREIGN KEY (idauxfac)

    REFERENCES p18auxfac(idauxfac)

;



ALTER TABLE rp16p03 ADD CONSTRAINT "Refp03ordpag100" 

    FOREIGN KEY (idordpag)

    REFERENCES p03ordpag(idordpag)

;





-- 

-- TABLE: rp16p05 

--



ALTER TABLE rp16p05 ADD CONSTRAINT "Refp18auxfac101" 

    FOREIGN KEY (idauxfac)

    REFERENCES p18auxfac(idauxfac)

;



ALTER TABLE rp16p05 ADD CONSTRAINT "Refp06conrec102" 

    FOREIGN KEY (idconrec)

    REFERENCES p06conrec(idconrec)

;





