/*==============================================================*/ /* Database name: Database */ /* DBMS name: ORACLE Version 10g */ /* Created on: 09/02/2010 19:20:20 PM */ /*==============================================================*/ -- SQL script that update fitBank squema -- To run this script from the SQL Plus, perform the following steps: -- 1. connect to the database -- 2. set define character to ! -- "set define !" -- 3. issue the command "@ " -- where represents the name of this script spool fitbank201063012.log alter table TCUENTATASAEFECTIVA drop constraint FKCTATASEFEC; alter table TCUENTATASAEFECTIVA drop primary key cascade; drop table TCUENTATASAEFECTIVA cascade constraints; /*==============================================================*/ /* Table: TCUENTATASAEFECTIVA */ /*==============================================================*/ create table TCUENTATASAEFECTIVA ( CCUENTA VARCHAR2(19) not null, CPERSONA_COMPANIA NUMBER(8) not null, FHASTA TIMESTAMP not null, VERSIONCONTROL NUMBER(22) default 0, FDESDE TIMESTAMP not null, TASAEFECTIVAANUAL NUMBER(10,6) not null, TASAINTERNARETORNO NUMBER(10,6) not null ); comment on table TCUENTATASAEFECTIVA is 'Registra el calculo de las tasas TIR y TEA de la cuenta al momento del desembolso'; comment on column TCUENTATASAEFECTIVA.CCUENTA is 'Numero de la cuenta de colocaciones'; comment on column TCUENTATASAEFECTIVA.CPERSONA_COMPANIA is 'Codigo de la compania'; comment on column TCUENTATASAEFECTIVA.FHASTA is 'Fecha hasta la que estan vigente el registro de tasa efectiva de la cuenta'; comment on column TCUENTATASAEFECTIVA.VERSIONCONTROL is 'Manejo de optimistic locking.'; comment on column TCUENTATASAEFECTIVA.FDESDE is 'Fecha desde la que estan vigente el registro de tasa efectiva de la cuenta'; comment on column TCUENTATASAEFECTIVA.TASAEFECTIVAANUAL is 'Es la tasa efectiva de interes, para informes legales. Se calcula incluyendo todos los componentes financieros del prestamo conocidos al momento del desembolso'; comment on column TCUENTATASAEFECTIVA.TASAINTERNARETORNO is 'Es la tasa interna de retorno de interes, para informes legales, se utiliza para informes legales. Se calcula incluyendo todos los componentes financieros del prestamo conocidos al momento del desembolso'; alter table TCUENTATASAEFECTIVA add constraint IPKCTATASEFEC primary key (CPERSONA_COMPANIA, CCUENTA, FHASTA); alter table TCUENTATASAEFECTIVA add constraint FKCTATASEFEC foreign key (CCUENTA, CPERSONA_COMPANIA) references TCUENTAID (CCUENTA, CPERSONA_COMPANIA); alter table TSOLICITUDTASAEFECTIVA drop constraint FKSOLTASEFEC; alter table TSOLICITUDTASAEFECTIVA drop primary key cascade; drop table TSOLICITUDTASAEFECTIVA cascade constraints; /*==============================================================*/ /* Table: TSOLICITUDTASAEFECTIVA */ /*==============================================================*/ create table TSOLICITUDTASAEFECTIVA ( CSOLICITUD NUMBER(10) not null, SECUENCIA NUMBER(4) not null, CPERSONA_COMPANIA NUMBER(8) not null, FHASTA TIMESTAMP not null, VERSIONCONTROL NUMBER(22) default 0, FDESDE TIMESTAMP not null, TASAEFECTIVAANUAL NUMBER(10,6) not null, TASAINTERNARETORNO NUMBER(10,6) not null ); comment on table TSOLICITUDTASAEFECTIVA is 'Registra el calculo de las tasas TIR y TEA de la cuenta al momento de la solicitud'; comment on column TSOLICITUDTASAEFECTIVA.CSOLICITUD is 'Numero de solicitud de cuenta'; comment on column TSOLICITUDTASAEFECTIVA.SECUENCIA is 'Numero consecutivo de la solicitud'; comment on column TSOLICITUDTASAEFECTIVA.CPERSONA_COMPANIA is 'Codigo de la compania'; comment on column TSOLICITUDTASAEFECTIVA.FHASTA is 'Fecha hasta la que estan vigente el registro de tasa efectiva de la solicitud'; comment on column TSOLICITUDTASAEFECTIVA.VERSIONCONTROL is 'Manejo de optimistic locking.'; comment on column TSOLICITUDTASAEFECTIVA.FDESDE is 'Fecha desde la que estan vigente el registro de tasa efectiva de la solicitud'; comment on column TSOLICITUDTASAEFECTIVA.TASAEFECTIVAANUAL is 'Es la tasa efectiva de interes, para informes legales. Se calcula incluyendo todos los componentes financieros del prestamo conocidos al momento del desembolso'; comment on column TSOLICITUDTASAEFECTIVA.TASAINTERNARETORNO is 'Es la tasa interna de retorno de interes, para informes legales, se utiliza para informes legales. Se calcula incluyendo todos los componentes financieros del prestamo conocidos al momento del desembolso'; alter table TSOLICITUDTASAEFECTIVA add constraint IPKSOLTASEFEC primary key (CSOLICITUD, SECUENCIA, CPERSONA_COMPANIA, FHASTA); alter table TSOLICITUDTASAEFECTIVA add constraint FKSOLTASEFEC foreign key (CSOLICITUD, SECUENCIA, CPERSONA_COMPANIA) references TSOLICITUDID (CSOLICITUD, SECUENCIA, CPERSONA_COMPANIA); spool off