-
Notifications
You must be signed in to change notification settings - Fork 0
/
wrapdb_1_스키마.sql
253 lines (238 loc) · 10.3 KB
/
wrapdb_1_스키마.sql
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
-- --------------------------------------------------------
-- 호스트: 127.0.0.1
-- 서버 버전: 10.3.9-MariaDB - mariadb.org binary distribution
-- 서버 OS: Win64
-- HeidiSQL 버전: 9.4.0.5125
-- --------------------------------------------------------
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET NAMES utf8 */;
/*!50503 SET NAMES utf8mb4 */;
/*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */;
/*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */;
-- wrapdb_1 데이터베이스 구조 내보내기
CREATE DATABASE IF NOT EXISTS `wrapdb_1` /*!40100 DEFAULT CHARACTER SET utf8 */;
USE `wrapdb_1`;
-- 테이블 wrapdb_1.code_element 구조 내보내기
CREATE TABLE IF NOT EXISTS `code_element` (
`element_cd` varchar(5) NOT NULL,
`group_cd` varchar(5) NOT NULL,
`element_nm` varchar(100) NOT NULL,
PRIMARY KEY (`element_cd`,`group_cd`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
-- 내보낼 데이터가 선택되어 있지 않습니다.
-- 테이블 wrapdb_1.code_group 구조 내보내기
CREATE TABLE IF NOT EXISTS `code_group` (
`group_cd` varchar(5) NOT NULL,
`group_nm` varchar(100) NOT NULL,
PRIMARY KEY (`group_cd`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
-- 내보낼 데이터가 선택되어 있지 않습니다.
-- 테이블 wrapdb_1.item 구조 내보내기
CREATE TABLE IF NOT EXISTS `item` (
`cd` int(8) unsigned NOT NULL AUTO_INCREMENT,
`nm` varchar(64) NOT NULL,
`isin` varchar(32) DEFAULT NULL,
`value_type` varchar(5) DEFAULT NULL,
`value_unit` varchar(5) DEFAULT NULL,
`period_unit` varchar(5) DEFAULT NULL,
`currency` varchar(5) DEFAULT NULL,
`source` varchar(5) DEFAULT NULL,
`ticker` varchar(50) DEFAULT NULL,
`field` varchar(50) DEFAULT 'PX_LAST',
`group` varchar(5) DEFAULT NULL,
`use_yn` int(2) unsigned DEFAULT 2,
`delay` int(8) unsigned DEFAULT NULL,
PRIMARY KEY (`cd`),
KEY `INDEX1` (`nm`)
) ENGINE=InnoDB AUTO_INCREMENT=388 DEFAULT CHARSET=utf8;
-- 내보낼 데이터가 선택되어 있지 않습니다.
-- 테이블 wrapdb_1.ivalues 구조 내보내기
CREATE TABLE IF NOT EXISTS `ivalues` (
`date` varchar(10) NOT NULL,
`item_cd` int(8) NOT NULL,
`value` float NOT NULL,
`create_tm` datetime DEFAULT NULL,
`update_tm` datetime DEFAULT NULL,
PRIMARY KEY (`date`,`item_cd`),
KEY `INDEX1` (`item_cd`),
KEY `INDEX2` (`date`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
-- 내보낼 데이터가 선택되어 있지 않습니다.
-- 테이블 wrapdb_1.result 구조 내보내기
CREATE TABLE IF NOT EXISTS `result` (
`start_dt` varchar(10) NOT NULL,
`end_dt` varchar(10) NOT NULL,
`curr_dt` varchar(10) NOT NULL,
`target_cd` int(8) unsigned NOT NULL,
`factors_num` int(8) unsigned NOT NULL,
`multi_factors_cd` varchar(32) NOT NULL,
`multi_factors_nm` varchar(256) NOT NULL,
`min_max_check_term` int(2) unsigned NOT NULL,
`weight_check_term` int(2) unsigned NOT NULL,
`window_size` int(2) unsigned NOT NULL,
`signal_cd` int(2) unsigned NOT NULL,
`score` float NOT NULL,
`model_profit` float NOT NULL,
`bm_profit` float NOT NULL,
`create_tm` datetime DEFAULT NULL,
`update_tm` datetime DEFAULT NULL,
PRIMARY KEY (`start_dt`,`end_dt`,`curr_dt`,`target_cd`,`multi_factors_cd`,`min_max_check_term`,`weight_check_term`,`window_size`),
KEY `INDEX1` (`start_dt`,`end_dt`,`target_cd`,`multi_factors_cd`),
KEY `INDEX2` (`start_dt`,`end_dt`,`target_cd`,`model_profit`),
KEY `INDEX3` (`start_dt`,`end_dt`,`target_cd`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
-- 내보낼 데이터가 선택되어 있지 않습니다.
-- 테이블 wrapdb_1.result_factor 구조 내보내기
CREATE TABLE IF NOT EXISTS `result_factor` (
`start_dt` varchar(10) NOT NULL,
`end_dt` varchar(10) NOT NULL,
`curr_dt` varchar(10) NOT NULL,
`target_cd` int(8) unsigned NOT NULL,
`factor_cd` int(8) unsigned NOT NULL,
`min_max_check_term` int(8) unsigned NOT NULL,
`weight_check_term` int(8) unsigned NOT NULL,
`window_size` int(8) unsigned NOT NULL,
`lag` float NOT NULL,
`signal_cd` int(2) unsigned NOT NULL,
`score` float NOT NULL,
`factor_profit` float NOT NULL,
`index_profit` float NOT NULL,
`create_tm` datetime DEFAULT NULL,
`update_tm` datetime DEFAULT NULL,
PRIMARY KEY (`start_dt`,`end_dt`,`curr_dt`,`target_cd`,`factor_cd`,`min_max_check_term`,`weight_check_term`,`window_size`,`lag`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
-- 내보낼 데이터가 선택되어 있지 않습니다.
-- 테이블 wrapdb_1.result_factor_impact 구조 내보내기
CREATE TABLE IF NOT EXISTS `result_factor_impact` (
`target_cd` int(8) DEFAULT NULL,
`multi_factors_cd` varchar(32) DEFAULT NULL,
`multi_factors_nm` varchar(256) DEFAULT NULL,
`start_dt` varchar(10) DEFAULT NULL,
`end_dt` varchar(10) DEFAULT NULL,
`factors_num` int(8) DEFAULT NULL,
`min_max_check_term` int(2) DEFAULT NULL,
`weight_check_term` int(2) DEFAULT NULL,
`window_size` int(2) DEFAULT NULL,
`factor_cd0` int(8) DEFAULT NULL,
`factor_cd1` int(8) DEFAULT NULL,
`factor_cd2` int(8) DEFAULT NULL,
`factor_cd3` int(8) DEFAULT NULL,
`factor_cd4` int(8) DEFAULT NULL,
`factor_cd5` int(8) DEFAULT NULL,
`factor_cd6` int(8) DEFAULT NULL,
`factor_cd7` int(8) DEFAULT NULL,
`factor_cd8` int(8) DEFAULT NULL,
`factor_cd9` int(8) DEFAULT NULL,
`model_imp` float DEFAULT NULL,
`factor_imp0` float DEFAULT NULL,
`factor_imp1` float DEFAULT NULL,
`factor_imp2` float DEFAULT NULL,
`factor_imp3` float DEFAULT NULL,
`factor_imp4` float DEFAULT NULL,
`factor_imp5` float DEFAULT NULL,
`factor_imp6` float DEFAULT NULL,
`factor_imp7` float DEFAULT NULL,
`factor_imp8` float DEFAULT NULL,
`factor_imp9` float DEFAULT NULL,
`create_tm` datetime DEFAULT NULL,
`update_tm` datetime DEFAULT NULL,
KEY `인덱스 1` (`multi_factors_cd`,`end_dt`,`start_dt`,`factors_num`,`window_size`,`min_max_check_term`,`weight_check_term`,`target_cd`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
-- 내보낼 데이터가 선택되어 있지 않습니다.
-- 테이블 wrapdb_1.result_factor_last 구조 내보내기
CREATE TABLE IF NOT EXISTS `result_factor_last` (
`start_dt` varchar(10) NOT NULL,
`end_dt` varchar(10) NOT NULL,
`target_cd` int(8) unsigned NOT NULL,
`factor_cd` int(8) unsigned NOT NULL,
`min_max_check_term` int(2) unsigned NOT NULL,
`weight_check_term` int(2) unsigned NOT NULL,
`window_size` int(2) unsigned NOT NULL,
`lag` int(2) unsigned NOT NULL,
`signal_cd` int(2) unsigned NOT NULL,
`score` float NOT NULL,
`factor_profit` float NOT NULL,
`index_profit` float NOT NULL,
`create_tm` datetime DEFAULT NULL,
`update_tm` datetime DEFAULT NULL,
PRIMARY KEY (`start_dt`,`end_dt`,`target_cd`,`factor_cd`,`min_max_check_term`,`weight_check_term`,`window_size`,`lag`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
-- 내보낼 데이터가 선택되어 있지 않습니다.
-- 테이블 wrapdb_1.result_last 구조 내보내기
CREATE TABLE IF NOT EXISTS `result_last` (
`start_dt` varchar(10) NOT NULL,
`end_dt` varchar(10) NOT NULL,
`target_cd` int(8) unsigned NOT NULL,
`factors_num` int(8) unsigned NOT NULL,
`multi_factors_cd` varchar(32) NOT NULL,
`multi_factors_nm` varchar(256) NOT NULL,
`factor_cd0` int(8) unsigned NOT NULL,
`factor_cd1` int(8) unsigned DEFAULT NULL,
`factor_cd2` int(8) unsigned DEFAULT NULL,
`factor_cd3` int(8) unsigned DEFAULT NULL,
`factor_cd4` int(8) unsigned DEFAULT NULL,
`factor_cd5` int(8) unsigned DEFAULT NULL,
`factor_cd6` int(8) unsigned DEFAULT NULL,
`factor_cd7` int(8) unsigned DEFAULT NULL,
`factor_cd8` int(8) unsigned DEFAULT NULL,
`factor_cd9` int(8) unsigned DEFAULT NULL,
`min_max_check_term` int(2) unsigned NOT NULL,
`weight_check_term` int(2) unsigned NOT NULL,
`window_size` int(2) unsigned NOT NULL,
`signal_cd` int(2) unsigned NOT NULL,
`score` float NOT NULL,
`model_profit` float NOT NULL,
`bm_profit` float NOT NULL,
`create_tm` datetime DEFAULT NULL,
`update_tm` datetime DEFAULT NULL,
PRIMARY KEY (`start_dt`,`end_dt`,`target_cd`,`multi_factors_cd`,`min_max_check_term`,`weight_check_term`,`window_size`),
KEY `INDEX1` (`start_dt`,`end_dt`,`target_cd`,`model_profit`),
KEY `INDEX3` (`start_dt`,`end_dt`,`target_cd`),
KEY `INDEX2` (`start_dt`,`end_dt`,`target_cd`,`min_max_check_term`,`weight_check_term`,`window_size`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
-- 내보낼 데이터가 선택되어 있지 않습니다.
-- 테이블 wrapdb_1.target_factor_corr 구조 내보내기
CREATE TABLE IF NOT EXISTS `target_factor_corr` (
`target_cd` int(8) NOT NULL,
`factor_cd` int(8) NOT NULL,
`target_nm` varchar(128) NOT NULL,
`factor_nm` varchar(128) NOT NULL,
`start_dt` varchar(10) NOT NULL,
`end_dt` varchar(10) NOT NULL,
`min_max_check_term` int(2) NOT NULL,
`weight_check_term` int(2) NOT NULL,
`window_size` int(2) NOT NULL,
`lag` int(2) NOT NULL,
`norm_yn` int(2) NOT NULL,
`value` float NOT NULL,
`hit_ratio` float NOT NULL,
`create_tm` datetime NOT NULL,
`update_tm` datetime NOT NULL,
PRIMARY KEY (`target_cd`,`factor_cd`,`end_dt`,`start_dt`,`lag`,`weight_check_term`,`min_max_check_term`,`window_size`,`norm_yn`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
-- 내보낼 데이터가 선택되어 있지 않습니다.
-- 테이블 wrapdb_1.target_factor_corr_law_data 구조 내보내기
CREATE TABLE IF NOT EXISTS `target_factor_corr_law_data` (
`target_cd` int(8) NOT NULL,
`factor_cd` int(8) NOT NULL,
`target_nm` varchar(64) NOT NULL,
`factor_nm` varchar(64) NOT NULL,
`start_dt` varchar(10) NOT NULL,
`end_dt` varchar(10) NOT NULL,
`curr_dt` varchar(10) NOT NULL,
`min_max_check_term` int(2) NOT NULL,
`weight_check_term` int(2) NOT NULL,
`window_size` int(2) NOT NULL,
`lag` int(2) NOT NULL,
`target_val` float NOT NULL,
`factor_val` float NOT NULL,
`hit_yn` int(2) NOT NULL,
`norm_yn` int(2) NOT NULL,
`create_tm` datetime NOT NULL,
`update_tm` datetime NOT NULL,
PRIMARY KEY (`target_cd`,`factor_cd`,`start_dt`,`end_dt`,`lag`,`min_max_check_term`,`weight_check_term`,`window_size`,`curr_dt`,`norm_yn`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
-- 내보낼 데이터가 선택되어 있지 않습니다.
/*!40101 SET SQL_MODE=IFNULL(@OLD_SQL_MODE, '') */;
/*!40014 SET FOREIGN_KEY_CHECKS=IF(@OLD_FOREIGN_KEY_CHECKS IS NULL, 1, @OLD_FOREIGN_KEY_CHECKS) */;
/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;