Files
CM95/docs/数据库设计.md
2026-09-02 09:50:12 +08:00

51 lines
1.0 KiB
Markdown
Raw Permalink Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
# MySQL 5.7.34 数据库设计
## 核心表
- `chart_dataset`:一个 CM93 数据集根目录
- `chart_dictionary_object`:对象字典快照
- `chart_dictionary_attribute`:属性字典快照
- `chart_cell`:CM93 cell 元数据
- `chart_coverage`:`_m_sor` coverage
- `chart_feature`:公共 feature 元数据
- `chart_feature_attribute`:规范化属性
- `chart_point_geometry`
- `chart_line_geometry`
- `chart_area_geometry`
- `chart_sounding_point`
- `chart_raw_record`
- `chart_import_job`
- `chart_import_event`
## Geometry
MySQL 5.7 不使用 MySQL 8 的 SRID 列限制。
所有标准化 geometry 写入时显式:
`ST_GeomFromWKB(%s, 4326)`
并在 `chart_feature.normalized_srid` 记录 4326。
## 原始值
CM93 的:
- header bounds
- source scale
- raw geotype
- raw feature bytes
- raw attribute bytes
- coverage offset
必须保存。
## 数值属性
`chart_feature_attribute` 同时提供:
- `value_int`
- `value_real`
- `value_text`
- `value_json`
- `raw_value_blob`
这样既保留 typed value,也允许审计原始数据。