MIMIC III v1.4
https://blog.csdn.net/mysssqqqlll/article/details/126123093
文件解压后大小为43.3GB
drop数据库mimic
1
| DROP DATABASE IF EXISTS mimic;
|
创建数据库mimic
1
| CREATE DATABASE mimic OWNER postgres;
|
连接上数据库mimic
输入一个新模式mimiciii到当前数据库中
1
| CREATE SCHEMA mimiciii;
|
添加新模式mimiciii到search_path
1
| set search_path to mimiciii;
|
执行mimiciii建表语句,创建所有数据表
1
2
3
4
5
6
7
8
9
10
11
12
13
14
| \i /var/www/mimic/mimic/mimic/postgres_create_tables.sql
# 无效??
# set mimic_data_dir /var/www/mimic/mimic/mimic/mimicd/data/;
\cd /var/www/mimic/mimic/mimic/mimicd/data/;
\i /var/www/mimic/mimic/mimic/postgres_load_data.sql
\i /var/www/mimic/mimic/mimic/postgres_add_indexes.sql
\i /var/www/mimic/mimic/mimic/postgres_checks.sql
## 查询为26行行记录,并且row_count_check全部为PASSED,代表安装成功
|