Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 2 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
# cbdb_sqlite

[**latest.7z**](https://github.com/cbdb-project/cbdb_sqlite/blob/master/latest.7z) - The latest SQLite version of the [China Biographical Database](https://projects.iq.harvard.edu/cbdb/home). This version includes no indexes or primary keys.
[**latest.7z**](https://github.com/cbdb-project/cbdb_sqlite/blob/master/latest.7z) - The latest SQLite version of the [China Biographical Database](https://projects.iq.harvard.edu/cbdb/home).

You can also download it from huggingface (includes indexes and primary keys):
You can also download it from huggingface:

https://huggingface.co/datasets/cbdb/cbdb-sqlite/blob/main/latest.7z

Expand All @@ -14,4 +14,3 @@ https://huggingface.co/datasets/cbdb/cbdb-sqlite/resolve/main/latest.7z?download

You can download the history SQLite databases from the [CBDB Hugging Face account](https://huggingface.co/datasets/cbdb/cbdb-sqlite/tree/main/history)


8 changes: 0 additions & 8 deletions USAGE.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,14 +41,6 @@ Use tools such as `pyenv` if you need to maintain multiple Python versions and c
rm latest.7z
```

## Primary Keys
To keep the archive small, the `latest.7z` published by the cbdb_sqlite project does not include primary keys, indexes, or views. Add them as needed for your use cases.

To add primary keys, run the `scripts/add_primary_keys.py` helper:
```bash
python3 scripts/add_primary_keys.py --db CBDB_20250520.db
```

## Query Examples

Use the interactive `sqlite3` shell for quick data inspection:
Expand Down
9 changes: 0 additions & 9 deletions USAGE.zh.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,15 +43,6 @@
rm latest.7z
```

## 主键
为节省数据集体积, cbdb_sqlite 项目中发布的 latest.7z 不包含主键、索引、视图。用户可根据使用需求添加。

如需要主键,可运行 `scripts/add_primary_keys.py` 脚本添加主键如下:

```bash
python3 scripts/add_primary_keys.py --db CBDB_20250520.db
```

## 常见查询示例

使用 `sqlite3` 交互模式快速检查数据:
Expand Down
1 change: 0 additions & 1 deletion scripts/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ This directory contains the helper scripts used to download, normalise, and comp
## Available Scripts

- `process_cbdb_dbs.sh`: end-to-end workflow that downloads the latest and historical SQLite dumps, unpacks them, applies the normalisation helpers, vacuums the databases, and generates a schema/data summary comparison.
- `add_primary_keys.py`: rebuilds tables that lack explicit primary keys by creating replacement tables with the desired constraints and copying data across inside a single transaction.
- `compare_db_tables.py`: compares two SQLite databases table-by-table, emitting a report of schema and data discrepancies.

## Prerequisites
Expand Down
1 change: 0 additions & 1 deletion scripts/README.zh.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
## 脚本一览

- `process_cbdb_dbs.sh`:完整流程脚本,负责下载最新与历史版 SQLite 数据库、解压、运行规范化工具、执行 `VACUUM`,并生成数据库差异报告。
- `add_primary_keys.py`:为缺少显式主键的表重建结构,在单个事务内创建带主键的新表并复制数据。
- `compare_db_tables.py`:逐表对比两个 SQLite 数据库的结构与数据,输出差异摘要。

## 运行前提
Expand Down
294 changes: 0 additions & 294 deletions scripts/add_primary_keys.py

This file was deleted.

Loading
Loading