51 lines
1.0 KiB
Markdown
51 lines
1.0 KiB
Markdown
# 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,也允许审计原始数据。
|