[Php-avanzado] datos ctas ctes
Federico Rafaelli
frafaelli en hotmail.com
Mar Dic 23 16:26:48 ART 2008
Leo te mando las tablas de la tesis de ctas ctes:
table clientes id_cliente(PK) Smallint NOT NULL id_empresa(FK) Smallint NOT NULL usr Varchar(20) NOT NULLpassword Char(8) NOT NULL razon_social Varchar(60) NOT NULLciut Char(11) NOT NULL nombre_resp Varchar(35) NOT NULLapellido_resp Varchar(35) NOT NULLtelefono Varchar(35) NOT NULLe_mail Varchar(50) direccion Varchar(60)
table empresas
id_empresa(PK) Smallint NOT NULL usr Varchar(20) NOT NULLpassword Char(8) NOT NULL razon_social Varchar(60) NOT NULLciut Char(11) NOT NULL nombre_resp Varchar(35) NOT NULLapellido_resp Varchar(35) NOT NULLtelefono Varchar(35) NOT NULLe_mail Varchar(50) direccion Varchar(60)
table comprobantes
id_comprobante(PK) Smallint NOT NULL sucursal Varchar(4) NOT NULL nro Varchar(8) NOT NULL fecha Date NOT NULL importe Float NOT NULL id_cliente(FK) Smallint NOT NULL id_tipoComp(FK) Tinyint NOT NULL
table tipoComp
id_tipoComp(PK) Tinyint NOT NULL descripcion Varchar(20) NOT NULL
table ordenesDePago
nro_op(PK) Smallint NOT NULLfecha Date NOT NULL importe Float NOT NULL estado Enum(pendiente/confirmada) NOT NULL
table comp_op
nro_op(PFK) Smallint NOT NULL id_comprobante(PFK) Smallint NOT NULL importe_pago Float NOT NULL
table depositos
id_deposito(PK) Smallint NOT NULLnro_referencia Varchar(20) NOT NULLbanco Varchar(40) NOT NULLfecha Date NOT NULLimporte Float NOT NULLtipo_dep Enum(efectivo/cheques) NOT NULLnro_op(FK) Smallint NOT NULL
table retenciones id_ret(PK) Smallint NOT NULLnro Varchar(5) NOT NULLfecha Date NOT NULLimporte Float NOT NULLid_tipoRet(FK) Tinyint NOT NULLnro_op(FK) Smallint NOT NULLimporte_base Float NOT NULL
table tipoRet
id_tipoRet(PK) Tinyint NOT NULLdescripcion Varchar(35) NOT NULLalicuota Float NOT NULL
Consultas:
1-En la tabla depositos, el campo tipo_dep lo hice enum entre efect. y cheque, pero tambien podria haber creado otra tabla con el tipo de deposito y referenciarla. La dejo como estas o te parece mejor la ultima opcion.
2-Los tipos de datos de campos como id_comprobante, nro_op, id_ret o id_deposito los puse smallInt, me parece que esta bien ya que no creo que supere los 67.000 y pico...,esta bien?
Saludos.
Federico Rafaelli
_________________________________________________________________
¿Fanático de Hotmail y Messenger? ¡Conocé el resto de Windows Live®!
http://www.microsoft.com/windows/windowslive/
------------ próxima parte ------------
Se ha borrado un adjunto en formato HTML...
URL: http://www3.fi.mdp.edu.ar/cgi-bin/mailman/private/php-avanzado/attachments/20081223/18d91557/attachment.htm
Más información sobre la lista de distribución Php-avanzado