Señor

Páginas: 17 (4032 palabras) Publicado: 3 de noviembre de 2012
/* CREACION DE SCHEMA */

create schema solofox authorization postgres;
comment on schema solofox is 'Esquema Sede solofox en Santa Marta';


/* CREACION DE TABLAS */

-- Tablas de sistemas --------------------------------------------------------------------------------------

create table solofox.stacceso(
nmuser varchar(10),
cdmodu char(2),
menup varchar(10),
fondo varchar(30),estado int default 1
) tablespace dbspace;

create table solofox.stmaster(
nmuser varchar(10),
admon int default 0,
inven int default 0,
conta int default 0,
tesor int default 0,
carte int default 0,
prove int default 0,
nomin int default 0,
factu int default 0,
estado int default 1
) tablespace dbspace;

create table solofox.stconfig(
vrnovi numeric(18,4) default 0,
cuofednumeric(18,4) default 0,
ctafed varchar(12)
) tablespace dbspace;

create table solofox.stpfmenu( --perfiles de menu
cdpfmen char(4),
nbpfmen varchar(40),
csnivel varchar(20), --- consecutivo menu dentro del nivel
timeact timestamp default now(),
usuario varchar(10) not null,
estado int default 1
) tablespace dbspace;

create table solofox.stpfusua( --perfiles de usuarios
nmuservarchar(10),
cdpfmen char(4),
timeact timestamp default now(),
usuario varchar(10) not null,
estado int default 1
) tablespace dbspace;


--create table solofox.stfondos(
--f01 oid,
--f02 oid,
--f03 oid,
--f04 oid,
--f05 oid,
--f06 oid,
--f07 oid,
--fpp oid
--) tablespace dbspace;

--create table solofox.stmodemp(
--nit varchar(15),
--cdmodu char(2),
--menu1 varchar(10),--menu2 varchar(10),
--fondo varchar(30),
--estado int default 1
--) tablespace dbspace;


-- Tablas de cartera ---------------------------------------------------------------------------------------

create table solofox.crtransa(
cdtrans varchar(4),
nbtrans varchar(30) not null,
natrans integer not null,
nutrans numeric(18) default 0,
clacpte varchar(4),
ctadbto varchar(12),
ctacdtovarchar(12),
estado int default 1
) tablespace dbspace;

create table solofox.crdetaye(
detalle varchar(80),
ideterc varchar(18),
cdtpcre varchar(4),
fecdoc date,
fecven date,
tipdoc varchar(4), -- (105-VTA RESTAURANTE;106-VTA POS;107-VTA LITOGRAFIA;200-)
clacpte varchar(4),
numcpte int8,
codcta varchar(14),
natura int,
numdoc varchar(25),
docapl varchar(25),
vrbruto numeric(18,4),vrimpto numeric(18,4),
vrabono numeric(18,4),
vrsaldo numeric(18,4),
vrrtfte numeric(18,4),
vrrtica numeric(18,4),
vrrtiva numeric(18,4),
vrdctos numeric(18,4),
usuario varchar(10),
timeact timestamp default now(),
estcar int default 1,
estado int default 1
) tablespace dbspace;


-- Tablas de inventario------------------------------------------------------------------------------------

create table solofox.ivbodega(
cdbode varchar(2),
nobode varchar(40) not null,
cdctcto varchar(4),
bnfile varchar(8) not null, -- ej: ivbode05
timeact timestamp default now(),
usuario varchar(10) not null,
estado int default 1
) tablespace dbspace;

create table solofox.ivfamily(
cdfam varchar(6),
nbfam varchar(40) not null,
ctadeb varchar(12),
ctacre varchar(12),
pdescnumeric(18,4) default 0,
putil numeric(18,4) default 0,
okpdesc int default 0,
okddesc int default 0,
nbddesc varchar(10),
cdambi varchar(4),
porc1 numeric(18,4) default 0,
porc2 numeric(18,4) default 0,
porc3 numeric(18,4) default 0,
ktdd1 numeric(18,4) default 0,
ktdd2 numeric(18,4) default 0,
ktdd3 numeric(18,4) default 0,
ktht1 numeric(18,4) default 0,
ktht2 numeric(18,4) default0,
ktht3 numeric(18,4) default 0,
timeact timestamp default now(),
usuario varchar(10) not null,
estado int default 1
) tablespace dbspace;

create table solofox.ivcatego( -- categoria
cdcatg varchar(4),
nbcatg varchar(40) not null,
pdesc numeric(18,4) default 0,
putil numeric(18,4) default 0,
okpdesc int default 0,
okddesc int default 0,
nbddesc varchar(10),
timeact timestamp...
Leer documento completo

Regístrate para leer el documento completo.

Estos documentos también te pueden resultar útiles

  • Señor
  • Señor
  • Señor
  • Señor
  • Señor
  • Señora
  • Señor
  • señor

Conviértase en miembro formal de Buenas Tareas

INSCRÍBETE - ES GRATIS