Database - jjaroztegi/BuildingSignalSimulator GitHub Wiki
Database Documentation
πͺπΈ Ver en espaΓ±ol
Overview
The Building Signal Simulator uses a relational database to store component data, configurations, and quality margins. The database is designed to efficiently manage network components and their technical specifications while supporting the signal calculation and optimization features.
Schema Structure
The database schema is organized into three main sections:
1. Main Tables
TiposComponente
Stores available component types in the system.
Column | Type | Description |
---|---|---|
id_tipos_componente |
COUNTER (PK) | Unique identifier |
nombre |
TEXT(50) | Component type name |
descripcion |
TEXT(255) | Detailed description |
Componentes
Stores general component information.
Column | Type | Description |
---|---|---|
id_componentes |
COUNTER (PK) | Unique identifier |
id_tipos_componente |
LONG (FK) | Reference to TiposComponente |
modelo |
TEXT(100) | Component model name |
costo |
CURRENCY | Unit cost |
2. Component-Specific Tables
Coaxiales
Technical properties of coaxial cables.
Column | Type | Description |
---|---|---|
id_coaxiales |
COUNTER (PK) | Unique identifier |
id_componentes |
LONG (FK) | Reference to Componentes |
atenuacion_470mhz |
DOUBLE | Attenuation at 470 MHz |
atenuacion_694mhz |
DOUBLE | Attenuation at 694 MHz |
Derivadores
Properties of signal taps.
Column | Type | Description |
---|---|---|
id_derivadores |
COUNTER (PK) | Unique identifier |
id_componentes |
LONG (FK) | Reference to Componentes |
atenuacion_derivacion |
DOUBLE | Tap attenuation |
atenuacion_paso |
DOUBLE | Through attenuation |
directividad |
DOUBLE | Directivity |
desacoplo |
DOUBLE | Decoupling |
perdidas_retorno |
DOUBLE | Return loss |
Distribuidores
Properties of signal splitters.
Column | Type | Description |
---|---|---|
id_distribuidores |
COUNTER (PK) | Unique identifier |
id_componentes |
LONG (FK) | Reference to Componentes |
numero_salidas |
LONG | Number of outputs |
atenuacion_distribucion |
DOUBLE | Distribution attenuation |
desacoplo |
DOUBLE | Decoupling |
perdidas_retorno |
DOUBLE | Return loss |
Tomas
Properties of outlets.
Column | Type | Description |
---|---|---|
id_tomas |
COUNTER (PK) | Unique identifier |
id_componentes |
LONG (FK) | Reference to Componentes |
atenuacion |
DOUBLE | Attenuation |
desacoplo |
DOUBLE | Decoupling |
3. Configuration Tables
Configuraciones
Stores building configurations.
Column | Type | Description |
---|---|---|
id_configuraciones |
COUNTER (PK) | Unique identifier |
nombre |
TEXT(100) | Configuration name |
nivel_cabecera |
DOUBLE | Head-end level |
num_pisos |
LONG | Number of floors |
costo_total |
CURRENCY | Total cost |
fecha_creacion |
DATETIME | Creation date |
usuario_creacion |
TEXT(50) | Created by |
fecha_modificacion |
DATETIME | Last modified date |
usuario_modificacion |
TEXT(50) | Modified by |
MargenesCalidad
Defines acceptable signal quality margins.
Column | Type | Description |
---|---|---|
id_margenes_calidad |
COUNTER (PK) | Unique identifier |
tipo_senal |
TEXT(50) | Signal type |
nivel_minimo |
DOUBLE | Minimum acceptable level |
nivel_maximo |
DOUBLE | Maximum acceptable level |
Relationships
-
TiposComponente β Componentes
- One-to-Many relationship
- Each component type can have multiple components
- Foreign Key:
Componentes.id_tipos_componente
βTiposComponente.id_tipos_componente
-
Componentes β Component-Specific Tables
- One-to-One relationships
- Each component has one entry in its respective type-specific table
- Foreign Keys:
Coaxiales.id_componentes
βComponentes.id_componentes
Derivadores.id_componentes
βComponentes.id_componentes
Distribuidores.id_componentes
βComponentes.id_componentes
Tomas.id_componentes
βComponentes.id_componentes
Performance Optimization
Indexes
The following indexes are implemented for better query performance:
idx_componentes_tipo
onComponentes(id_tipos_componente)
idx_coaxiales_componente
onCoaxiales(id_componentes)
idx_derivadores_componente
onDerivadores(id_componentes)
idx_distribuidores_componente
onDistribuidores(id_componentes)
idx_tomas_componente
onTomas(id_componentes)
Sample Data
Component Types
- Cable Coaxial
- Base de Toma
- Derivador
- Distribuidor
Example Components
- Cables: CE-752, CE-740, CE-170, FI-250, CL-200
- Tomas: BS-100, BS-112, BS-110, BS-111, BS-210, BS-510
- Derivadores: FP-414, FP-420, FP-426
- Distribuidores: FI-243, FI-473, FI-253, FI-483
Quality Margins
- TDT: Min 45.0 dB, Max 70.0 dB
Database Access
The application uses JDBC for database operations through the following classes:
com.signalapp.dao.AccessConnection
: MS Access connection managementcom.signalapp.dao.DerbyConnection
: Derby connection managementcom.signalapp.dao.*DAO
: Data Access Objects for each entity