1/*
2 * Legal Notice
3 *
4 * This document and associated source code (the "Work") is a part of a
5 * benchmark specification maintained by the TPC.
6 *
7 * The TPC reserves all right, title, and interest to the Work as provided
8 * under U.S. and international laws, including without limitation all patent
9 * and trademark rights therein.
10 *
11 * No Warranty
12 *
13 * 1.1 TO THE MAXIMUM EXTENT PERMITTED BY APPLICABLE LAW, THE INFORMATION
14 * CONTAINED HEREIN IS PROVIDED "AS IS" AND WITH ALL FAULTS, AND THE
15 * AUTHORS AND DEVELOPERS OF THE WORK HEREBY DISCLAIM ALL OTHER
16 * WARRANTIES AND CONDITIONS, EITHER EXPRESS, IMPLIED OR STATUTORY,
17 * INCLUDING, BUT NOT LIMITED TO, ANY (IF ANY) IMPLIED WARRANTIES,
18 * DUTIES OR CONDITIONS OF MERCHANTABILITY, OF FITNESS FOR A PARTICULAR
19 * PURPOSE, OF ACCURACY OR COMPLETENESS OF RESPONSES, OF RESULTS, OF
20 * WORKMANLIKE EFFORT, OF LACK OF VIRUSES, AND OF LACK OF NEGLIGENCE.
21 * ALSO, THERE IS NO WARRANTY OR CONDITION OF TITLE, QUIET ENJOYMENT,
22 * QUIET POSSESSION, CORRESPONDENCE TO DESCRIPTION OR NON-INFRINGEMENT
23 * WITH REGARD TO THE WORK.
24 * 1.2 IN NO EVENT WILL ANY AUTHOR OR DEVELOPER OF THE WORK BE LIABLE TO
25 * ANY OTHER PARTY FOR ANY DAMAGES, INCLUDING BUT NOT LIMITED TO THE
26 * COST OF PROCURING SUBSTITUTE GOODS OR SERVICES, LOST PROFITS, LOSS
27 * OF USE, LOSS OF DATA, OR ANY INCIDENTAL, CONSEQUENTIAL, DIRECT,
28 * INDIRECT, OR SPECIAL DAMAGES WHETHER UNDER CONTRACT, TORT, WARRANTY,
29 * OR OTHERWISE, ARISING IN ANY WAY OUT OF THIS OR ANY OTHER AGREEMENT
30 * RELATING TO THE WORK, WHETHER OR NOT SUCH AUTHOR OR DEVELOPER HAD
31 * ADVANCE NOTICE OF THE POSSIBILITY OF SUCH DAMAGES.
32 *
33 * Contributors
34 * - Sergey Vasilevskiy
35 */
36
37/*
38 * Table column length constants used by the loader and
39 * transactions.
40 */
41#ifndef TABLE_CONSTS_H
42#define TABLE_CONSTS_H
43
44#include "EGenStandardTypes.h"
45
46namespace TPCE {
47
48// ADDRESS / ZIP_CODE tables
49const int cTOWN_len = 80;
50const int cDIV_len = 80;
51const int cCODE_len = 12;
52
53// ACCOUNT_PERMISSION table
54const int cACL_len = 4;
55
56// ADDRESS table
57const int cAD_NAME_len = 80;
58const int cAD_LINE_len = 80;
59const int cAD_TOWN_len = cTOWN_len;
60const int cAD_DIV_len = cDIV_len; // state/provice abreviation
61const int cAD_ZIP_len = cCODE_len;
62const int cAD_CTRY_len = 80;
63
64// CASH_TRANSACTION table
65const int cCT_NAME_len = 100;
66
67// CUSTOMER table
68const int cL_NAME_len = 25;
69const int cF_NAME_len = 20;
70const int cM_NAME_len = 1;
71const int cDOB_len = 30;
72const int cTAX_ID_len = 20;
73const int cGNDR_len = 1;
74const int cCTRY_len = 3;
75const int cAREA_len = 3;
76const int cLOCAL_len = 10;
77const int cEXT_len = 5;
78const int cEMAIL_len = 50;
79
80// BROKER table
81const int cB_NAME_len = cF_NAME_len + cM_NAME_len + cL_NAME_len + 3; // two spaces and one period
82
83// COMPANY table
84const int cCO_NAME_len = 60;
85const int cSP_RATE_len = 4;
86const int cCEO_NAME_len = cF_NAME_len + cL_NAME_len + 1; // one space
87const int cCO_DESC_len = 150;
88const int cCO_SP_RATE_len = 4;
89
90// CUSTOMER_ACCOUNT table
91const int cCA_NAME_len = 50;
92
93// EXCHANGE table
94const int cEX_ID_len = 6;
95const int cEX_NAME_len = 100;
96const int cEX_DESC_len = 150;
97// const int cEX_OPEN_len = 8;
98// const int cEX_CLOSE_len = 8;
99
100// HOLDING table
101const int cH_BUY_DTS_len = 30; // date of purchase
102
103// INDUSTRY table
104const int cIN_ID_len = 2;
105const int cIN_NAME_len = 50;
106
107// NEWS_ITEM table
108const int cNI_HEADLINE_len = 80;
109const int cNI_SUMMARY_len = 255;
110const int cNI_ITEM_len = 100 * 1000;
111const int cNI_SOURCE_len = 30;
112const int cNI_AUTHOR_len = 30;
113
114// SECURITY table
115const int cS_NAME_len = 70;
116const int cSYMBOL_len = 7 + 1 + 7; // base + separator + extended
117const int cS_ISSUE_len = 6;
118
119// SETTLEMENT table
120const int cSE_CASH_TYPE_len = 40;
121
122// SECTOR table
123const int cSC_NAME_len = 30;
124const int cSC_ID_len = 2;
125
126// STATUS_TYPE table
127const int cST_ID_len = 4;
128const int cST_NAME_len = 10;
129
130// TAX RATE table
131const int cTX_ID_len = 4;
132const int cTX_NAME_len = 50;
133
134// TRADE table
135const int cEXEC_NAME_len = cF_NAME_len + cM_NAME_len + cL_NAME_len + 3; // two spaces and one extra
136
137// TRADE_HISTORY table
138const int cTH_ST_ID_len = cST_ID_len;
139
140// TRADE TYPE table
141const int cTT_ID_len = 3;
142const int cTT_NAME_len = 12;
143
144// ZIP_CODE table
145const int cZC_TOWN_len = cTOWN_len;
146const int cZC_DIV_len = cDIV_len;
147const int cZC_CODE_len = cCODE_len;
148
149} // namespace TPCE
150
151#endif // TABLE_CONSTS_H
152