Sei sulla pagina 1di 20

Date / Time: 23 marzo 2020 Login: SYSDBA

Database: C:\conelmi\datos\CONDATA.FDB Table: BENEFICIO

Table: BENEFICIO
Fields
Field Name Type Computed Not Null Def Val
BEN_ID SMALLINT Yes
BEN_NOMBRE VARCHAR(20)
BEN_OTORGA VARCHAR(30)

Primary and Unique Keys


Key Name On Field Primary Unique
INTEG_173 BEN_ID Yes

Description
(none)

DDL
CREATE TABLE BENEFICIO (
BEN_ID SMALLINT GENERATED BY DEFAULT AS IDENTITY (START WITH 1) NOT NULL,
BEN_NOMBRE VARCHAR(20),
BEN_OTORGA VARCHAR(30));

1
Date / Time: 23 marzo 2020 Login: SYSDBA
Database: C:\conelmi\datos\CONDATA.FDB Table: CENTRO

Table: CENTRO
Fields
Field Name Type Computed Not Null Def Val
CEN_ID SMALLINT Yes
CEN_CODIGO CHAR(8)
CEN_NOMBRE VARCHAR(60)

Primary and Unique Keys


Key Name On Field Primary Unique
INTEG_135 CEN_ID Yes

Description
(none)

DDL
CREATE TABLE CENTRO (
CEN_ID SMALLINT GENERATED BY DEFAULT AS IDENTITY (START WITH 1) NOT NULL,
CEN_CODIGO CHAR(8),
CEN_NOMBRE VARCHAR(60));

2
Date / Time: 23 marzo 2020 Login: SYSDBA
Database: C:\conelmi\datos\CONDATA.FDB Table: CIUDADANO

Table: CIUDADANO
Fields
Field Name Type Computed Not Null Def Val
CIU_ID INTEGER Yes
Description: indice
CIU_CEDULA CHAR(10)
CIU_NOMBRES VARCHAR(30)
CIU_APELLIDOS VARCHAR(30)
CIU_SEXO CHAR(1)
CIU_FECNAC DATE
CIU_TELEFONO1 CHAR(10)
CIU_TELEFONO2 CHAR(10)
CIU_EMAIL VARCHAR(50)
CIU_FAMILIA INTEGER
CIU_OCUPA SMALLINT
CIU_PROFESION SMALLINT
CIU_INSTRUCCION VARCHAR(20) Primaria
CIU_RELIGION SMALLINT
CIU_PENSIONADO SMALLINT Yes
CIU_IDSOCIAL SMALLINT 1
CIU_CONDICION CHAR(1)
Description: Apto A Discapacitado D Especial E Fallecido F
Emigrado M Enfermo Cronico C Otro O
CIU_BENEFICIO SMALLINT
CIU_PARENTESCO VARCHAR(20)

Primary and Unique Keys


Key Name On Field Primary Unique
INTEG_163 CIU_ID Yes

Foreign Keys
Foreign Key Name On Field FK Table FK Field On Update On Delete
FK_CIUDADANO CIU_OCUPA OCUPA OCU_ID RESTRICT RESTRICT
FK_CIUDADANO2 CIU_RELIGION RELIGION REL_ID RESTRICT RESTRICT
FK_CIUDADANO3 CIU_IDSOCIAL ORGANISOC SOC_ID RESTRICT RESTRICT
IAL
FK_CIUDADANO4 CIU_BENEFICIO BENEFICIO BEN_ID RESTRICT RESTRICT

Description
(none)

DDL
CREATE TABLE CIUDADANO (
CIU_ID INTEGER GENERATED BY DEFAULT AS IDENTITY (START WITH 1) NOT NULL,
CIU_CEDULA CHAR(10),
CIU_NOMBRES VARCHAR(30),
CIU_APELLIDOS VARCHAR(30),
CIU_SEXO CHAR(1),
CIU_FECNAC DATE,
CIU_TELEFONO1 TELEFONO,
CIU_TELEFONO2 TELEFONO,
CIU_EMAIL VARCHAR(50),
CIU_FAMILIA INTEGER,
CIU_OCUPA SMALLINT,
CIU_PROFESION SMALLINT,
CIU_INSTRUCCION VARCHAR(20) CHARACTER SET NONE DEFAULT 'Primaria',
3
Date / Time: 23 marzo 2020 Login: SYSDBA
Database: C:\conelmi\datos\CONDATA.FDB Table: CIUDADANO

CIU_RELIGION SMALLINT,
CIU_PENSIONADO LOGICO NOT NULL,
CIU_IDSOCIAL SMALLINT DEFAULT 1,
CIU_CONDICION CONDICION,
CIU_BENEFICIO SMALLINT,
CIU_PARENTESCO VARCHAR(20));

4
Table: ELECTORES
Fields
Field Name Type Computed Not Null Def Val
ELE_ID INTEGER Yes
ELE_VOTANTE SMALLINT Yes
Description: Elector jefe de familia
ELE_CAPTADO SMALLINT
ELE_PARTIDO SMALLINT
ELE_CENTRO SMALLINT
ELE_MESA SMALLINT
ELE_COMITE SMALLINT Yes
ELE_TESTIGO SMALLINT Yes

Primary and Unique Keys


Key Name On Field Primary Unique
INTEG_174 ELE_ID Yes

Foreign Keys
Foreign Key Name On Field FK Table FK Field On Update On Delete
FK_ELECTORES ELE_PARTIDO PARTIDO PAR_ID RESTRICT RESTRICT
FK_ELECTORES1 ELE_CENTRO CENTRO CEN_ID RESTRICT RESTRICT

Description
(none)

DDL
CREATE TABLE ELECTORES (
ELE_ID INTEGER GENERATED BY DEFAULT AS IDENTITY NOT NULL,
ELE_VOTANTE LOGICO NOT NULL,
ELE_CAPTADO SMALLINT,
ELE_PARTIDO SMALLINT,
ELE_CENTRO SMALLINT,
ELE_MESA SMALLINT,
ELE_COMITE LOGICO NOT NULL,
ELE_TESTIGO LOGICO NOT NULL);

5
Date / Time: 23 marzo 2020 Login: SYSDBA
Database: C:\conelmi\datos\CONDATA.FDB Table: FAMILIA

Table: FAMILIA
Fields
Field Name Type Computed Not Null Def Val
FAM_NFAMILIA INTEGER Yes
FAM_IDJEFE SMALLINT
FAM_CONVIVIENDA CHAR(1)
FAM_CONDIECONO CHAR(1)
FAM_SECTOR SMALLINT
FAM_DIRECCION VARCHAR(80)

Primary and Unique Keys


Key Name On Field Primary Unique
INTEG_139 FAM_NFAMILIA Yes

Foreign Keys
Foreign Key Name On Field FK Table FK Field On Update On Delete
FK_FAMILIA FAM_IDJEFE CIUDADANO CIU_ID RESTRICT RESTRICT
FK_FAMILIA1 FAM_SECTOR SECTOR SEC_ID RESTRICT RESTRICT

Description
Registra todos los integrantes de familia mediante el campo numfam de electores
el integrante nº 1 es el jefe de familia

DDL
CREATE TABLE FAMILIA (
FAM_NFAMILIA INTEGER GENERATED BY DEFAULT AS IDENTITY (START WITH 1) NOT NULL,
FAM_IDJEFE SMALLINT,
FAM_CONVIVIENDA CONDICION,
FAM_CONDIECONO CONDICION,
FAM_SECTOR SMALLINT,
FAM_DIRECCION VARCHAR(80) CHARACTER SET NONE);

6
Date / Time: 23 marzo 2020 Login: SYSDBA
Database: C:\conelmi\datos\CONDATA.FDB Table: FOTOS

Table: FOTOS
Fields
Field Name Type Computed Not Null Def Val
FOTO_ID SMALLINT Yes
FOTO_JORNADA SMALLINT
FOTO_UBICA VARCHAR(50)
FOTO_CIUDADANO INTEGER

Primary and Unique Keys


Key Name On Field Primary Unique
INTEG_140 FOTO_ID Yes

Description
(none)

DDL
CREATE TABLE FOTOS (
FOTO_ID SMALLINT GENERATED BY DEFAULT AS IDENTITY (START WITH 1) NOT NULL,
FOTO_JORNADA SMALLINT,
FOTO_UBICA VARCHAR(50),
FOTO_CIUDADANO INTEGER);

7
Date / Time: 23 marzo 2020 Login: SYSDBA
Database: C:\conelmi\datos\CONDATA.FDB Table: JORNADA

Table: JORNADA
Fields
Field Name Type Computed Not Null Def Val
JOR_ID SMALLINT Yes
JOR_INICIO DATE
JOR_DESCRIP VARCHAR(80)
JOR_RESPON SMALLINT
JOR_CONDI CHAR(10)
JOR_LUGAR VARCHAR(60)
JOR_SECTOR SMALLINT
JOR_CODIGO CHAR(6) Yes

Primary and Unique Keys


Key Name On Field Primary Unique
INTEG_141 JOR_ID Yes

Description
(none)

DDL
CREATE TABLE JORNADA (
JOR_ID SMALLINT GENERATED BY DEFAULT AS IDENTITY (START WITH 1) NOT NULL,
JOR_INICIO DATE,
JOR_DESCRIP VARCHAR(80),
JOR_RESPON SMALLINT,
JOR_CONDI CHAR(10),
JOR_LUGAR VARCHAR(60),
JOR_SECTOR SMALLINT,
JOR_CODIGO CHAR(6) NOT NULL);

8
Date / Time: 23 marzo 2020 Login: SYSDBA
Database: C:\conelmi\datos\CONDATA.FDB Table: MILITANTE

Table: MILITANTE
Fields
Field Name Type Computed Not Null Def Val
MIL_ID SMALLINT Yes
MIL_CARGO VARCHAR(30)
MIL_PARTIDO SMALLINT

Primary and Unique Keys


Key Name On Field Primary Unique
INTEG_161 MIL_ID Yes

Foreign Keys
Foreign Key Name On Field FK Table FK Field On Update On Delete
FK_MILITANTE MIL_ID CIUDADANO CIU_ID RESTRICT RESTRICT
FK_MILITANTE1 MIL_PARTIDO PARTIDO PAR_ID RESTRICT RESTRICT

Description
(none)

DDL
CREATE TABLE MILITANTE (
MIL_ID SMALLINT GENERATED BY DEFAULT AS IDENTITY (START WITH 1) NOT NULL,
MIL_CARGO VARCHAR(30),
MIL_PARTIDO SMALLINT);

9
Date / Time: 23 marzo 2020 Login: SYSDBA
Database: C:\conelmi\datos\CONDATA.FDB Table: MOV_CIUDADANO

Table: MOV_CIUDADANO
Fields
Field Name Type Computed Not Null Def Val
MOV_CIU_ID INTEGER
MOV_CIU_IDCIUDA INTEGER Yes
MOV_CIU_SITUACION VARCHAR(100)
MOV_CIU_SOLICITUD SMALLINT
MOV_CIU_FECHA DATE
MOV_CIU_RESPON SMALLINT
MOV_CIU_ESTADO CHAR(1)
MOV_CIU_OBSER VARCHAR(60)

Foreign Keys
Foreign Key Name On Field FK Table FK Field On Update On Delete
FK_MOV_CIUDADANO MOV_CIU_IDCIUDA CIUDADANO CIU_ID RESTRICT RESTRICT
FK_MOV_CIUDADANO1 MOV_CIU_SOLICITUD SOLICITUD SOL_ID RESTRICT RESTRICT

Description
(none)

DDL
CREATE TABLE MOV_CIUDADANO (
MOV_CIU_ID INTEGER,
MOV_CIU_IDCIUDA INTEGER GENERATED BY DEFAULT AS IDENTITY (START WITH 1) NOT NULL,
MOV_CIU_SITUACION VARCHAR(100),
MOV_CIU_SOLICITUD SMALLINT,
MOV_CIU_FECHA DATE,
MOV_CIU_RESPON SMALLINT,
MOV_CIU_ESTADO CHAR(1),
MOV_CIU_OBSER VARCHAR(60));

10
Date / Time: 23 marzo 2020 Login: SYSDBA
Database: C:\conelmi\datos\CONDATA.FDB Table: MOVI_MILITA

Table: MOVI_MILITA
Fields
Field Name Type Computed Not Null Def Val
MOV_MIL_JORNADA SMALLINT Yes
MOV_MIL_FECHA DATE Yes CURRENT_DATE
MOV_MIL_ASISTE SMALLINT Yes
MOV_MIL_EVENTO SMALLINT Yes 0
Description: ¿¿¿???
MOV_MIL_IDMILITA SMALLINT
MOV_MIL_ID SMALLINT Yes
MOV_MIL_EVALU SMALLINT

Primary and Unique Keys


Key Name On Field Primary Unique
INTEG_156 MOV_MIL_ID Yes

Foreign Keys
Foreign Key Name On Field FK Table FK Field On Update On Delete
FK_MOVI_MILITA MOV_MIL_IDMILITA MILITANTE MIL_ID RESTRICT RESTRICT
FK_MOVI_MILITA1 MOV_MIL_JORNADA JORNADA JOR_ID RESTRICT RESTRICT

Description
(none)

DDL
CREATE TABLE MOVI_MILITA (
MOV_MIL_JORNADA SMALLINT NOT NULL,
MOV_MIL_FECHA DATE DEFAULT CURRENT_DATE NOT NULL,
MOV_MIL_ASISTE LOGICO NOT NULL,
MOV_MIL_EVENTO SMALLINT DEFAULT 0 NOT NULL,
MOV_MIL_IDMILITA SMALLINT,
MOV_MIL_ID SMALLINT NOT NULL,
MOV_MIL_EVALU SMALLINT);

11
Date / Time: 23 marzo 2020 Login: SYSDBA
Database: C:\conelmi\datos\CONDATA.FDB Table: OCUPA

Table: OCUPA
Fields
Field Name Type Computed Not Null Def Val
OCU_ID SMALLINT Yes
OCU_NOMBRE VARCHAR(30)

Primary and Unique Keys


Key Name On Field Primary Unique
INTEG_157 OCU_ID Yes

Description
(none)

DDL
CREATE TABLE OCUPA (
OCU_ID SMALLINT GENERATED BY DEFAULT AS IDENTITY (START WITH 1) NOT NULL,
OCU_NOMBRE VARCHAR(30));

12
Date / Time: 23 marzo 2020 Login: SYSDBA
Database: C:\conelmi\datos\CONDATA.FDB Table: ORGANISOCIAL

Table: ORGANISOCIAL
Fields
Field Name Type Computed Not Null Def Val
SOC_ID SMALLINT Yes
SOC_NOMBRE VARCHAR(30)

Primary and Unique Keys


Key Name On Field Primary Unique
INTEG_158 SOC_ID Yes

Description
(none)

DDL
CREATE TABLE ORGANISOCIAL (
SOC_ID SMALLINT GENERATED BY DEFAULT AS IDENTITY (START WITH 1) NOT NULL,
SOC_NOMBRE VARCHAR(30));

13
Date / Time: 23 marzo 2020 Login: SYSDBA
Database: C:\conelmi\datos\CONDATA.FDB Table: PARTIDO

Table: PARTIDO
Fields
Field Name Type Computed Not Null Def Val
PAR_ID SMALLINT Yes
PAR_SIGLA VARCHAR(8)
PAR_NOMBRE VARCHAR(30)

Primary and Unique Keys


Key Name On Field Primary Unique
INTEG_160 PAR_ID Yes

Description
(none)

DDL
CREATE TABLE PARTIDO (
PAR_ID SMALLINT GENERATED BY DEFAULT AS IDENTITY (START WITH 1) NOT NULL,
PAR_SIGLA VARCHAR(8),
PAR_NOMBRE VARCHAR(30));

14
Date / Time: 23 marzo 2020 Login: SYSDBA
Database: C:\conelmi\datos\CONDATA.FDB Table: PROFESION

Table: PROFESION
Fields
Field Name Type Computed Not Null Def Val
PRO_NOMBRE VARCHAR(30)
PRO_ID SMALLINT Yes

Primary and Unique Keys


Key Name On Field Primary Unique
INTEG_179 PRO_ID Yes

Description
(none)

DDL
CREATE TABLE PROFESION (
PRO_NOMBRE VARCHAR(30),
PRO_ID SMALLINT GENERATED BY DEFAULT AS IDENTITY (START WITH 1) NOT NULL);

15
Date / Time: 23 marzo 2020 Login: SYSDBA
Database: C:\conelmi\datos\CONDATA.FDB Table: RELIGION

Table: RELIGION
Fields
Field Name Type Computed Not Null Def Val
REL_ID SMALLINT Yes
REL_NOMBRE VARCHAR(20)

Primary and Unique Keys


Key Name On Field Primary Unique
PK_RELIGION REL_ID Yes

Description
(none)

DDL
CREATE TABLE RELIGION (
REL_ID SMALLINT GENERATED BY DEFAULT AS IDENTITY (START WITH 1) NOT NULL,
REL_NOMBRE VARCHAR(20));

16
Date / Time: 23 marzo 2020 Login: SYSDBA
Database: C:\conelmi\datos\CONDATA.FDB Table: SECTOR

Table: SECTOR
Fields
Field Name Type Computed Not Null Def Val
SEC_ID SMALLINT Yes
SEC_NOMBRE VARCHAR(30)
SEC_ZONA SMALLINT

Primary and Unique Keys


Key Name On Field Primary Unique
INTEG_172 SEC_ID Yes

Foreign Keys
Foreign Key Name On Field FK Table FK Field On Update On Delete
FK_SECTOR SEC_ZONA ZONA ZON_ID RESTRICT RESTRICT

Description
(none)

DDL
CREATE TABLE SECTOR (
SEC_ID SMALLINT GENERATED BY DEFAULT AS IDENTITY (START WITH 1) NOT NULL,
SEC_NOMBRE VARCHAR(30),
SEC_ZONA SMALLINT);

17
Date / Time: 23 marzo 2020 Login: SYSDBA
Database: C:\conelmi\datos\CONDATA.FDB Table: SOLICITUD

Table: SOLICITUD
Fields
Field Name Type Computed Not Null Def Val
SOL_ID SMALLINT Yes
SOL_NOMBRE VARCHAR(60)
SOL_TIPO CHAR(3)

Primary and Unique Keys


Key Name On Field Primary Unique
INTEG_168 SOL_ID Yes

Description
(none)

DDL
CREATE TABLE SOLICITUD (
SOL_ID SMALLINT GENERATED BY DEFAULT AS IDENTITY (START WITH 1) NOT NULL,
SOL_NOMBRE VARCHAR(60),
SOL_TIPO CHAR(3));

18
Date / Time: 23 marzo 2020 Login: SYSDBA
Database: C:\conelmi\datos\CONDATA.FDB Table: ZONA

Table: ZONA
Fields
Field Name Type Computed Not Null Def Val
ZON_ID SMALLINT Yes
ZON_NOMBRE VARCHAR(20)

Primary and Unique Keys


Key Name On Field Primary Unique
INTEG_170 ZON_ID Yes

Description
(none)

DDL
CREATE TABLE ZONA (
ZON_ID SMALLINT GENERATED BY DEFAULT AS IDENTITY (START WITH 1) NOT NULL,
ZON_NOMBRE VARCHAR(20));

19
Date / Time: 23 marzo 2020 Login: SYSDBA
Database: C:\conelmi\datos\CONDATA.FDB Domain: CONDICION

Domain: CONDICION
DDL
CREATE DOMAIN CONDICION AS
CHAR(1)
CHECK (
value in ('E','R','X','A','Y')
);

Description
(none)

Domain: EVALUAR
DDL
CREATE DOMAIN EVALUAR AS
SMALLINT
DEFAULT 0
CHECK (value >0 and VALUE <6);

Description
(none)

Domain: LOGICO
DDL
CREATE DOMAIN LOGICO AS
SMALLINT
DEFAULT 0
NOT NULL
CHECK (
VALUE IN(0,1)
);

Description
(none)

Domain: TELEFONO
DDL
CREATE DOMAIN TELEFONO AS
CHAR(10);

Description
(none)

20