******** Database ******** Overview ======== The database component is responsible for storing and managing the vast amount of data generated by the ground station. This includes satellite telemetry, mission control data, and station logs. The system utilizes a combination of PostgreSQL and TimescaleDB to efficiently handle time-series data, which is critical for orbital analysis and historical tracking. Key Features ============ - **Time-Series Optimization**: Leverages TimescaleDB to handle high-frequency telemetry data with high ingestion rates. - **Data Segregation**: Uses distinct schemas for different types of data: - ``mission_control``: Stores dimension data such as satellite metadata and packet definitions. - ``telemetry_stream``: Stores fact data (Hypertables) for massive volumes of signal readings. - **Performance**: Optimized for write-heavy workloads by minimizing foreign key constraints on high-volume tables and using batch insertion strategies. Architecture ============ The database architecture is designed to support the specific needs of satellite operations: 1. **Dimension Tables**: Located in the ``mission_control`` schema, these tables hold slowly changing data like satellite identifiers and packet configurations. 2. **Fact Tables (Hypertables)**: Located in the ``telemetry_stream`` schema, these tables are partitioned by time to allow for efficient querying and management of historical data. Usage ===== Data population strategies include: - **Batch Inserts**: For real-time applications, inserting data in large batches is recommended to maximize throughput. - **Bulk Import**: The ``COPY`` command is used for importing large historical datasets from CSV files. For more details on the database schema and setup scripts, refer to the project repository.