Crear una b-d integrada

Páginas: 2 (498 palabras) Publicado: 24 de agosto de 2012
Diseñar una Base de Datos Integrada para:
Cuentas por Cobrar.
Facturacion.



Create Table Clientes
(
Cod_Client Char (06) Primary Key,
Nom_Client Char (60) Not Null,
Direccion Char(50) Not Null,
Telefono Char (09) Not Null,
DUI Char (10) Not Null,
NIT Char (14) Not Null,
Fech_ing Date Not Null,
Saldo Numeric (7,2)Not Null,
Salario Numeric (7,2)Not Null,Lim_Cred Numeric (7,2)Not Null,
Correo Char (40) Not Null,
Tipo_pago Char (10) Not Null
)

Create Table Usuarios
(
Cod_Usua Char (06) Primary Key,
Nom_Usua Char (50) Not Null,
Cargo Char(25) Not Null,
DUI Char (10) Not Null,
NIT Char (16) Not Null,
NUP Char (14) Not Null,
ISSS Char (16) Not Null,
Correo Char (40) Not Null,
Telefono Char (10) Not Null,
DireccionChar (50) Not Null
)

Create Table Cargos_Client
(
Cod_Carg Char (03) Primary Key,
Nom_Carg Char (50) Not Null,
Cod_Client Char (06) Not Null Foreing Key References Clientes(Cod_Client),Total_Cargo Numeric (7,2) Not Null
)

Create Table Abonos_Client
(
Cod_Mov Char (06) Primary Key,
Cod_Client Char (06) Not Null Foreing Key References Clientes(Cod_Client),
Abonos Numeric(7,2) Not Null,
Fecha_abn Date Not Null,
Total Numeric (7,2) Not Null,
Saldo Numeric (7,2) Not Null,
Referencia Char (60) Not Null,
Cod_Usua Char (06) Not Null
)

Create TableAbonos
Cod_abon Char (03) Primary Key,
Nom_abon Char (40) Not Null,
Tip_abon Char (25) Not Null,
Abonos Numeric (7,2) Not Null Foreing References Abonos_Client (Abonos),
Cod_Trans Char(06) Not Null
)

Create Table Enc_Mov
(
Cod_Mov Char (06) Primary Key,
Cod_Trans Char (06) Not Null Foreing Key References Transaccion(Cod_Trans),
Cod_Client Char (06) Not Null ForeingKey References Clientes (Cod_Client),
Cod_Suc Char (03) Not Null Foreing Key References Sucursales (Cod_Suc),
Fecha Date Not Null,
Clase_Mov Char (03) Not Null Foreing References...
Leer documento completo

Regístrate para leer el documento completo.

Estos documentos también te pueden resultar útiles

  • Integradora B
  • Actividad Integradora IV PERIODO 2 A B C D E
  • Paises que integran el A. L. B. A.
  • Calderon D B
  • Hepatitis B Y D
  • Disgrafia b y d
  • A B C y D
  • Integradora B Unidad III

Conviértase en miembro formal de Buenas Tareas

INSCRÍBETE - ES GRATIS