Transcript
Manual Técnico
BACEQ 1.0
INDICE Capitulos 1. 2. 3. 4.
Estructura física de BACEQ Información del modelo Lista de Tablas de la base de datos Lista de campos de cada tabla 4.1 AccesosUsuarios 4.2 AguasAbiertas 4.3 Ancho 4.4 Campana 4.5 Clase 4.6 Cuenca 4.7 Estacion 4.8 Facies 4.9 Familia 4.10 FichaCampo 4.11 FisicoQuimico 4.12 Genero 4.13 HeliceDetalle 4.14 HeliceEncabezado 4.15 Invertebrados 4.16 Lluvia 4.17 Lluvia24 4.18 Margenes 4.19 Morfologia_Caudal 4.20 Morfologia_Regleta 4.21 Morfologia_Topografia 4.22 Nubocidad 4.23 Observadores 4.24 ObservadoresCampana 4.25 Orden 4.26 Parametros 4.27 Phylum 4.28 Plantillas 4.29 Profundidad 4.30 Programas 4.31 Protocolos 4.32 Publicaciones 4.33 PuntajeHabitat 4.34 Quimicos 4.35 Rios 4.36 Rivera 4.37 SubCuenca 4.38 SubClase 4.39 Surbers 4.40 Sustrato 4.41 Taxa 4.42 TipoCampana 4.43 Turbidez 4.44 Turbulencia 4.45 Unidades 4.46 Usuarios 4.47 Vegetacion 4.48 Viento
Geovanny Terán
Página 3 8 8 9 9 10 11 12 14 15 16 18 19 20 29 30 31 33 34 35 36 37 38 40 42 45 46 47 48 49 50 51 52 53 54 55 57 59 60 61 62 63 65 68 69 71 72 73 74 75 76 77
Página 2
Manual Técnico
BACEQ 1.0
1. Estructura física de BACEQ
Geovanny Terán
Página 3
Manual Técnico
BACEQ 1.0
Geovanny Terán
Página 4
Manual Técnico
BACEQ 1.0
Geovanny Terán
Página 5
Manual Técnico
BACEQ 1.0
Geovanny Terán
Página 6
Manual Técnico
BACEQ 1.0
Geovanny Terán
Página 7
Manual Técnico
BACEQ 1.0
2. Información del modelo Nombre: BACEQ Versión: 1.0 Base de datos: Microsoft SQL Server 2000 Front End: Microsoft Visual Studio El presente manual hará referencia a la base de datos Microsoft SQL Server 2000 ya que en esta base se han subido los datos para este proyecto. Es posible usar cualquier base de datos ya sea MySql, Acces, Oracle, etc. Simplemente habría que hacer pequeños cambios en los enlaces desde el programa.
3. Lista de Tablas de la base de datos Nombre Tabla AccesosUsuarios
Descripción Accesos de los usuarios del sistema
AguasAbiertas
Lista de opciones para aguas abiertas
Ancho
Lista de opciones para ancho
Campana
Datos generales de campañas
Clase
Clases de los invertebrados
Cuenca
Cuencas Hidrográficas
Estacion
Estaciones
Facies
Lista de opciones para facies
Familia
Familias de los invertebrados
FichaCampo
Fichas de campo
FisicoQuimico
Análisis físico-químico de las fichas de campo
Genero
Géneros de los invertebrados
HeliceDetalle
Vueltas de las hélices y sus respectivas velocidades
HeliceEncabezado
Datos generales de las hélices
Invertebrados
Invertebrados
Lluvia
Lista de opciones para lluvia
Lluvia24
Lista de opciones para lluvia ultimas 24 horas
Margenes
Lista de opciones para márgenes
Morfologia_Caudal
Datos de caudales en las fichas de morfología
Morfologia_Regleta
Datos de la regleta en las fichas de morfología
Morfologia_Topografia
Datos de topografía en las fichas de morfología
Nubocidad
Lista de opciones para la nubosidad
Observadores
Datos generales de participantes para las campañas
ObservadoresCampana Observadores por campañas Ordenes de los invertebrados Orden Parametros
Parámetros generales del sistema
Phylum
Phylums de los invertebrados
Plantillas
Documentos de plantillas
Profundidad
Lista de opciones para la profundidad del río
Programas
Programas que se usan para la edición de documentos
Protocolos
Documentos de protocolos
Publicaciones
Documentos de publicaciones
PuntajeHabitat
Lista de opciones para los puntajes de hábitat
Geovanny Terán
Página 8
Manual Técnico
BACEQ 1.0
Quimicos
Datos generales de químicos
Rios
Ríos de las estaciones
Rivera
Lista de opciones de ubicación de los surber
Subclase
Subclases de los invertebrados
SubCuenca
Sub-Cuencas de las estaciones
Surbers
Datos de los Surber de las fichas de campo
Sustrato
Lista de opciones para sustrato
Taxa
Datos de Taxa de las fichas de campo
TipoCampana
Lista de opciones de tipos de campaña
Turbidez
Lista de opciones para turbidez
Turbulencia
Lista de opciones para turbulencia
Unidades
Lista de opciones para unidades
Usuarios
Datos generales de los usuarios del sistema
Vegetacion
Lista de opciones de vegetación
Viento
Lista de opciones de viento
4. Lista de campos de cada tabla 4.1 AccesosUsuarios Nombre de columna usr_Codigo acc_Codigo acc_Nombre acc_Texto acc_Activo acc_Ejecuta
Tipo de datos character character character character bit bit
Longitud 20 10 60 60 1 1
Permitir valores nulos No No Si Si Si Si
Primary Key -
Usr_Codigo Acc_Codigo
Dependencias Objetos que dependen de AccesosUsuarios: Objetos de los que depende AccesosUsuarios: - Usuarios
Código de creación alter table ACCESOSUSUARIOS drop constraint FK_AccesosUsuarios go if exists (select 1 from sysindexes where id = object_id('ACCESOSUSUARIOS') and name = 'ACC_CODIGO' Geovanny Terán
Página 9
Manual Técnico
BACEQ 1.0
and indid > 0 and indid < 255) drop index ACCESOSUSUARIOS.ACC_CODIGO go if exists (select 1 from sysobjects where id = object_id('ACCESOSUSUARIOS') and type = 'U') drop table ACCESOSUSUARIOS go /*==============================================================*/ /* Table: ACCESOSUSUARIOS */ /*==============================================================*/ create table ACCESOSUSUARIOS ( USR_CODIGO character(20) not null, ACC_CODIGO character(10) not null, ACC_NOMBRE character(60) null, ACC_TEXTO character(60) null, ACC_ACTIVO bit null, ACC_EJECUTA bit null, constraint PK_ACCESOSUSUARIOS primary key (USR_CODIGO, ACC_CODIGO)) go /*==============================================================*/ /* Index: ACC_CODIGO */ /*==============================================================*/ create unique index ACC_CODIGO on ACCESOSUSUARIOS (USR_CODIGO, ACC_CODIGO) go
alter table ACCESOSUSUARIOS add constraint FK_AccesosUsuarios foreign key (USR_CODIGO) references USUARIOS (USR_CODIGO) go
4.2 AguasAbiertas Nombre de columna agu_Codigo agu_Nombre
Tipo de datos Numeric character
Longitud 1 20
Permitir valores nulos No Si
Primary Key -
agu_Codigo
Dependencias Objetos que dependen de AguasAbiertas: Objetos de los que depende AguasAbiertas: - FichaCampo
Geovanny Terán
Página 10
Manual Técnico
BACEQ 1.0
Código de creación alter table FICHACAMPO drop constraint FK_FichasAguasAbiertas go if exists (select 1 from sysindexes where id = object_id('AGUASABIERTAS') and name = 'AGU_CODIGO' and indid > 0 and indid < 255) drop index AGUASABIERTAS.AGU_CODIGO go if exists (select 1 from sysobjects where id = object_id('AGUASABIERTAS') and type = 'U') drop table AGUASABIERTAS go /*==============================================================*/ /* Table: AGUASABIERTAS */ /*==============================================================*/ create table AGUASABIERTAS ( AGU_CODIGO numeric(1) not null, AGU_NOMBRE character(10) null, constraint PK_AGUASABIERTAS primary key (AGU_CODIGO)) go /*==============================================================*/ /* Index: AGU_CODIGO */ /*==============================================================*/ create unique index AGU_CODIGO on AGUASABIERTAS (AGU_CODIGO) go
4.3 Ancho Nombre de columna anc_Codigo anc_Nombre
Tipo de datos Numeric character
Longitud 1 20
Permitir valores nulos No Si
Primary Key -
anc_Codigo
Dependencias Objetos que dependen de Ancho: Objetos de los que depende Ancho: - FichaCampo
Geovanny Terán
Página 11
Manual Técnico
BACEQ 1.0
Código de creación alter table FICHACAMPO drop constraint FK_FichaAncho go if exists (select 1 from sysindexes where id = object_id('ANCHO') and name = 'ANC_CODIGO' and indid > 0 and indid < 255) drop index ANCHO.ANC_CODIGO go if exists (select 1 from sysobjects where id = object_id('ANCHO') and type = 'U') drop table ANCHO go /*==============================================================*/ /* Table: ANCHO */ /*==============================================================*/ create table ANCHO ( ANC_CODIGO numeric(1) not null, ANC_NOMBRE character(10) null, constraint PK_ANCHO primary key (ANC_CODIGO)) go /*==============================================================*/ /* Index: ANC_CODIGO */ /*==============================================================*/ create unique index ANC_CODIGO on ANCHO (ANC_CODIGO) go
4.4 Campana Nombre de columna tip_Codigo cam_Numero cam_FechaIni cam_FechaFin cam_Participantes cam_Estaciones cam_MuestrasS cam_MuestrasRM cam_Observaciones
Geovanny Terán
Tipo de datos Numeric Numeric Datetime Datetime Carácter Numeric Numeric Numeric Text
Longitud 1 5 8 8 100 3 3 3 16
Permitir valores nulos No No Si Si Si Si Si Si Si
Página 12
Manual Técnico
BACEQ 1.0
Primary Key -
tip_Codigo cam_Numero
Dependencias Objetos que dependen de Campana: - FichaCampo - MorfologiaRegleta - ObservadoresCampana Objetos de los que depende Campana: - TipoCampana
Código de creación alter table CAMPANA drop constraint FK_CampanaTipo go alter table FICHACAMPO drop constraint FK_FichasCampana go alter table OBSERVADORESCAMPANA drop constraint FK_Campana go alter table MORFOLOGIA_REGLETA drop constraint FK_MorfologiaCampana go if exists (select 1 from sysindexes where id = object_id('CAMPANA') and name = 'CAM_NUMERO' and indid > 0 and indid < 255) drop index CAMPANA.CAM_NUMERO go if exists (select 1 from sysobjects where id = object_id('CAMPANA') and type = 'U') drop table CAMPANA go /*==============================================================*/ /* Table: CAMPANA */ /*==============================================================*/ create table CAMPANA ( TIP_CODIGO numeric(1) not null, CAM_NUMERO numeric(5) not null, CAM_FECHAINI datetime null, CAM_FECHAFIN datetime null, CAM_PARTICIPANTES character(100) null, CAM_ESTACIONES numeric(3) null, Geovanny Terán
Página 13
Manual Técnico
BACEQ 1.0
CAM_MUESTRASS numeric(3) null, CAM_MUESTRASRM numeric(3) null, CAM_OBSERVACIONES text null, constraint PK_CAMPANA primary key (TIP_CODIGO, CAM_NUMERO)) go /*==============================================================*/ /* Index: CAM_NUMERO */ /*==============================================================*/ create unique index CAM_NUMERO on CAMPANA (TIP_CODIGO, CAM_NUMERO) go alter table CAMPANA add constraint FK_CampanaTipo foreign key (TIP_CODIGO) references TIPOCAMPANA (TIP_CODIGO) go
4.5 Clase Nombre de columna cla_Codigo phy_Codigo cla_Nombre
Tipo de datos Numeric Numeric character
Longitud 3 3 20
Permitir valores nulos No No Si
Primary Key -
cla_Codigo
Dependencias Objetos que dependen de Clase: - SubClase Objetos de los que depende Clase: - Phylum
Código de creación alter table CLASE drop constraint FK_PhylumClase go alter table SUBCLASE drop constraint FK_ClaseSubc go if exists (select 1 from sysindexes where id = object_id('CLASE') and name = 'CLA_CODIGO' and indid > 0 and indid < 255) drop index CLASE.CLA_CODIGO go if exists (select 1 Geovanny Terán
Página 14
Manual Técnico
BACEQ 1.0
from sysobjects where id = object_id('CLASE') and type = 'U') drop table CLASE go /*==============================================================*/ /* Table: CLASE */ /*==============================================================*/ create table CLASE ( CLA_CODIGO numeric(3) not null, PHY_CODIGO numeric(3) null, CLA_NOMBRE character(20) null, constraint PK_CLASE primary key (CLA_CODIGO)) go /*==============================================================*/ /* Index: CLA_CODIGO */ /*==============================================================*/ create unique index CLA_CODIGO on CLASE (CLA_CODIGO) go alter table CLASE add constraint FK_PhylumClase foreign key (PHY_CODIGO) references PHYLUM (PHY_CODIGO) go
4.6 Cuenca Nombre de columna cue_Codigo cue_Nombre
Tipo de datos Character Character
Longitud 2 30
Permitir valores nulos No Si
Primary Key -
cla_Codigo
Dependencias Objetos que dependen de Cuenca: - SubCuenca Objetos de los que depende Cuenca:
Código de creación alter table SUBCUENCA drop constraint FK_SubcuencasCuenca go if exists (select 1 from sysindexes where id = object_id('CUENCA') and name = 'CUE_CODIGO' and indid > 0 and indid < 255) Geovanny Terán
Página 15
Manual Técnico
BACEQ 1.0
drop index CUENCA.CUE_CODIGO go if exists (select 1 from sysobjects where id = object_id('CUENCA') and type = 'U') drop table CUENCA go /*==============================================================*/ /* Table: CUENCA */ /*==============================================================*/ create table CUENCA ( CUE_CODIGO character(2) not null, CUE_NOMBRE character(30) null, constraint PK_CUENCA primary key (CUE_CODIGO)) go /*==============================================================*/ /* Index: CUE_CODIGO */ /*==============================================================*/ create unique index CUE_CODIGO on CUENCA (CUE_CODIGO) go
4.7 Estacion Nombre de columna est_Codigo rio_Codigo est_Nombre est_Longitud est_Latitud est_Altura est_Foto est_Comentario est_SupCuenca est_Exutorio
Tipo de datos Character Character Character Character Character Numeric Imagen Texto Numeric Numeric
Longitud 4 2 30 10 10 4 16 16 5 5
Permitir valores nulos No No Si Si Si Si Si Si Si Si
Primary Key -
est_Codigo
Dependencias Objetos que dependen de Estacion: - FichaCampo - Morfologia_Regleta Objetos de los que depende Estacion: - Rios
Geovanny Terán
Página 16
Manual Técnico
BACEQ 1.0
Código de creación alter table ESTACION drop constraint FK_EstacionesRio go alter table FICHACAMPO drop constraint FK_CampanaEstacion go alter table MORFOLOGIA_REGLETA drop constraint FK_MorfologiaEstacion go if exists (select 1 from sysindexes where id = object_id('ESTACION') and name = 'EST_CODIGO' and indid > 0 and indid < 255) drop index ESTACION.EST_CODIGO go if exists (select 1 from sysobjects where id = object_id('ESTACION') and type = 'U') drop table ESTACION go /*==============================================================*/ /* Table: ESTACION */ /*==============================================================*/ create table ESTACION ( EST_CODIGO character(4) not null, RIO_CODIGO character(2) null, EST_NOMBRE character(30) null, EST_LONGITUD character(10) null, EST_LATITUD character(10) null, EST_ALTURA numeric(4) null, EST_FOTO image null, EST_COMENTARIO text null, EST_SUPCUENCA numeric(5) null, EST_EXUTORIO numeric(5) null, constraint PK_ESTACION primary key (EST_CODIGO)) go /*==============================================================*/ /* Index: EST_CODIGO */ /*==============================================================*/ create unique index EST_CODIGO on ESTACION (EST_CODIGO) go alter table ESTACION add constraint FK_EstacionesRio foreign key (RIO_CODIGO) references RIOS (RIO_CODIGO) go
Geovanny Terán
Página 17
Manual Técnico
BACEQ 1.0
4.8 Facies Nombre de columna fac_Codigo fac_Nombre
Tipo de datos Numeric Character
Longitud 1 10
Permitir valores nulos No Si
Primary Key -
fac_Codigo
Dependencias Objetos que dependen de Facies: - Surbers Objetos de los que depende Facies:
Código de creación alter table SURBERS drop constraint FK_SurberFacies go if exists (select 1 from sysindexes where id = object_id('FACIES') and name = 'FAC_CODIGO' and indid > 0 and indid < 255) drop index FACIES.FAC_CODIGO go if exists (select 1 from sysobjects where id = object_id('FACIES') and type = 'U') drop table FACIES go /*==============================================================*/ /* Table: FACIES */ /*==============================================================*/ create table FACIES ( FAC_CODIGO numeric(1) not null, FAC_NOMBRE character(10) null, constraint PK_FACIES primary key (FAC_CODIGO)) go /*==============================================================*/ /* Index: FAC_CODIGO */ /*==============================================================*/ create unique index FAC_CODIGO on FACIES (FAC_CODIGO) go
Geovanny Terán
Página 18
Manual Técnico
BACEQ 1.0
4.9 Familia Nombre de columna fam_Codigo ord_Codigo fam_Nombre
Tipo de datos Numeric Numeric Character
Longitud 3 3 20
Permitir valores nulos No No Si
Primary Key -
fam_Codigo
Dependencias Objetos que dependen de Familia: - Genero Objetos de los que depende Familia: - Orden
Código de creación alter table FAMILIA drop constraint FK_OrdenFamilia go alter table GENERO drop constraint FK_FamiliaGenero go if exists (select 1 from sysindexes where id = object_id('FAMILIA') and name = 'FAM_CODIGO' and indid > 0 and indid < 255) drop index FAMILIA.FAM_CODIGO go if exists (select 1 from sysobjects where id = object_id('FAMILIA') and type = 'U') drop table FAMILIA go /*==============================================================*/ /* Table: FAMILIA */ /*==============================================================*/ create table FAMILIA ( FAM_CODIGO numeric(3) not null, ORD_CODIGO numeric(3) null, FAM_NOMBRE character(20) null, constraint PK_FAMILIA primary key (FAM_CODIGO)) go /*==============================================================*/ /* Index: FAM_CODIGO */ Geovanny Terán
Página 19
Manual Técnico
BACEQ 1.0
/*==============================================================*/ create unique index FAM_CODIGO on FAMILIA (FAM_CODIGO) go alter table FAMILIA add constraint FK_OrdenFamilia foreign key (ORD_CODIGO) references ORDEN (ORD_CODIGO) go
4.10 FichaCampo Nombre de columna tip_Codigo cam_Numero fic_Numero fic_Fecha obs_Codigo llu_Codigo l24_Codigo nub_Codigo vie_Codigo anc_Codigo pro_Codigo tur_Codigo trb_Codigo fic_SiNoColor fic_Color fic_SiNoOlor fic_Olor fic_Regleta agu_Codigo fic_AguasAbiertas mar_Codigo fic_Margenes fic_Conductividad fic_PH fic_Temperatura fic_Oxigeno f1_Codigo f2_Codigo f3_Codigo f4_Codigo f5_Codigo v1_Codigo v2_Codigo v3_Codigo v4_Codigo Geovanny Terán
Tipo de datos Numeric Numeric Numeric Datetime Numeric Numeric Numeric Numeric Numeric Numeric Numeric Numeric Numeric bit Character Bit Character Numeric Numeric Character Numeric Character Numeric Numeric Numeric Numeric Numeric Numeric Numeric Numeric Numeric Numeric Numeric Numeric Numeric
Longitud 1 5 5 8 2 1 1 1 1 1 1 1 1 1 20 1 20 3 1 20 1 20 6,2 6,2 6,2 6,2 1 1 1 1 1 1 1 1 1
Permitir valores nulos No No No Si No No No No No No No No No Si No Si No Si No Si No Si Si Si Si Si No No No No No No No No No Página 20
Manual Técnico v5_Codigo g1_Codigo g2_Codigo g3_Codigo g4_Codigo g5_Codigo g6_Codigo g7_Codigo est_Codigo fic_FrascosSurbers fic_FrascosRM h1f_Codigo h1v_Codigo h1s_Codigo h2f_Codigo h2v_Codigo h2s_Codigo h3f_Codigo h3v_Codigo h3s_Codigo h4f_Codigo h4v_Codigo h4s_Codigo h5f_Codigo h5v_Codigo h5s_Codigo h6f_Codigo h6v_Codigo h6s_Codigo fic_Archivo prg_Codigo hel_Codigo fic_Comentario
BACEQ 1.0
Numeric Numeric Numeric Numeric Numeric Numeric Numeric Numeric Character Numeric Numeric Numeric Numeric Numeric Numeric Numeric Numeric Numeric Numeric Numeric Numeric Numeric Numeric Numeric Numeric Numeric Numeric Numeric Numeric Character Character Numeric Texto
1 1 1 1 1 1 1 1 4 3 3 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 100 20 2 16
No No No No No No No No No Si Si No No No No No No No No No No No No No No No No No No Si No No Si
Primary Key -
fam_Codigo
Dependencias Objetos que dependen de FichaCampo: - tip_Codigo - cam_Numero - fic_Numero Objetos de los que depende FichaCampo: - AguasAbiertas - Ancho - Campana - Estacion - HeliceEncabezado Geovanny Terán
Página 21
Manual Técnico -
BACEQ 1.0
Lluvia Lluvia24 Margenes Nubocidad Observadores Profundidad Programas PuntajeHabitat Turbidez Turbulencia Viento
Código de creación alter table FICHACAMPO drop constraint "FK_Campana-Nubocidad" go alter table FICHACAMPO drop constraint "FK_Campana-Lluvia" go alter table FICHACAMPO drop constraint "FK_Campana-Viento" go alter table FICHACAMPO drop constraint "FK_Campana-Lluvia24" go alter table FICHACAMPO drop constraint FK_ObservadorFicha go alter table FICHACAMPO drop constraint FK_FichaAncho go alter table FICHACAMPO drop constraint FK_FichaProfundidad go alter table FICHACAMPO drop constraint FK_FichaTurbulencia go alter table FICHACAMPO drop constraint FK_FichaTurbidez go alter table FICHACAMPO drop constraint FK_FichasAguasAbiertas go alter table FICHACAMPO drop constraint FK_FichasMargenes go
Geovanny Terán
Página 22
Manual Técnico
BACEQ 1.0
alter table FICHACAMPO drop constraint FK_FichaF1 go alter table FICHACAMPO drop constraint FK_FichaF2 go alter table FICHACAMPO drop constraint FK_FichaF3 go alter table FICHACAMPO drop constraint FK_FichaF4 go alter table FICHACAMPO drop constraint FK_FichaF5 go alter table FICHACAMPO drop constraint FK_FichaV1 go alter table FICHACAMPO drop constraint FK_FichaV2 go alter table FICHACAMPO drop constraint FK_FichaV3 go alter table FICHACAMPO drop constraint FK_FichaV4 go alter table FICHACAMPO drop constraint FK_FichaV5 go alter table FICHACAMPO drop constraint FK_FichaG1 go alter table FICHACAMPO drop constraint FK_FichaG2 go alter table FICHACAMPO drop constraint FK_FichaG3 go alter table FICHACAMPO drop constraint FK_FichaG4 go alter table FICHACAMPO drop constraint FK_FichaG5 Geovanny Terán
Página 23
Manual Técnico
BACEQ 1.0
go alter table FICHACAMPO drop constraint FK_FichaG6 go alter table FICHACAMPO drop constraint FK_FichaG7 go alter table FICHACAMPO drop constraint FK_FichasCampana go alter table FICHACAMPO drop constraint FK_CampanaEstacion go alter table FICHACAMPO drop constraint FK_FichaPrograma go alter table FICHACAMPO drop constraint FK_FichaHelice go alter table SURBERS drop constraint FK_SurberFicha go alter table FISICOQUIMICO drop constraint FK_FisicoQuimicoFichas go alter table TAXA drop constraint FK_TaxaFichas go if exists (select 1 from sysindexes where id = object_id('FICHACAMPO') and name = 'FIC_NUMERO' and indid > 0 and indid < 255) drop index FICHACAMPO.FIC_NUMERO go if exists (select 1 from sysobjects where id = object_id('FICHACAMPO') and type = 'U') drop table FICHACAMPO go /*==============================================================*/ /* Table: FICHACAMPO */ /*==============================================================*/ create table FICHACAMPO ( Geovanny Terán
Página 24
Manual Técnico
BACEQ 1.0
TIP_CODIGO numeric(1) not null, CAM_NUMERO numeric(5) not null, FIC_NUMERO numeric(5) not null, FIC_FECHA datetime null, FIC_HORA timestamp null, OBS_CODIGO Numeric(2) null, LLU_CODIGO numeric(1) null, L24_CODIGO numeric(1) null, NUB_CODIGO numeric(1) null, VIE_CODIGO numeric(1) null, ANC_CODIGO numeric(1) null, PRO_CODIGO numeric(1) null, TUR_CODIGO numeric(1) null, TRB_CODIGO numeric(1) null, FIC_SINOCOLOR numeric(1) null, FIC_COLOR character(20) null, FIC_SINOOLOR numeric(1) null, FIC_OLOR character(20) null, FIC_REGLETA numeric(3) null, AGU_CODIGO numeric(1) null, FIC_AGUASABIERTAS character(20) null, MAR_CODIGO numeric(1) null, FIC_MARGENES character(20) null, FIC_CONDUCTIVIDAD numeric(6,2) null, FIC_PH numeric(6,2) null, FIC_TEMPERATURA numeric(6,2) null, FIC_OXIGENO numeric(6,2) null, F1_CODIGO numeric(1) null, F2_CODIGO numeric(1) null, F3_CODIGO numeric(1) null, F4_CODIGO numeric(1) null, F5_CODIGO numeric(1) null, V1_CODIGO numeric(1) null, V2_CODIGO numeric(1) null, V3_CODIGO numeric(1) null, V4_CODIGO numeric(1) null, V5_CODIGO numeric(1) null, G1_CODIGO numeric(1) null, G2_CODIGO numeric(1) null, G3_CODIGO numeric(1) null, G4_CODIGO numeric(1) null, G5_CODIGO numeric(1) null, G6_CODIGO numeric(1) null, G7_CODIGO numeric(1) null, EST_CODIGO character(4) null, FIC_FRASCOSSURBERS numeric(3) null, FIC_FRASCOSRM numeric(3) null, H1F_CODIGO numeric(1) null, H1V_CODIGO numeric(1) null, H1S_CODIGO numeric(1) null, H2F_CODIGO numeric(1) null, H2V_CODIGO numeric(1) null, H2S_CODIGO numeric(1) null, H3F_CODIGO numeric(1) null, H3V_CODIGO numeric(1) null, H3S_CODIGO numeric(1) null, H4F_CODIGO numeric(1) null, H4V_CODIGO numeric(1) null, Geovanny Terán
Página 25
Manual Técnico
BACEQ 1.0
H4S_CODIGO numeric(1) null, H5F_CODIGO numeric(1) null, H5V_CODIGO numeric(1) null, H5S_CODIGO numeric(1) null, H6F_CODIGO numeric(1) null, H6V_CODIGO numeric(1) null, H6S_CODIGO numeric(1) null, FIC_ARCHIVO character(200) null, PRG_CODIGO character(20) null, HEL_CODIGO numeric(2) null, FIC_COMENTARIO text null, constraint PK_FICHACAMPO primary key (TIP_CODIGO, CAM_NUMERO, FIC_NUMERO)) go /*==============================================================*/ /* Index: FIC_NUMERO */ /*==============================================================*/ create unique index FIC_NUMERO on FICHACAMPO (TIP_CODIGO, CAM_NUMERO, FIC_NUMERO) go alter table FICHACAMPO add constraint "FK_Campana-Nubocidad" foreign key (NUB_CODIGO) references NUBOCIDAD (NUB_CODIGO) go alter table FICHACAMPO add constraint "FK_Campana-Lluvia" foreign key (LLU_CODIGO) references LLUVIA (LLU_CODIGO) go alter table FICHACAMPO add constraint "FK_Campana-Viento" foreign key (VIE_CODIGO) references VIENTO (VIE_CODIGO) go alter table FICHACAMPO add constraint "FK_Campana-Lluvia24" foreign key (L24_CODIGO) references LLUVIA24 (L24_CODIGO) go alter table FICHACAMPO add constraint FK_ObservadorFicha foreign key (OBS_CODIGO) references OBSERVADORES (OBS_CODIGO) go alter table FICHACAMPO add constraint FK_FichaAncho foreign key (ANC_CODIGO) references ANCHO (ANC_CODIGO) go alter table FICHACAMPO add constraint FK_FichaProfundidad foreign key (PRO_CODIGO) references PROFUNDIDAD (PRO_CODIGO) go alter table FICHACAMPO add constraint FK_FichaTurbulencia foreign key (TUR_CODIGO) Geovanny Terán
Página 26
Manual Técnico
BACEQ 1.0
references TURBULENCIA (TUR_CODIGO) go alter table FICHACAMPO add constraint FK_FichaTurbidez foreign key (TRB_CODIGO) references TURBIDEZ (TRB_CODIGO) go alter table FICHACAMPO add constraint FK_FichasAguasAbiertas foreign key (AGU_CODIGO) references AGUASABIERTAS (AGU_CODIGO) go alter table FICHACAMPO add constraint FK_FichasMargenes foreign key (MAR_CODIGO) references MARGENES (MAR_CODIGO) go alter table FICHACAMPO add constraint FK_FichaF1 foreign key (F1_CODIGO) references PUNTAJEHABITAT (PUN_CODIGO) go alter table FICHACAMPO add constraint FK_FichaF2 foreign key (F2_CODIGO) references PUNTAJEHABITAT (PUN_CODIGO) go alter table FICHACAMPO add constraint FK_FichaF3 foreign key (F3_CODIGO) references PUNTAJEHABITAT (PUN_CODIGO) go alter table FICHACAMPO add constraint FK_FichaF4 foreign key (F4_CODIGO) references PUNTAJEHABITAT (PUN_CODIGO) go alter table FICHACAMPO add constraint FK_FichaF5 foreign key (F5_CODIGO) references PUNTAJEHABITAT (PUN_CODIGO) go alter table FICHACAMPO add constraint FK_FichaV1 foreign key (V1_CODIGO) references PUNTAJEHABITAT (PUN_CODIGO) go alter table FICHACAMPO add constraint FK_FichaV2 foreign key (V2_CODIGO) references PUNTAJEHABITAT (PUN_CODIGO) go alter table FICHACAMPO add constraint FK_FichaV3 foreign key (V3_CODIGO) references PUNTAJEHABITAT (PUN_CODIGO) go
Geovanny Terán
Página 27
Manual Técnico
BACEQ 1.0
alter table FICHACAMPO add constraint FK_FichaV4 foreign key (V4_CODIGO) references PUNTAJEHABITAT (PUN_CODIGO) go alter table FICHACAMPO add constraint FK_FichaV5 foreign key (V5_CODIGO) references PUNTAJEHABITAT (PUN_CODIGO) go alter table FICHACAMPO add constraint FK_FichaG1 foreign key (G1_CODIGO) references PUNTAJEHABITAT (PUN_CODIGO) go alter table FICHACAMPO add constraint FK_FichaG2 foreign key (G2_CODIGO) references PUNTAJEHABITAT (PUN_CODIGO) go alter table FICHACAMPO add constraint FK_FichaG3 foreign key (G3_CODIGO) references PUNTAJEHABITAT (PUN_CODIGO) go alter table FICHACAMPO add constraint FK_FichaG4 foreign key (G4_CODIGO) references PUNTAJEHABITAT (PUN_CODIGO) go alter table FICHACAMPO add constraint FK_FichaG5 foreign key (G5_CODIGO) references PUNTAJEHABITAT (PUN_CODIGO) go alter table FICHACAMPO add constraint FK_FichaG6 foreign key (G6_CODIGO) references PUNTAJEHABITAT (PUN_CODIGO) go alter table FICHACAMPO add constraint FK_FichaG7 foreign key (G7_CODIGO) references PUNTAJEHABITAT (PUN_CODIGO) go alter table FICHACAMPO add constraint FK_FichasCampana foreign key (TIP_CODIGO, CAM_NUMERO) references CAMPANA (TIP_CODIGO, CAM_NUMERO) go alter table FICHACAMPO add constraint FK_CampanaEstacion foreign key (EST_CODIGO) references ESTACION (EST_CODIGO) go alter table FICHACAMPO add constraint FK_FichaPrograma foreign key (PRG_CODIGO) references PROGRAMAS (PRG_CODIGO) Geovanny Terán
Página 28
Manual Técnico
BACEQ 1.0
go alter table FICHACAMPO add constraint FK_FichaHelice foreign key (HEL_CODIGO) references HELICEENCABEZADO (HEL_CODIGO) go
4.11 FisicoQuimico Nombre de columna tip_Codigo cam_Numero fic_Numero qui_Codigo qui_Valor
Tipo de datos Numeric Numeric Numeric Numeric Numeric
Longitud 1 5 5 3 10,3
Permitir valores nulos No No No No Si
Primary Key -
tip_Codigo cam_Numero fic_Numero qui_Codigo
Dependencias Objetos que dependen de FisicoQuimico: Objetos de los que depende FisicoQuimico: - FichaCampo - Quimicos
Código de creación alter table FISICOQUIMICO drop constraint FK_FisicoQuimicoFichas go alter table FISICOQUIMICO drop constraint FK_QuimicosAnalisis go if exists (select 1 from sysindexes where id = object_id('FISICOQUIMICO') and name = 'QUI_CODIGO' and indid > 0 and indid < 255) drop index FISICOQUIMICO.QUI_CODIGO go if exists (select 1 from sysobjects where id = object_id('FISICOQUIMICO') and type = 'U') drop table FISICOQUIMICO Geovanny Terán
Página 29
Manual Técnico
BACEQ 1.0
go /*==============================================================*/ /* Table: FISICOQUIMICO */ /*==============================================================*/ create table FISICOQUIMICO ( TIP_CODIGO numeric(1) not null, CAM_NUMERO numeric(5) not null, FIC_NUMERO numeric(5) not null, QUI_CODIGO numeric(2) not null, QUI_VALOR numeric(10,3) null, constraint PK_FISICOQUIMICO primary key (TIP_CODIGO, CAM_NUMERO, FIC_NUMERO, QUI_CODIGO)) go /*==============================================================*/ /* Index: QUI_CODIGO */ /*==============================================================*/ create unique index QUI_CODIGO on FISICOQUIMICO (TIP_CODIGO, CAM_NUMERO, FIC_NUMERO, QUI_CODIGO) go alter table FISICOQUIMICO add constraint FK_FisicoQuimicoFichas foreign key (TIP_CODIGO, CAM_NUMERO, FIC_NUMERO) references FICHACAMPO (TIP_CODIGO, CAM_NUMERO, FIC_NUMERO) go alter table FISICOQUIMICO add constraint FK_QuimicosAnalisis foreign key (QUI_CODIGO) references QUIMICOS (QUI_CODIGO) go
4.12 Genero Nombre de columna gen_Codigo fam_Codigo gen_Nombre
Tipo de datos Longitud Numeric 3 Numeric 3 Character 20
Permitir valores nulos No No Si
Primary Key -
gen_Codigo
Dependencias Objetos que dependen de Genero: - Invertebrados Objetos de los que depende Genero: - Familia
Geovanny Terán
Página 30
Manual Técnico
BACEQ 1.0
Código de creación alter table GENERO drop constraint FK_FamiliaGenero go alter table INVERTEBRADOS drop constraint FK_GeneroInv go if exists (select 1 from sysindexes where id = object_id('GENERO') and name = 'GEN_CODIGO' and indid > 0 and indid < 255) drop index GENERO.GEN_CODIGO go if exists (select 1 from sysobjects where id = object_id('GENERO') and type = 'U') drop table GENERO go /*==============================================================*/ /* Table: GENERO */ /*==============================================================*/ create table GENERO ( GEN_CODIGO numeric(3) not null, FAM_CODIGO numeric(3) null, GEN_NOMBRE character(30) null, constraint PK_GENERO primary key (GEN_CODIGO)) go /*==============================================================*/ /* Index: GEN_CODIGO */ /*==============================================================*/ create unique index GEN_CODIGO on GENERO (GEN_CODIGO) go alter table GENERO add constraint FK_FamiliaGenero foreign key (FAM_CODIGO) references FAMILIA (FAM_CODIGO) go
4.13 HeliceDetalle Nombre de columna hel_Codigo hel_Vueltas hel_Valor
Geovanny Terán
Tipo de datos Numeric Numeric Numeric
Longitud 2 3 10,4
Permitir valores nulos No No Si
Página 31
Manual Técnico
BACEQ 1.0
Primary Key -
hel_Codigo hel_Vueltas
Dependencias Objetos que dependen de HeliceDetalle: Objetos de los que depende HeliceDetalle: - HeliceEncabezado
Código de creación alter table HELICEDETALLE drop constraint FK_HeliceDetalle go if exists (select 1 from sysindexes where id = object_id('HELICEDETALLE') and name = 'HEL_VUELTAS' and indid > 0 and indid < 255) drop index HELICEDETALLE.HEL_VUELTAS go if exists (select 1 from sysobjects where id = object_id('HELICEDETALLE') and type = 'U') drop table HELICEDETALLE go /*==============================================================*/ /* Table: HELICEDETALLE */ /*==============================================================*/ create table HELICEDETALLE ( HEL_CODIGO numeric(2) not null, HEL_VUELTAS numeric(3) not null, HEL_VALOR numeric(10,4) null, constraint PK_HELICEDETALLE primary key (HEL_CODIGO, HEL_VUELTAS)) go /*==============================================================*/ /* Index: HEL_VUELTAS */ /*==============================================================*/ create unique index HEL_VUELTAS on HELICEDETALLE (HEL_CODIGO, HEL_VUELTAS) go alter table HELICEDETALLE add constraint FK_HeliceDetalle foreign key (HEL_CODIGO) references HELICEENCABEZADO (HEL_CODIGO) go
Geovanny Terán
Página 32
Manual Técnico
BACEQ 1.0
4.14 HeliceEncabezado Nombre de columna hel_Codigo hel_Nombre
Tipo de datos Longitud Numeric 2 Character 20
Permitir valores nulos No Si
Primary Key -
hel_Codigo
Dependencias Objetos que dependen de HeliceEncabezado: - FichaCampo - Morfologia_Regleta - HeliceDetalle Objetos de los que depende HeliceEncabezado:
Código de creación alter table HELICEDETALLE drop constraint FK_HeliceDetalle go alter table FICHACAMPO drop constraint FK_FichaHelice go alter table MORFOLOGIA_REGLETA drop constraint FK_MorfologiaHelice go if exists (select 1 from sysindexes where id = object_id('HELICEENCABEZADO') and name = 'HEL_CODIGO' and indid > 0 and indid < 255) drop index HELICEENCABEZADO.HEL_CODIGO go if exists (select 1 from sysobjects where id = object_id('HELICEENCABEZADO') and type = 'U') drop table HELICEENCABEZADO go /*==============================================================*/ /* Table: HELICEENCABEZADO */ /*==============================================================*/ create table HELICEENCABEZADO ( HEL_CODIGO numeric(2) not null, HEL_NOMBRE character(20) null, constraint PK_HELICEENCABEZADO primary key (HEL_CODIGO)) go Geovanny Terán
Página 33
Manual Técnico
BACEQ 1.0
/*==============================================================*/ /* Index: HEL_CODIGO */ /*==============================================================*/ create unique index HEL_CODIGO on HELICEENCABEZADO (HEL_CODIGO) go
4.15 Invertebrados Nombre de columna inv_Codigo gen_Codigo inv_Nombre inv_Foto inv_Frasco inv_Comentario
Tipo de datos Numeric Numeric Character Imagen Character Text
Longitud 5 3 30 16 10 16
Permitir valores nulos No No Si Si Si Si
Primary Key -
inv_Codigo
Dependencias Objetos que dependen de Invertebrados: - Taxa Objetos de los que depende Invertebrados: - Genero
Código de creación alter table INVERTEBRADOS drop constraint FK_GeneroInv go alter table TAXA drop constraint FK_TaxaInvertebrados go if exists (select 1 from sysindexes where id = object_id('INVERTEBRADOS') and name = 'INV_CODIGO' and indid > 0 and indid < 255) drop index INVERTEBRADOS.INV_CODIGO go if exists (select 1 from sysobjects where id = object_id('INVERTEBRADOS') and type = 'U') drop table INVERTEBRADOS go Geovanny Terán
Página 34
Manual Técnico
BACEQ 1.0
/*==============================================================*/ /* Table: INVERTEBRADOS */ /*==============================================================*/ create table INVERTEBRADOS ( INV_CODIGO numeric(5) not null, GEN_CODIGO numeric(3) null, INV_NOMBRE character(30) null, INV_FOTO image null, INV_FRASCO character(20) null, INV_COMENTARIO text null, constraint PK_INVERTEBRADOS primary key (INV_CODIGO)) go /*==============================================================*/ /* Index: INV_CODIGO */ /*==============================================================*/ create unique index INV_CODIGO on INVERTEBRADOS (INV_CODIGO) go alter table INVERTEBRADOS add constraint FK_GeneroInv foreign key (GEN_CODIGO) references GENERO (GEN_CODIGO) go
4.16 Lluvia Nombre de columna llu_Codigo llu_Nombre
Tipo de datos Numeric Character
Longitud 1 10
Permitir valores nulos No Si
Primary Key -
llu_Codigo
Dependencias Objetos que dependen de Lluvia: - FichaCampo Objetos de los que depende Lluvia:
Código de creación alter table FICHACAMPO drop constraint "FK_Campana-Lluvia" go if exists (select 1 from sysindexes where id = object_id('LLUVIA') and name = 'LLU_CODIGO' and indid > 0 and indid < 255) drop index LLUVIA.LLU_CODIGO go Geovanny Terán
Página 35
Manual Técnico
BACEQ 1.0
if exists (select 1 from sysobjects where id = object_id('LLUVIA') and type = 'U') drop table LLUVIA go /*==============================================================*/ /* Table: LLUVIA */ /*==============================================================*/ create table LLUVIA ( LLU_CODIGO numeric(1) not null, LLU_NOMBRE character(10) null, constraint PK_LLUVIA primary key (LLU_CODIGO)) go /*==============================================================*/ /* Index: LLU_CODIGO */ /*==============================================================*/ create unique index LLU_CODIGO on LLUVIA (LLU_CODIGO) go
4.17 Lluvia24 Nombre de columna l24_Codigo l24_Nombre
Tipo de datos Numeric Character
Longitud 1 10
Permitir valores nulos No Si
Primary Key -
llu_Codigo
Dependencias Objetos que dependen de Lluvia24: - FichaCampo Objetos de los que depende Lluvia24:
Código de creación alter table FICHACAMPO drop constraint "FK_Campana-Lluvia24" go if exists (select 1 from sysindexes where id = object_id('LLUVIA24') and name = 'L24_CODIGO' and indid > 0 and indid < 255) drop index LLUVIA24.L24_CODIGO go if exists (select 1 Geovanny Terán
Página 36
Manual Técnico
BACEQ 1.0
from sysobjects where id = object_id('LLUVIA24') and type = 'U') drop table LLUVIA24 go /*==============================================================*/ /* Table: LLUVIA24 */ /*==============================================================*/ create table LLUVIA24 ( L24_CODIGO numeric(1) not null, L24_NOMBRE character(10) null, constraint PK_LLUVIA24 primary key (L24_CODIGO)) go /*==============================================================*/ /* Index: L24_CODIGO */ /*==============================================================*/ create unique index L24_CODIGO on LLUVIA24 (L24_CODIGO) go
4.18 Margenes Nombre de columna mar_Codigo mar_Nombre
Tipo de datos Numeric Character
Longitud 1 20
Permitir valores nulos No Si
Primary Key -
llu_Codigo
Dependencias Objetos que dependen de Margenes: - FichaCampo Objetos de los que depende Margenes:
Código de creación alter table FICHACAMPO drop constraint FK_FichasMargenes go if exists (select 1 from sysindexes where id = object_id('MARGENES') and name = 'MAR_CODIGO' and indid > 0 and indid < 255) drop index MARGENES.MAR_CODIGO go if exists (select 1 from sysobjects where id = object_id('MARGENES') Geovanny Terán
Página 37
Manual Técnico
BACEQ 1.0
and type = 'U') drop table MARGENES go /*==============================================================*/ /* Table: MARGENES */ /*==============================================================*/ create table MARGENES ( MAR_CODIGO numeric(1) not null, MAR_NOMBRE character(10) null, constraint PK_MARGENES primary key (MAR_CODIGO)) go /*==============================================================*/ /* Index: MAR_CODIGO */ /*==============================================================*/ create unique index MAR_CODIGO on MARGENES (MAR_CODIGO) go
4.19 Morfologia_Caudal Nombre de columna tip_Codigo cam_Numero mor_Numero tra_Numero ver_Numero ver_Distancia ver_Profundidad ver_DistFondo1 ver_Vueltas1 ver_Velocidad1 ver_DistFondo2 ver_Vueltas2 ver_Velocidad2 ver_DistFondo3 ver_Vueltas3 ver_Velocidad3 ver_DistFondo4 ver_Vueltas4 ver_Velocidad4 ver_DistFondo5 ver_Vueltas5 ver_Velocidad5 ver_DistFondo6 ver_Vueltas6 ver_Velocidad6 ver_Observaciones
Geovanny Terán
Tipo de datos Numeric Numeric Numeric Numeric Numeric Numeric Numeric Numeric Numeric Numeric Numeric Numeric Numeric Numeric Numeric Numeric Numeric Numeric Numeric Numeric Numeric Numeric Numeric Numeric Numeric Text
Longitud 1 5 2 2 2 8,2 3 3 3 7,4 3 3 7,4 3 3 7,4 3 3 7,4 3 3 7,4 3 3 7,4 16
Permitir valores nulos No No No No No Si Si Si Si Si Si Si Si Si Si Si Si Si Si Si Si Si Si Si Si Si
Página 38
Manual Técnico
BACEQ 1.0
Primary Key -
tip_Codigo cam_Numero mor_Numero tra_Numero ver_Numero
Dependencias Objetos que dependen de Morfologia_Caudal: Objetos de los que depende Morfologia_Caudal: - Morfologia_Topografia
Código de creación alter table MORFOLOGIA_CAUDAL drop constraint FK_MorfologiaCaudal go if exists (select 1 from sysindexes where id = object_id('MORFOLOGIA_CAUDAL') and name = 'VER_NUMERO' and indid > 0 and indid < 255) drop index MORFOLOGIA_CAUDAL.VER_NUMERO go if exists (select 1 from sysobjects where id = object_id('MORFOLOGIA_CAUDAL') and type = 'U') drop table MORFOLOGIA_CAUDAL go /*==============================================================*/ /* Table: MORFOLOGIA_CAUDAL */ /*==============================================================*/ create table MORFOLOGIA_CAUDAL ( TIP_CODIGO numeric(1) not null, CAM_NUMERO numeric(5) not null, MOR_NUMERO numeric(2) not null, TRA_NUMERO numeric(2) not null, VER_NUMERO numeric(2) not null, VER_DISTANCIA numeric(8,2) null, VER_PROFUNDIDAD numeric(3) null, VER_DISTFONDO1 numeric(3) null, VER_VUELTAS1 numeric(3) null, VER_VELOCIDAD1 numeric(7,4) null, VER_DISTFONDO2 numeric(3) null, VER_VUELTAS2 numeric(3) null, VER_VELOCIDAD2 numeric(7,4) null, VER_DISTFONDO3 numeric(3) null, VER_VUELTAS3 numeric(3) null, VER_VELOCIDAD3 numeric(7,4) null, VER_DISTFONDO4 numeric(3) null, VER_VUELTAS4 numeric(3) null, Geovanny Terán
Página 39
Manual Técnico
BACEQ 1.0
VER_VELOCIDAD4 numeric(7,4) null, VER_DISTFONDO5 numeric(3) null, VER_VUELTAS5 numeric(3) null, VER_VELOCIDAD5 numeric(7,4) null, VER_DISTFONDO6 numeric(3) null, VER_VUELTAS6 numeric(3) null, VER_VELOCIDAD6 numeric(7,4) null, VER_OBSERVACIONES text null, constraint PK_MORFOLOGIA_CAUDAL primary key (TIP_CODIGO, CAM_NUMERO, MOR_NUMERO, TRA_NUMERO, VER_NUMERO)) go /*==============================================================*/ /* Index: VER_NUMERO */ /*==============================================================*/ create unique index VER_NUMERO on MORFOLOGIA_CAUDAL (TIP_CODIGO, CAM_NUMERO, MOR_NUMERO, TRA_NUMERO, VER_NUMERO) go alter table MORFOLOGIA_CAUDAL add constraint FK_MorfologiaCaudal foreign key (TIP_CODIGO, CAM_NUMERO, MOR_NUMERO, TRA_NUMERO) references MORFOLOGIA_TOPOGRAFIA (TIP_CODIGO, CAM_NUMERO, MOR_NUMERO, TRA_NUMERO) go
4.20 Morfologia_Regleta Nombre de columna tip_Codigo cam_Numero mor_Numero est_Codigo mor_Fecha reg_NivelAgua reg_Bajo reg_Medio reg_Alto reg_Azimut reg_Medio-Bajo reg_Alto-Medio reg_SumDiferencias reg_Archivo prg_Codigo hel_Codigo reg_Observaciones
Tipo de datos Numeric Numeric Numeric Character Datetime Numeric Numeric Numeric Numeric Numeric Numeric Numeric Numeric Character Character Numeric Texto
Longitud 1 5 2 4 8 8,2 8,2 8,2 8,2 8,2 8,2 8,2 8,2 200 20 2 16
Permitir valores nulos No No No No Si Si Si Si Si Si Si Si Si Si Si No Si
Primary Key -
tip_Codigo cam_Numero mor_Numero
Geovanny Terán
Página 40
Manual Técnico
BACEQ 1.0
Dependencias Objetos que dependen de Morfologia_Regleta: - Morfologia_Topografia Objetos de los que depende Morfologia_ Regleta: - Campaña - Estacion - HeliceEncabezado - Programas
Código de creación alter table MORFOLOGIA_REGLETA drop constraint FK_MorfologiaCampana go alter table MORFOLOGIA_REGLETA drop constraint FK_MorfologiaEstacion go alter table MORFOLOGIA_REGLETA drop constraint FK_MorfologiaPrograma go alter table MORFOLOGIA_REGLETA drop constraint FK_MorfologiaHelice go alter table MORFOLOGIA_TOPOGRAFIA drop constraint FK_MorfologiaTopografia go if exists (select 1 from sysindexes where id = object_id('MORFOLOGIA_REGLETA') and name = 'MOR_NUMERO' and indid > 0 and indid < 255) drop index MORFOLOGIA_REGLETA.MOR_NUMERO go if exists (select 1 from sysobjects where id = object_id('MORFOLOGIA_REGLETA') and type = 'U') drop table MORFOLOGIA_REGLETA go /*==============================================================*/ /* Table: MORFOLOGIA_REGLETA */ /*==============================================================*/ create table MORFOLOGIA_REGLETA ( TIP_CODIGO numeric(1) not null, CAM_NUMERO numeric(5) not null, MOR_NUMERO numeric(2) not null, EST_CODIGO character(4) null, Geovanny Terán
Página 41
Manual Técnico
BACEQ 1.0
MOR_FECHA datetime null, REG_NIVELAGUA numeric(8,2) null, REG_BAJO numeric(8,2) null, REG_MEDIO numeric(8,2) null, REG_ALTO numeric(8,2) null, REG_AZIMUT numeric(8,2) null, REG_MEDIO_BAJO numeric(8,2) null, REG_ALTO_MEDIO numeric(8,2) null, REG_SUMDIFERENCIAS numeric(8,2) null, REG_ARCHIVO character(200) null, PRG_CODIGO character(20) null, HEL_CODIGO numeric(2) null, REG_OBSERVACIONES text null, constraint PK_MORFOLOGIA_REGLETA primary key (TIP_CODIGO, CAM_NUMERO, MOR_NUMERO)) go /*==============================================================*/ /* Index: MOR_NUMERO */ /*==============================================================*/ create unique index MOR_NUMERO on MORFOLOGIA_REGLETA (TIP_CODIGO, CAM_NUMERO, MOR_NUMERO) go alter table MORFOLOGIA_REGLETA add constraint FK_MorfologiaCampana foreign key (TIP_CODIGO, CAM_NUMERO) references CAMPANA (TIP_CODIGO, CAM_NUMERO) go alter table MORFOLOGIA_REGLETA add constraint FK_MorfologiaEstacion foreign key (EST_CODIGO) references ESTACION (EST_CODIGO) go alter table MORFOLOGIA_REGLETA add constraint FK_MorfologiaPrograma foreign key (PRG_CODIGO) references PROGRAMAS (PRG_CODIGO) go alter table MORFOLOGIA_REGLETA add constraint FK_MorfologiaHelice foreign key (HEL_CODIGO) references HELICEENCABEZADO (HEL_CODIGO) go
4.21 Morfologia_Topografia Nombre de columna tip_Codigo cam_Numero mor_Numero tra_Numero tra_Aforo tra_DistanciaRI tra_DistanciaRD Geovanny Terán
Tipo de datos Numeric Numeric Numeric Numeric Bit Numeric Numeric
Longitud 1 5 2 2 1 8,2 8,2
Permitir valores nulos No No No No Si Si Si Página 42
Manual Técnico tra_NivelAgua tra_BajoRD tra_BajoINT tra_BajoRI tra_MedioRD tra_MedioINT tra_MedioRI tra_AltoRD tra_AltoINT tra_AltoRI tra_AzimutRD tra_AzimutINT tra_AzimutRI tra_Medio-BajoRD tra_Medio-BajoINT tra_Medio-BajoRI tra_Alto-MedioRD tra_Alto-MedioINT tra_Alto-MedioRI tra_A-M_M-B_RD tra_A-M_M-B_INT tra_A-M_M-B_RI tra_Observaciones
BACEQ 1.0
Numeric Numeric Numeric Numeric Numeric Numeric Numeric Numeric Numeric Numeric Numeric Numeric Numeric Numeric Numeric Numeric Numeric Numeric Numeric Numeric Numeric Numeric Numeric
8,2 8,2 8,2 8,2 8,2 8,2 8,2 8,2 8,2 8,2 3 3 3 8,2 8,2 8,2 8,2 8,2 8,2 8,2 8,2 8,2 16
Si Si Si Si Si Si Si Si Si Si Si Si Si Si Si Si Si Si Si Si Si Si Si
Primary Key -
tip_Codigo cam_Numero mor_Numero tra_Numero
Dependencias Objetos que dependen de Morfologia_Topografia: - Morfologia_Caudal Objetos de los que depende Morfologia_ Topografia: - Morfologia_Regleta
Código de creación alter table MORFOLOGIA_TOPOGRAFIA drop constraint FK_MorfologiaTopografia go alter table MORFOLOGIA_CAUDAL drop constraint FK_MorfologiaCaudal go if exists (select 1 from sysindexes where id = object_id('MORFOLOGIA_TOPOGRAFIA') and name = 'TRA_NUMERO' and indid > 0 Geovanny Terán
Página 43
Manual Técnico
BACEQ 1.0
and indid < 255) drop index MORFOLOGIA_TOPOGRAFIA.TRA_NUMERO go if exists (select 1 from sysobjects where id = object_id('MORFOLOGIA_TOPOGRAFIA') and type = 'U') drop table MORFOLOGIA_TOPOGRAFIA go /*==============================================================*/ /* Table: MORFOLOGIA_TOPOGRAFIA */ /*==============================================================*/ create table MORFOLOGIA_TOPOGRAFIA ( TIP_CODIGO numeric(1) not null, CAM_NUMERO numeric(5) not null, MOR_NUMERO numeric(2) not null, TRA_NUMERO numeric(2) not null, TRA_AFORO bit null, TRA_DISTANCIARI numeric(8,2) null, TRA_DISTANCIARD numeric(8,2) null, TRA_NIVELAGUA numeric(8,2) null, TRA_BAJORD numeric(8,2) null, TRA_BAJOINT numeric(8,2) null, TRA_BAJORI numeric(8,2) null, TRA_MEDIORD numeric(8,2) null, TRA_MEDIOINT numeric(8,2) null, TRA_MEDIORI numeric(8,2) null, TRA_ALTORD numeric(8,2) null, TRA_ALTOINT numeric(8,2) null, TRA_ALTORI numeric(8,2) null, TRA_AZIMUTRD numeric(3) null, TRA_AZIMUTINT numeric(3) null, TRA_AZIMUTRI numeric(3) null, TRA_MEDIO_BAJORD numeric(8,2) null, TRA_MEDIO_BAJOINT numeric(8,2) null, TRA_MEDIO_BAJORI numeric(8,2) null, TRA_ALTO_MEDIORD numeric(8,2) null, TRA_ALTO_MEDIOINT numeric(8,2) null, TRA_ALTO_MEDIORI numeric(8,2) null, TRA_A_M_M_B_RD numeric(8,2) null, TRA_A_M_M_B_INT numeric(8,2) null, TRA_A_M_M_B_RI numeric(8,2) null, TRA_OBSERVACIONES text null, constraint PK_MORFOLOGIA_TOPOGRAFIA primary key (TIP_CODIGO, CAM_NUMERO, MOR_NUMERO, TRA_NUMERO)) go /*==============================================================*/ /* Index: TRA_NUMERO */ /*==============================================================*/ create unique index TRA_NUMERO on MORFOLOGIA_TOPOGRAFIA (TIP_CODIGO, CAM_NUMERO, MOR_NUMERO, TRA_NUMERO) go alter table MORFOLOGIA_TOPOGRAFIA add constraint FK_MorfologiaTopografia foreign key (TIP_CODIGO, CAM_NUMERO, Geovanny Terán
Página 44
Manual Técnico
BACEQ 1.0
MOR_NUMERO) references MORFOLOGIA_REGLETA (TIP_CODIGO, CAM_NUMERO, MOR_NUMERO) go
4.22 Nubocidad Nombre de columna nub_Codigo nub_Nombre
Tipo de datos Numeric Character
Longitud 1 10
Permitir valores nulos No Si
Primary Key -
nub_Codigo
Dependencias Objetos que dependen de Nubocidad: - FichaCampo Objetos de los que depende Nubocidad:
Código de creación alter table FICHACAMPO drop constraint "FK_Campana-Nubocidad" go if exists (select 1 from sysindexes where id = object_id('NUBOCIDAD') and name = 'NUB_CODIGO' and indid > 0 and indid < 255) drop index NUBOCIDAD.NUB_CODIGO go if exists (select 1 from sysobjects where id = object_id('NUBOCIDAD') and type = 'U') drop table NUBOCIDAD go /*==============================================================*/ /* Table: NUBOCIDAD */ /*==============================================================*/ create table NUBOCIDAD ( NUB_CODIGO numeric(1) not null, NUB_NOMBRE character(10) null, constraint PK_NUBOCIDAD primary key (NUB_CODIGO)) go /*==============================================================*/ /* Index: NUB_CODIGO */ /*==============================================================*/ Geovanny Terán
Página 45
Manual Técnico
BACEQ 1.0
create unique index NUB_CODIGO on NUBOCIDAD (NUB_CODIGO) go
4.23 Observadores Nombre de columna obs_Codigo obs_Nombre
Tipo de datos Numeric Character
Longitud 2 40
Permitir valores nulos No Si
Primary Key -
obs_Codigo
Dependencias Objetos que dependen de Nubocidad: - FichaCampo - ObservadoresCampana Objetos de los que depende Nubocidad:
Código de creación alter table FICHACAMPO drop constraint FK_ObservadorFicha go alter table OBSERVADORESCAMPANA drop constraint FK_Observadores go if exists (select 1 from sysindexes where id = object_id('OBSERVADORES') and name = 'OBS_CODIGO' and indid > 0 and indid < 255) drop index OBSERVADORES.OBS_CODIGO go if exists (select 1 from sysobjects where id = object_id('OBSERVADORES') and type = 'U') drop table OBSERVADORES go /*==============================================================*/ /* Table: OBSERVADORES */ /*==============================================================*/ create table OBSERVADORES ( OBS_CODIGO numeric(2) not null, OBS_NOMBRE character(40) null, constraint PK_OBSERVADORES primary key (OBS_CODIGO)) go
Geovanny Terán
Página 46
Manual Técnico
BACEQ 1.0
/*==============================================================*/ /* Index: OBS_CODIGO */ /*==============================================================*/ create unique index OBS_CODIGO on OBSERVADORES (OBS_CODIGO) go
4.24 ObservadoresCampana Nombre de columna obs_Codigo tip_Codigo cam_Numero
Tipo de datos Numeric Numeric Numeric
Longitud 2 1 5
Permitir valores nulos No No No
Primary Key -
obs_Codigo tip_Codigo cam_Numero
Dependencias Objetos que dependen de Nubocidad: - Campana - Observadores Objetos de los que depende Nubocidad:
Código de creación alter table OBSERVADORESCAMPANA drop constraint FK_Observadores go alter table OBSERVADORESCAMPANA drop constraint FK_Campana go if exists (select 1 from sysindexes where id = object_id('OBSERVADORESCAMPANA') and name = 'OBSCAM' and indid > 0 and indid < 255) drop index OBSERVADORESCAMPANA.OBSCAM go if exists (select 1 from sysobjects where id = object_id('OBSERVADORESCAMPANA') and type = 'U') drop table OBSERVADORESCAMPANA go /*==============================================================*/ /* Table: OBSERVADORESCAMPANA */ Geovanny Terán
Página 47
Manual Técnico
BACEQ 1.0
/*==============================================================*/ create table OBSERVADORESCAMPANA ( OBS_CODIGO numeric(2) not null, TIP_CODIGO numeric(1) not null, CAM_NUMERO numeric(5) not null, constraint PK_OBSERVADORESCAMPANA primary key (TIP_CODIGO, OBS_CODIGO, CAM_NUMERO)) /*==============================================================*/ /* Index: OBSCAM */ /*==============================================================*/ create unique index OBSCAM on OBSERVADORESCAMPANA (TIP_CODIGO, OBS_CODIGO, CAM_NUMERO) go alter table OBSERVADORESCAMPANA add constraint FK_Observadores foreign key (OBS_CODIGO) references OBSERVADORES (OBS_CODIGO) go alter table OBSERVADORESCAMPANA add constraint FK_Campana foreign key (TIP_CODIGO, CAM_NUMERO) references CAMPANA (TIP_CODIGO, CAM_NUMERO) go
4.25 Orden Nombre de columna ord_Codigo scl_Codigo ord_Nombre
Tipo de datos Numeric Numeric Character
Longitud 3 3 20
Permitir valores nulos No No Si
Primary Key -
ord_Codigo
Dependencias Objetos que dependen de Orden: - Familia Objetos de los que depende Orden: - SubClase
Código de creación alter table ORDEN drop constraint FK_SubcOrden go alter table FAMILIA drop constraint FK_OrdenFamilia go if exists (select 1 from sysindexes Geovanny Terán
Página 48
Manual Técnico
BACEQ 1.0
where id = object_id('ORDEN') and name = 'ORD_CODIGO' and indid > 0 and indid < 255) drop index ORDEN.ORD_CODIGO go if exists (select 1 from sysobjects where id = object_id('ORDEN') and type = 'U') drop table ORDEN go /*==============================================================*/ /* Table: ORDEN */ /*==============================================================*/ create table ORDEN ( ORD_CODIGO numeric(3) not null, SCL_CODIGO numeric(3) null, ORD_NOMBRE character(20) null, constraint PK_ORDEN primary key (ORD_CODIGO)) go /*==============================================================*/ /* Index: ORD_CODIGO */ /*==============================================================*/ create unique index ORD_CODIGO on ORDEN (ORD_CODIGO) go alter table ORDEN add constraint FK_SubcOrden foreign key (SCL_CODIGO) references SUBCLASE (SCL_CODIGO) go
4.26 Parametros Nombre de columna RutaDoc
Tipo de datos Character
Longitud 200
Permitir valores nulos Si
Primary Key Dependencias Objetos que dependen de Parametros: Objetos de los que depende Parametros:
Código de creación if exists (select 1 from sysobjects where id = object_id('PARAMETROS') and type = 'U') drop table PARAMETROS go Geovanny Terán
Página 49
Manual Técnico
BACEQ 1.0
/*==============================================================*/ /* Table: PARAMETROS */ /*==============================================================*/ create table PARAMETROS ( RUTADOC character(200) null) go
4.27 Phylum Nombre de columna phy_Codigo phy_Nombre
Tipo de datos Numeric Character
Longitud 3 20
Permitir valores nulos No Si
Primary Key -
Phy_Codigo
Dependencias Objetos que dependen de Phylum: - Clase Objetos de los que depende Phylum:
Código de creación alter table CLASE drop constraint FK_PhylumClase go if exists (select 1 from sysindexes where id = object_id('PHYLUM') and name = 'PHY_CODIGO' and indid > 0 and indid < 255) drop index PHYLUM.PHY_CODIGO go if exists (select 1 from sysobjects where id = object_id('PHYLUM') and type = 'U') drop table PHYLUM go /*==============================================================*/ /* Table: PHYLUM */ /*==============================================================*/ create table PHYLUM ( PHY_CODIGO numeric(3) not null, PHY_NOMBRE character(20) null, constraint PK_PHYLUM primary key (PHY_CODIGO)) go Geovanny Terán
Página 50
Manual Técnico
BACEQ 1.0
/*==============================================================*/ /* Index: PHY_CODIGO */ /*==============================================================*/ create unique index PHY_CODIGO on PHYLUM (PHY_CODIGO) go
4.28 Plantillas Nombre de columna pla_Numero pla_Nombre pla_Archivo prg_Codigo
Tipo de datos Numeric Character Character Character
Longitud 2 50 200 20
Permitir valores nulos No Si Si Si
Primary Key -
pla_Numero
Dependencias Objetos que dependen de Plantillas: Objetos de los que depende Plantillas: - Programas
Código de creación alter table PLANTILLAS drop constraint FK_PlantillaPrg go if exists (select 1 from sysindexes where id = object_id('PLANTILLAS') and name = 'PLA_NUMERO' and indid > 0 and indid < 255) drop index PLANTILLAS.PLA_NUMERO go if exists (select 1 from sysobjects where id = object_id('PLANTILLAS') and type = 'U') drop table PLANTILLAS go /*==============================================================*/ /* Table: PLANTILLAS */ /*==============================================================*/ create table PLANTILLAS ( PLA_NUMERO numeric(2) not null, PLA_NOMBRE character(50) null, PLA_ARCHIVO character(200) null, Geovanny Terán
Página 51
Manual Técnico
BACEQ 1.0
PRG_CODIGO character(20) null, constraint PK_PLANTILLAS primary key (PLA_NUMERO)) go /*==============================================================*/ /* Index: PLA_NUMERO */ /*==============================================================*/ create unique index PLA_NUMERO on PLANTILLAS (PLA_NUMERO) go alter table PLANTILLAS add constraint FK_PlantillaPrg foreign key (PRG_CODIGO) references PROGRAMAS (PRG_CODIGO) go
4.29 Profundidad Nombre de columna pro_Codigo pro_Nombre
Tipo de datos Numeric Character
Longitud 1 10
Permitir valores nulos No Si
Primary Key -
pro_Codigo
Dependencias Objetos que dependen de Plantillas: - FichaCampo Objetos de los que depende Plantillas:
Código de creación alter table FICHACAMPO drop constraint FK_FichaProfundidad go if exists (select 1 from sysindexes where id = object_id('PROFUNDIDAD') and name = 'PRO_CODIGO' and indid > 0 and indid < 255) drop index PROFUNDIDAD.PRO_CODIGO go if exists (select 1 from sysobjects where id = object_id('PROFUNDIDAD') and type = 'U') drop table PROFUNDIDAD go /*==============================================================*/ /* Table: PROFUNDIDAD */ Geovanny Terán
Página 52
Manual Técnico
BACEQ 1.0
/*==============================================================*/ create table PROFUNDIDAD ( PRO_CODIGO numeric(1) not null, PRO_NOMBRE character(10) null, constraint PK_PROFUNDIDAD primary key (PRO_CODIGO)) go /*==============================================================*/ /* Index: PRO_CODIGO */ /*==============================================================*/ create unique index PRO_CODIGO on PROFUNDIDAD (PRO_CODIGO) go
4.30 Programas Nombre de columna prg_Codigo prg_Nombre prg_Ruta
Tipo de datos Character Character Character
Longitud 20 50 200
Permitir valores nulos No Si Si
Primary Key -
prg_Codigo
Dependencias Objetos que dependen de Plantillas: - FichaCampo - Morfologia_Regleta - Plantillas - Protocolos - Publicaciones Objetos de los que depende Plantillas:
Código de creación alter table PUBLICACIONES drop constraint FK_PublicacionPrg go alter table PROTOCOLOS drop constraint FK_ProtocoloPrg go alter table PLANTILLAS drop constraint FK_PlantillaPrg go alter table FICHACAMPO drop constraint FK_FichaPrograma go alter table MORFOLOGIA_REGLETA drop constraint FK_MorfologiaPrograma go Geovanny Terán
Página 53
Manual Técnico
BACEQ 1.0
if exists (select 1 from sysindexes where id = object_id('PROGRAMAS') and name = 'PRG_CODIGO' and indid > 0 and indid < 255) drop index PROGRAMAS.PRG_CODIGO go if exists (select 1 from sysobjects where id = object_id('PROGRAMAS') and type = 'U') drop table PROGRAMAS go /*==============================================================*/ /* Table: PROGRAMAS */ /*==============================================================*/ create table PROGRAMAS ( PRG_CODIGO character(20) not null, PRG_NOMBRE character(50) null, PRG_RUTA character(200) null, constraint PK_PROGRAMAS primary key (PRG_CODIGO)) go /*==============================================================*/ /* Index: PRG_CODIGO */ /*==============================================================*/ create unique index PRG_CODIGO on PROGRAMAS (PRG_CODIGO) go
4.31 Protocolos Nombre de columna pro_Numero pro_Nombre pro_Archivo prg_Codigo
Tipo de datos Numeric Character Character Character
Longitud 2 50 200 20
Permitir valores nulos No Si Si No
Primary Key -
pro_Numero
Dependencias Objetos que dependen de Protocolos: Objetos de los que depende Protocolos: - Programas
Código de creación alter table PROTOCOLOS drop constraint FK_ProtocoloPrg Geovanny Terán
Página 54
Manual Técnico
BACEQ 1.0
go if exists (select 1 from sysindexes where id = object_id('PROTOCOLOS') and name = 'PRO_NUMERO' and indid > 0 and indid < 255) drop index PROTOCOLOS.PRO_NUMERO go if exists (select 1 from sysobjects where id = object_id('PROTOCOLOS') and type = 'U') drop table PROTOCOLOS go /*==============================================================*/ /* Table: PROTOCOLOS */ /*==============================================================*/ create table PROTOCOLOS ( PRO_NUMERO numeric(2) not null, PRO_NOMBRE character(50) null, PRO_ARCHIVO character(200) null, PRG_CODIGO character(20) null, constraint PK_PROTOCOLOS primary key (PRO_NUMERO)) go /*==============================================================*/ /* Index: PRO_NUMERO */ /*==============================================================*/ create unique index PRO_NUMERO on PROTOCOLOS (PRO_NUMERO) go alter table PROTOCOLOS add constraint FK_ProtocoloPrg foreign key (PRG_CODIGO) references PROGRAMAS (PRG_CODIGO) go
4.32 Publicaciones Nombre de columna pub_Numero pub_Nombre pub_Autor1 pub_Autor2 pub_anio pub_periodico pub_KeyWord pub_Archivo prg_Codigo
Geovanny Terán
Tipo de datos Numeric Character Character Character Numeric Character Character Character Character
Longitud 2 50 50 50 4 20 100 200 20
Permitir valores nulos No Si Si Si Si Si Si Si No
Página 55
Manual Técnico
BACEQ 1.0
Primary Key -
pub_Numero
Dependencias Objetos que dependen de Publicaciones: Objetos de los que depende Publicaciones: - Programas
Código de creación alter table PUBLICACIONES drop constraint FK_PublicacionPrg go if exists (select 1 from sysindexes where id = object_id('PUBLICACIONES') and name = 'PUB_NUMERO' and indid > 0 and indid < 255) drop index PUBLICACIONES.PUB_NUMERO go if exists (select 1 from sysobjects where id = object_id('PUBLICACIONES') and type = 'U') drop table PUBLICACIONES go /*==============================================================*/ /* Table: PUBLICACIONES */ /*==============================================================*/ create table PUBLICACIONES ( PUB_NUMERO numeric(2) not null, PUB_NOMBRE character(50) null, PUB_AUTOR1 character(50) null, PUB_AUTOR2 character(50) null, PUB_ANIO numeric(4) null, PUB_PERIODICO character(20) null, PUB_KEYWORD character(100) null, PUB_ARCHIVO character(200) null, PRG_CODIGO character(20) null, constraint PK_PUBLICACIONES primary key (PUB_NUMERO)) go /*==============================================================*/ /* Index: PUB_NUMERO */ /*==============================================================*/ create unique index PUB_NUMERO on PUBLICACIONES (PUB_NUMERO) go alter table PUBLICACIONES add constraint FK_PublicacionPrg foreign key (PRG_CODIGO) Geovanny Terán
Página 56
Manual Técnico
BACEQ 1.0
references PROGRAMAS (PRG_CODIGO) go
4.33 PuntajeHabitat Nombre de columna pun_Codigo pin_Nombre
Tipo de datos Numeric Character
Longitud 1 15
Permitir valores nulos No Si
Primary Key -
pun_Codigo
Dependencias Objetos que dependen de PuntajeHabitat: - FichaCampo Objetos de los que depende PuntajeHabitat:
Código de creación alter table FICHACAMPO drop constraint FK_FichaF1 go alter table FICHACAMPO drop constraint FK_FichaF2 go alter table FICHACAMPO drop constraint FK_FichaF3 go alter table FICHACAMPO drop constraint FK_FichaF4 go alter table FICHACAMPO drop constraint FK_FichaF5 go alter table FICHACAMPO drop constraint FK_FichaV1 go alter table FICHACAMPO drop constraint FK_FichaV2 go alter table FICHACAMPO drop constraint FK_FichaV3 go alter table FICHACAMPO drop constraint FK_FichaV4 Geovanny Terán
Página 57
Manual Técnico
BACEQ 1.0
go alter table FICHACAMPO drop constraint FK_FichaV5 go alter table FICHACAMPO drop constraint FK_FichaG1 go alter table FICHACAMPO drop constraint FK_FichaG2 go alter table FICHACAMPO drop constraint FK_FichaG3 go alter table FICHACAMPO drop constraint FK_FichaG4 go alter table FICHACAMPO drop constraint FK_FichaG5 go alter table FICHACAMPO drop constraint FK_FichaG6 go alter table FICHACAMPO drop constraint FK_FichaG7 go if exists (select 1 from sysindexes where id = object_id('PUNTAJEHABITAT') and name = 'PUN_CODIGO' and indid > 0 and indid < 255) drop index PUNTAJEHABITAT.PUN_CODIGO go if exists (select 1 from sysobjects where id = object_id('PUNTAJEHABITAT') and type = 'U') drop table PUNTAJEHABITAT go /*==============================================================*/ /* Table: PUNTAJEHABITAT */ /*==============================================================*/ create table PUNTAJEHABITAT ( PUN_CODIGO numeric(1) not null, PIN_NOMBRE character(15) null, constraint PK_PUNTAJEHABITAT primary key (PUN_CODIGO)) go
Geovanny Terán
Página 58
Manual Técnico
BACEQ 1.0
/*==============================================================*/ /* Index: PUN_CODIGO */ /*==============================================================*/ create unique index PUN_CODIGO on PUNTAJEHABITAT (PUN_CODIGO) go
4.34 Quimicos Nombre de columna qui_Codigo und_Codigo qui_Nombre
Tipo de datos Numeric Character Character
Longitud 2 10 30
Permitir valores nulos No Si Si
Primary Key -
qui_Codigo
Dependencias Objetos que dependen de Quimicos: - FisicoQuimico Objetos de los que depende Quimicos: - Unidades
Código de creación alter table QUIMICOS drop constraint FK_QuimicosUnidades go alter table FISICOQUIMICO drop constraint FK_QuimicosAnalisis go if exists (select 1 from sysindexes where id = object_id('QUIMICOS') and name = 'QUI_CODIGO' and indid > 0 and indid < 255) drop index QUIMICOS.QUI_CODIGO go if exists (select 1 from sysobjects where id = object_id('QUIMICOS') and type = 'U') drop table QUIMICOS go /*==============================================================*/ /* Table: QUIMICOS */ /*==============================================================*/ create table QUIMICOS ( QUI_CODIGO numeric(2) not null, UND_CODIGO character(2) null, Geovanny Terán
Página 59
Manual Técnico
BACEQ 1.0
QUI_NOMBRE character(30) null, constraint PK_QUIMICOS primary key (QUI_CODIGO)) go /*==============================================================*/ /* Index: QUI_CODIGO */ /*==============================================================*/ create unique index QUI_CODIGO on QUIMICOS (QUI_CODIGO) go alter table QUIMICOS add constraint FK_QuimicosUnidades foreign key (UND_CODIGO) references UNIDADES (UND_CODIGO) go
4.35 Rios Nombre de columna rio_Codigo scu_Codigo rio_Nombre
Tipo de datos Character Character Character
Longitud 2 2 30
Permitir valores nulos No Si Si
Primary Key -
rio_Codigo
Dependencias Objetos que dependen de Rios: - Estacion Objetos de los que depende Rios: - SubCuenca
Código de creación alter table RIOS drop constraint FK_RiosSubcuenca go alter table ESTACION drop constraint FK_EstacionesRio go if exists (select 1 from sysindexes where id = object_id('RIOS') and name = 'RIO_CODIGO' and indid > 0 and indid < 255) drop index RIOS.RIO_CODIGO go if exists (select 1 from sysobjects where id = object_id('RIOS') Geovanny Terán
Página 60
Manual Técnico
BACEQ 1.0
and type = 'U') drop table RIOS go /*==============================================================*/ /* Table: RIOS */ /*==============================================================*/ create table RIOS ( RIO_CODIGO character(2) not null, SCU_CODIGO character(2) null, RIO_NOMBRE character(30) null, constraint PK_RIOS primary key (RIO_CODIGO)) go /*==============================================================*/ /* Index: RIO_CODIGO */ /*==============================================================*/ create unique index RIO_CODIGO on RIOS (RIO_CODIGO) go alter table RIOS add constraint FK_RiosSubcuenca foreign key (SCU_CODIGO) references SUBCUENCA (SCU_CODIGO) go
4.36 Rivera Nombre de columna riv_Codigo riv_Nombre
Tipo de datos Character Character
Longitud 1 20
Permitir valores nulos No Si
Primary Key -
rio_Codigo
Dependencias Objetos que dependen de Rivera: - Surbers Objetos de los que depende Rivera:
Código de creación alter table SURBERS drop constraint FK_SurberRivera go if exists (select 1 from sysindexes where id = object_id('RIVERA') and name = 'RIV_CODIGO' and indid > 0 and indid < 255) drop index RIVERA.RIV_CODIGO go Geovanny Terán
Página 61
Manual Técnico
BACEQ 1.0
if exists (select 1 from sysobjects where id = object_id('RIVERA') and type = 'U') drop table RIVERA go /*==============================================================*/ /* Table: RIVERA */ /*==============================================================*/ create table RIVERA ( RIV_CODIGO numeric(1) not null, RIV_NOMBRE character(20) null, constraint PK_RIVERA primary key (RIV_CODIGO)) go /*==============================================================*/ /* Index: RIV_CODIGO */ /*==============================================================*/ create unique index RIV_CODIGO on RIVERA (RIV_CODIGO) go
4.37 SubCuenca Nombre de columna scu_Codigo cue_Codigo scu_Nombre
Tipo de datos Character Character Character
Longitud 2 2 30
Permitir valores nulos No Si Si
Primary Key -
scu_Codigo
Dependencias Objetos que dependen de SubCuenca: - Rios Objetos de los que depende SubCuenca: - Cuenca
Código de creación alter table SUBCUENCA drop constraint FK_SubcuencasCuenca go alter table RIOS drop constraint FK_RiosSubcuenca go if exists (select 1 from sysindexes where id = object_id('SUBCUENCA') and name = 'SCU_CODIGO' Geovanny Terán
Página 62
Manual Técnico
BACEQ 1.0
and indid > 0 and indid < 255) drop index SUBCUENCA.SCU_CODIGO go if exists (select 1 from sysobjects where id = object_id('SUBCUENCA') and type = 'U') drop table SUBCUENCA go /*==============================================================*/ /* Table: SUBCUENCA */ /*==============================================================*/ create table SUBCUENCA ( SCU_CODIGO character(2) not null, CUE_CODIGO character(2) null, SCU_NOMBRE character(30) null, constraint PK_SUBCUENCA primary key (SCU_CODIGO)) go /*==============================================================*/ /* Index: SCU_CODIGO */ /*==============================================================*/ create unique index SCU_CODIGO on SUBCUENCA (SCU_CODIGO) go alter table SUBCUENCA add constraint FK_SubcuencasCuenca foreign key (CUE_CODIGO) references CUENCA (CUE_CODIGO) go
4.38 SubClase Nombre de columna scu_Codigo cue_Codigo scu_Nombre
Tipo de datos Numeric Numeric Numeric
Longitud 3 3 20
Permitir valores nulos No Si Si
Primary Key -
scu_Codigo
Dependencias Objetos que dependen de SubClase: - Orden Objetos de los que depende SubClasea: - Clase
Código de creación alter table SUBCLASE drop constraint FK_ClaseSubc Geovanny Terán
Página 63
Manual Técnico
BACEQ 1.0
go alter table ORDEN drop constraint FK_SubcOrden go if exists (select 1 from sysindexes where id = object_id('SUBCLASE') and name = 'SCL_CODIGO' and indid > 0 and indid < 255) drop index SUBCLASE.SCL_CODIGO go if exists (select 1 from sysobjects where id = object_id('SUBCLASE') and type = 'U') drop table SUBCLASE go /*==============================================================*/ /* Table: SUBCLASE */ /*==============================================================*/ create table SUBCLASE ( SCL_CODIGO numeric(3) not null, CLA_CODIGO numeric(3) null, SCL_NOMBRE character(20) null, constraint PK_SUBCLASE primary key (SCL_CODIGO)) go /*==============================================================*/ /* Index: SCL_CODIGO */ /*==============================================================*/ create unique index SCL_CODIGO on SUBCLASE (SCL_CODIGO) go alter table SUBCLASE add constraint FK_ClaseSubc foreign key (CLA_CODIGO) references CLASE (CLA_CODIGO) go
Geovanny Terán
Página 64
Manual Técnico
BACEQ 1.0
4.39 Surbers Nombre de columna tip_Codigo cam_Numero fic_Numero sur_Numero sur_fst riv_Codigo fac_Codigo veg_Codigo sed_Codigo ses_Codigo scd_Codigo scs_Codigo sur_Prof1 sur_Prof2 sur_Prof3 sur_Prof4 sur_Vueltas1 sur_Vueltas2 sur_Vueltas3 sur_Vueltas4 sur_Veloc1 sur_Veloc2 sur_Veloc3 sur_Veloc4 sur_188 sur_128 sur_90 sur_64 sur_45 sur_32 sur_22 sur_16 sur_sin sur_SedSeco sur_VegSeca
Tipo de datos Numeric Numeric Numeric Numeric Numeric Numeric Numeric Numeric Numeric Numeric Numeric Numeric Numeric Numeric Numeric Numeric Numeric Numeric Numeric Numeric Numeric Numeric Numeric Numeric Numeric Numeric Numeric Numeric Numeric Numeric Numeric Numeric Bit Numeric Numeric
Longitud 1 5 5 1 2 1 1 1 1 1 1 1 3 3 3 3 3 3 3 3 7,4 7,4 7,4 7,4 2 2 2 2 2 2 2 2 1 8,2 8,2
Permitir valores nulos No No No No Si No No No No No No No Si Si Si Si Si Si Si Si Si Si Si Si Si Si Si Si Si Si Si Si No Si Si
Primary Key -
tip_Codigo cam_Numero fic_Numero sur_Numero
Dependencias Objetos que dependen de Surbers:
Geovanny Terán
Página 65
Manual Técnico
BACEQ 1.0
Objetos de los que depende Surbers: - Facies - FichaCampo - Rivera - Sustrato - Vegetacion
Código de creación alter table SURBERS drop constraint FK_SurberFicha go alter table SURBERS drop constraint FK_SurberRivera go alter table SURBERS drop constraint FK_SurberFacies go alter table SURBERS drop constraint FK_SurberVegetacion go alter table SURBERS drop constraint "FK_Sed-Dominante" go alter table SURBERS drop constraint "FK_Sed-Secund" go alter table SURBERS drop constraint "FK_Sub-Dominante" go alter table SURBERS drop constraint "FK_Sub-Secund" go if exists (select 1 from sysindexes where id = object_id('SURBERS') and name = 'SUR_NUMERO' and indid > 0 and indid < 255) drop index SURBERS.SUR_NUMERO go if exists (select 1 from sysobjects where id = object_id('SURBERS') and type = 'U') drop table SURBERS go /*==============================================================*/ Geovanny Terán
Página 66
Manual Técnico
BACEQ 1.0
/* Table: SURBERS */ /*==============================================================*/ create table SURBERS ( TIP_CODIGO numeric(1) not null, CAM_NUMERO numeric(5) not null, FIC_NUMERO numeric(5) not null, SUR_NUMERO numeric(1) not null, SUR_FST numeric(2) null, RIV_CODIGO numeric(1) null, FAC_CODIGO numeric(1) null, VEG_CODIGO numeric(1) null, SED_CODIGO numeric(1) null, SES_CODIGO numeric(1) null, SCD_CODIGO numeric(1) null, SCS_CODIGO numeric(1) null, SUR_PROF1 numeric(3) null, SUR_PROF2 numeric(3) null, SUR_PROF3 numeric(3) null, SUR_PROF4 numeric(3) null, SUR_VUELTAS1 numeric(3) null, SUR_VUELTAS2 numeric(3) null, SUR_VUELTAS3 numeric(3) null, SUR_VUELTAS4 numeric(3) null, SUR_VELOC1 numeric(7,4) null, SUR_VELOC2 numeric(7,4) null, SUR_VELOC3 numeric(7,4) null, SUR_VELOC4 numeric(7,4) null, SUR_188 numeric(2) null, SUR_128 numeric(2) null, SUR_90 numeric(2) null, SUR_64 numeric(2) null, SUR_45 numeric(2) null, SUR_32 numeric(2) null, SUR_22 numeric(2) null, SUR_16 numeric(2) null, SUR_SIN character(1) null, SUR_SEDSECO numeric(8,2) null, SUR_VEGSECA numeric(8,2) null, constraint PK_SURBERS primary key (TIP_CODIGO, CAM_NUMERO, FIC_NUMERO, SUR_NUMERO)) go /*==============================================================*/ /* Index: SUR_NUMERO */ /*==============================================================*/ create unique index SUR_NUMERO on SURBERS (TIP_CODIGO, CAM_NUMERO, FIC_NUMERO, SUR_NUMERO) go alter table SURBERS add constraint FK_SurberFicha foreign key (TIP_CODIGO, CAM_NUMERO, FIC_NUMERO) references FICHACAMPO (TIP_CODIGO, CAM_NUMERO, FIC_NUMERO) go alter table SURBERS add constraint FK_SurberRivera foreign key (RIV_CODIGO) references RIVERA (RIV_CODIGO) go Geovanny Terán
Página 67
Manual Técnico
BACEQ 1.0
alter table SURBERS add constraint FK_SurberFacies foreign key (FAC_CODIGO) references FACIES (FAC_CODIGO) go alter table SURBERS add constraint FK_SurberVegetacion foreign key (VEG_CODIGO) references VEGETACION (VEG_CODIGO) go alter table SURBERS add constraint "FK_Sed-Dominante" foreign key (SED_CODIGO) references SUSTRATO (SUS_CODIGO) go alter table SURBERS add constraint "FK_Sed-Secund" foreign key (SES_CODIGO) references SUSTRATO (SUS_CODIGO) go alter table SURBERS add constraint "FK_Sub-Dominante" foreign key (SCD_CODIGO) references SUSTRATO (SUS_CODIGO) go alter table SURBERS add constraint "FK_Sub-Secund" foreign key (SCS_CODIGO) references SUSTRATO (SUS_CODIGO) go
4.40 Sustrato Nombre de columna sus_Codigo sus_Nombre
Tipo de datos Character Character
Longitud 1 10
Permitir valores nulos No Si
Primary Key -
sus_Codigo
Dependencias Objetos que dependen de Sustrato: - Surbers Objetos de los que depende Sustrato:
Código de creación alter table SURBERS drop constraint "FK_Sed-Dominante" go alter table SURBERS drop constraint "FK_Sed-Secund" Geovanny Terán
Página 68
Manual Técnico
BACEQ 1.0
go alter table SURBERS drop constraint "FK_Sub-Dominante" go alter table SURBERS drop constraint "FK_Sub-Secund" go if exists (select 1 from sysindexes where id = object_id('SUSTRATO') and name = 'SUS_CODIGO' and indid > 0 and indid < 255) drop index SUSTRATO.SUS_CODIGO go if exists (select 1 from sysobjects where id = object_id('SUSTRATO') and type = 'U') drop table SUSTRATO go /*==============================================================*/ /* Table: SUSTRATO */ /*==============================================================*/ create table SUSTRATO ( SUS_CODIGO numeric(1) not null, SUS_NOMBRE character(10) null, constraint PK_SUSTRATO primary key (SUS_CODIGO)) go /*==============================================================*/ /* Index: SUS_CODIGO */ /*==============================================================*/ create unique index SUS_CODIGO on SUSTRATO (SUS_CODIGO) go
4.41 Taxa Nombre de columna tip_Codigo cam_Numero fic_Numero sur_Numero inv_Codigo tax_Cantidad tax_Comentario
Geovanny Terán
Tipo de datos Numeric Numeric Numeric Numeric Numeric Numeric Texto
Longitud 1 5 5 1 5 3 16
Permitir valores nulos No No No No No Si Si
Página 69
Manual Técnico
BACEQ 1.0
Primary Key -
tip_Codigo cam_Numero fic_Numero sur_Numero inv_Codigo
Dependencias Objetos que dependen de Taxa: Objetos de los que depende Taxa: - FichaCampo - Invertebrados
Código de creación alter table TAXA drop constraint FK_TaxaFichas go alter table TAXA drop constraint FK_TaxaInvertebrados go if exists (select 1 from sysindexes where id = object_id('TAXA') and name = 'INV_CODIGO' and indid > 0 and indid < 255) drop index TAXA.INV_CODIGO go if exists (select 1 from sysobjects where id = object_id('TAXA') and type = 'U') drop table TAXA go /*==============================================================*/ /* Table: TAXA */ /*==============================================================*/ create table TAXA ( TIP_CODIGO numeric(1) not null, CAM_NUMERO numeric(5) not null, FIC_NUMERO numeric(5) not null, SUR_NUMERO numeric(1) not null, INV_CODIGO numeric(5) not null, TAX_CANTIDAD numeric(3) null, TAX_COMENTARIO text null, constraint PK_TAXA primary key (TIP_CODIGO, CAM_NUMERO, FIC_NUMERO, SUR_NUMERO, INV_CODIGO)) go /*==============================================================*/ /* Index: INV_CODIGO */ Geovanny Terán
Página 70
Manual Técnico
BACEQ 1.0
/*==============================================================*/ create unique index INV_CODIGO on TAXA (TIP_CODIGO, CAM_NUMERO, FIC_NUMERO, SUR_NUMERO, INV_CODIGO) go alter table TAXA add constraint FK_TaxaFichas foreign key (TIP_CODIGO, CAM_NUMERO, FIC_NUMERO) references FICHACAMPO (TIP_CODIGO, CAM_NUMERO, FIC_NUMERO) go alter table TAXA add constraint FK_TaxaInvertebrados foreign key (INV_CODIGO) references INVERTEBRADOS (INV_CODIGO) go
4.42 TipoCampana Nombre de columna tip_Codigo tip_Nombre
Tipo de datos Numeric Character
Longitud 1 20
Permitir valores nulos No Si
Primary Key -
tip_Codigo
Dependencias Objetos que dependen de TipoCampana: - Campana Objetos de los que depende TipoCampana:
Código de creación alter table CAMPANA drop constraint FK_CampanaTipo go if exists (select 1 from sysindexes where id = object_id('TIPOCAMPANA') and name = 'TIP_CODIGO' and indid > 0 and indid < 255) drop index TIPOCAMPANA.TIP_CODIGO go if exists (select 1 from sysobjects where id = object_id('TIPOCAMPANA') and type = 'U') drop table TIPOCAMPANA go /*==============================================================*/ Geovanny Terán
Página 71
Manual Técnico
BACEQ 1.0
/* Table: TIPOCAMPANA */ /*==============================================================*/ create table TIPOCAMPANA ( TIP_CODIGO numeric(1) not null, TIP_NOMBRE character(20) null, constraint PK_TIPOCAMPANA primary key (TIP_CODIGO)) go /*==============================================================*/ /* Index: TIP_CODIGO */ /*==============================================================*/ create unique index TIP_CODIGO on TIPOCAMPANA (TIP_CODIGO) go
4.43 Turbidez Nombre de columna trb_Codigo trb_Nombre
Tipo de datos Numeric Character
Longitud 1 10
Permitir valores nulos No Si
Primary Key -
trb_Codigo
Dependencias Objetos que dependen de Turbidez: - FichaCampo Objetos de los que depende Turbidez:
Código de creación alter table FICHACAMPO drop constraint FK_FichaTurbidez go if exists (select 1 from sysindexes where id = object_id('TURBIDEZ') and name = 'TRB_CODIGO' and indid > 0 and indid < 255) drop index TURBIDEZ.TRB_CODIGO go if exists (select 1 from sysobjects where id = object_id('TURBIDEZ') and type = 'U') drop table TURBIDEZ go /*==============================================================*/ /* Table: TURBIDEZ */ Geovanny Terán
Página 72
Manual Técnico
BACEQ 1.0
/*==============================================================*/ create table TURBIDEZ ( TRB_CODIGO numeric(1) not null, TRB_NOMBRE character(10) null, constraint PK_TURBIDEZ primary key (TRB_CODIGO)) go /*==============================================================*/ /* Index: TRB_CODIGO */ /*==============================================================*/ create unique index TRB_CODIGO on TURBIDEZ (TRB_CODIGO) go
4.44 Turbulencia Nombre de columna tur_Codigo tur_Nombre
Tipo de datos Numeric Character
Longitud 1 10
Permitir valores nulos No Si
Primary Key -
tur_Codigo
Dependencias Objetos que dependen de Turbulencia: - FichaCampo Objetos de los que depende Turbulencia:
Código de creación alter table FICHACAMPO drop constraint FK_FichaTurbulencia go if exists (select 1 from sysindexes where id = object_id('TURBULENCIA') and name = 'TUR_CODIGO' and indid > 0 and indid < 255) drop index TURBULENCIA.TUR_CODIGO go if exists (select 1 from sysobjects where id = object_id('TURBULENCIA') and type = 'U') drop table TURBULENCIA go /*==============================================================*/ /* Table: TURBULENCIA */ /*==============================================================*/ Geovanny Terán
Página 73
Manual Técnico
BACEQ 1.0
create table TURBULENCIA ( TUR_CODIGO numeric(1) not null, TUR_NOMBRE character(10) null, constraint PK_TURBULENCIA primary key (TUR_CODIGO)) go /*==============================================================*/ /* Index: TUR_CODIGO */ /*==============================================================*/ create unique index TUR_CODIGO on TURBULENCIA (TUR_CODIGO) go
4.45 Unidades Nombre de columna und_Codigo und_Nombre
Tipo de datos Character Character
Longitud 10 20
Permitir valores nulos No Si
Primary Key -
und_Codigo
Dependencias Objetos que dependen de Unidades: - Quimicos Objetos de los que depende Unidades:
Código de creación alter table QUIMICOS drop constraint FK_QuimicosUnidades go if exists (select 1 from sysindexes where id = object_id('UNIDADES') and name = 'UND_CODIGO' and indid > 0 and indid < 255) drop index UNIDADES.UND_CODIGO go if exists (select 1 from sysobjects where id = object_id('UNIDADES') and type = 'U') drop table UNIDADES go /*==============================================================*/ /* Table: UNIDADES */ /*==============================================================*/ create table UNIDADES ( Geovanny Terán
Página 74
Manual Técnico
BACEQ 1.0
UND_CODIGO character(10) not null, UND_NOMBRE character(30) null, constraint PK_UNIDADES primary key (UND_CODIGO)) go /*==============================================================*/ /* Index: UND_CODIGO */ /*==============================================================*/ create unique index UND_CODIGO on UNIDADES (UND_CODIGO) go
4.46 Usuarios Nombre de columna
Tipo de datos usr_Codigo Character usr_Nombre Character usr_Password Character usr_FechaCreacion Datetime
Longitud 20 40 30 8
Permitir valores nulos No Si No Si
Primary Key -
usr_Codigo
Dependencias Objetos que dependen de Usuarios: - AccesoUsuarios Objetos de los que depende Usuarios:
Código de creación alter table ACCESOSUSUARIOS drop constraint FK_AccesosUsuarios go if exists (select 1 from sysindexes where id = object_id('USUARIOS') and name = 'USR_CODIGO' and indid > 0 and indid < 255) drop index USUARIOS.USR_CODIGO go if exists (select 1 from sysobjects where id = object_id('USUARIOS') and type = 'U') drop table USUARIOS go /*==============================================================*/ /* Table: USUARIOS */ /*==============================================================*/ Geovanny Terán
Página 75
Manual Técnico
BACEQ 1.0
create table USUARIOS ( USR_CODIGO character(20) not null, USR_NOMBRE character(40) null, USR_PASSWORD character(20) null, USR_FECHACREACION datetime null, constraint PK_USUARIOS primary key (USR_CODIGO)) go /*==============================================================*/ /* Index: USR_CODIGO */ /*==============================================================*/ create unique index USR_CODIGO on USUARIOS (USR_CODIGO) go
4.47 Vegetacion Nombre de columna veg_Codigo veg_nombre
Tipo de datos Numeric Character
Longitud 1 25
Permitir valores nulos No Si
Primary Key -
veg_Codigo
Dependencias Objetos que dependen de Vegetacion: - Surbers Objetos de los que depende Vegetacion:
Código de creación alter table SURBERS drop constraint FK_SurberVegetacion go if exists (select 1 from sysindexes where id = object_id('VEGETACION') and name = 'VGT_CODIGO' and indid > 0 and indid < 255) drop index VEGETACION.VGT_CODIGO go if exists (select 1 from sysobjects where id = object_id('VEGETACION') and type = 'U') drop table VEGETACION go /*==============================================================*/ /* Table: VEGETACION */ Geovanny Terán
Página 76
Manual Técnico
BACEQ 1.0
/*==============================================================*/ create table VEGETACION ( VEG_CODIGO numeric(1) not null, VEG_NOMBRE character(15) null, constraint PK_VEGETACION primary key (VEG_CODIGO)) go /*==============================================================*/ /* Index: VGT_CODIGO */ /*==============================================================*/ create unique index VGT_CODIGO on VEGETACION (VEG_CODIGO) go
4.48 Viento Nombre de columna vie_Codigo vie_Nombre
Tipo de datos Numeric Character
Longitud 1 10
Permitir valores nulos No Si
Primary Key -
vie_Codigo
Dependencias Objetos que dependen de Viento: - FichaCampo Objetos de los que depende Viento:
Código de creación alter table FICHACAMPO drop constraint "FK_Campana-Viento" go if exists (select 1 from sysindexes where id = object_id('VIENTO') and name = 'VIE_CODIGO' and indid > 0 and indid < 255) drop index VIENTO.VIE_CODIGO go if exists (select 1 from sysobjects where id = object_id('VIENTO') and type = 'U') drop table VIENTO go /*==============================================================*/ /* Table: VIENTO */ /*==============================================================*/ Geovanny Terán
Página 77
Manual Técnico
BACEQ 1.0
create table VIENTO ( VIE_CODIGO numeric(1) not null, VIE_NOMBRE character(10) null, constraint PK_VIENTO primary key (VIE_CODIGO)) go /*==============================================================*/ /* Index: VIE_CODIGO */ /*==============================================================*/ create unique index VIE_CODIGO on VIENTO (VIE_CODIGO) go
Geovanny Terán
Página 78