{"id":7104,"date":"2024-04-15T09:01:01","date_gmt":"2024-04-15T01:01:01","guid":{"rendered":""},"modified":"2024-04-15T09:01:01","modified_gmt":"2024-04-15T01:01:01","slug":"TPC-DS\u6807\u51c6\u89c4\u8303(2)","status":"publish","type":"post","link":"https:\/\/mushiming.com\/7104.html","title":{"rendered":"TPC-DS\u6807\u51c6\u89c4\u8303(2)"},"content":{"rendered":"
TPC-DS\u662f\u4e00\u5957\u51b3\u7b56\u652f\u6301\u7cfb\u7edf\u6d4b\u8bd5\u57fa\u51c6\uff0c\u4e3b\u8981\u9488\u5bf9\u96f6\u552e\u884c\u4e1a\u3002\u63d0\u4f9b99\u4e2aSQL\u67e5\u8be2\uff08SQL99\u62162003\uff09\uff0c\u5206\u6790\u6570\u636e\u91cf\u5927\uff0c\u6d4b\u8bd5\u6570\u636e\u4e0e\u5b9e\u9645\u5546\u4e1a\u6570\u636e\u9ad8\u5ea6\u76f8\u4f3c\uff0c\u540c\u65f6\u5177\u6709\u5404\u79cd\u4e1a\u52a1\u6a21\u578b\uff08\u5206\u6790\u62a5\u544a\u578b\uff0c\u6570\u636e\u6316\u6398\u578b\u7b49\u7b49\uff09\u3002\u56fd\u5185\u76ee\u524d\u76f8\u5173\u7684\u7ffb\u8bd1\u6587\u7ae0\u8f83\u5c11\u3002\u672c\u6587\u5c1d\u8bd5\u5bf9\u5b98\u7f51\u7684TPC BENCHMARK DS Standard Specification\uff08\u4e0b\u79f0\u201c\u539f\u6587\u201d\uff09\u8fdb\u884c\u7ffb\u8bd1\u3002\u7ffb\u8bd1\u4e3b\u8981\u53c2\u7167\u7684\u662f2017\u5e74\u53d1\u5e03\u76842.6.0\u7248\u672c\u3002<\/p>\n
\u7531\u4e8e\u539f\u6587\u4e00\u5171137\u9875\uff0c\u672c\u6587\u5728\u7ffb\u8bd1\u7684\u65f6\u5019\u4f1a\u8fdb\u884c\u4e00\u5b9a\u7684\u538b\u7f29\uff0c\u7a81\u51fa\u8f83\u4e3a\u5173\u952e\u7684\u4fe1\u606f\u3002\u672c\u6587\u7ae0\u8282\u540d\u79f0\uff0c\u5e8f\u53f7\uff0c\u5c0f\u6807\u9898\u7b49\u5747\u4e25\u683c\u6309\u7167\u539f\u6587\u7ffb\u8bd1\u6392\u5e8f\u3002<\/p>\n<\/p>\n
TPC-DS\u7684schema\u5bf9\u9500\u552e\u53ca\u9000\u8d27\u6d41\u7a0b\u8fdb\u884c\u4e86\u5efa\u6a21\u3002\u5305\u62ec\u9500\u552e\u4e09\u5927\u6e20\u9053\uff1a\u5546\u5e97\uff0c\u76ee\u5f55\uff0c\u4ee5\u53ca\u7f51\u7edc\u3002Schema\u5305\u542b\u4e03\u4e2a\u4e8b\u5b9e\u8868\uff1a<\/p>\n<\/p>\n
1. \u8d1f\u8d23\u4e09\u5927\u6e20\u9053\u4e2d\uff0c\u6bcf\u9879\u7684\u4ea7\u54c1\u9500\u552e\u4e0e\u9000\u8d27\u4e8b\u5b9e\u8868\u5171\u516d\u4e2a<\/p>\n
2. \u4e00\u4e2a\u9488\u5bf9\u76ee\u5f55\u53ca\u7f51\u7edc\u9500\u552e\u7684\u6e05\u5355\u5efa\u6a21\u7684\u4e8b\u5b9e\u8868<\/p>\n<\/p>\n
\u9664\u6b64\u4e4b\u5916\uff0cschema\u4e2d\u8fd8\u5305\u542b\u4e8617\u4e2a\u7ef4\u5ea6\u8868\u3002\u8fd9\u4e9b\u7ef4\u5ea6\u8868\u4e0e\u6240\u6709\u9500\u552e\u6e20\u9053\u5173\u8054\uff0c\u63a5\u4e0b\u6765\u5c06\u9010\u4e00\u9610\u8ff0\u5b83\u4eec\u7684\u4ee5\u4e0b\u51e0\u9879\u8bbe\u8ba1\u903b\u8f91\uff1a<\/p>\n<\/p>\n
1. \u8868\u540d\u53ca\u5176\u7f29\u5199<\/p>\n
2. \u6bcf\u4e2a\u4e8b\u5b9e\u8868\u4e0e\u76f8\u5173\u7684\u7ef4\u5ea6\u8868\u4e4b\u95f4\u7684\u903b\u8f91\u56fe<\/p>\n
3. \u6bcf\u4e2a\u8868\u53ca\u5b83\u4e0e\u5176\u4ed6\u8868\u4e4b\u95f4\u7684\u5173\u7cfb\u7684\u9ad8\u7ea7\u5b9a\u4e49<\/p>\n
4. \u6bcf\u4e00\u5217\u7684\u89c4\u683c\u4e0e\u57fa\u6570\u7684\u4fe1\u606f<\/p>\n<\/p>\n
2.2.1.1 \u5217\u540d\u4e4b\u95f4\u4e0d\u80fd\u91cd\u590d\uff0c\u4e14\u4ee5\u6240\u5728\u8868\u7684\u7f29\u5199\u4e3a\u5217\u540d\u5f00\u5934<\/p>\n<\/p>\n
2.2.1.2 \u8be5\u5217\u5982\u679c\u662f\u8868\u7684\u4e3b\u952e\u5217\u6216\u90e8\u5206\u4e3b\u952e\uff0c\u5219\u547d\u540d\u4e3aPrimary Key\u3002\u5982\u679c\u8fd9\u4e2a\u8868\u4f7f\u7528\u7684\u662f\u590d\u5408\u4e3b\u952e\uff0c\u90a3\u4e48\u8be5\u5217\u5217\u540d\u540e\u9762\u8981\u8ddf\u62ec\u53f7\uff0c\u62ec\u53f7\u5185\u6807\u6ce8\u5176\u5e8f\u53f7\u3002<\/p>\n<\/p>\n
2.2.1.3 \u8be5\u5217\u5982\u679c\u662f\u4e1a\u52a1\u952e\u7684\u4e00\u90e8\u5206\uff0c\u5219\u5217\u540d\u540e\u9762\u8981\u6709\u201c(B)\u201d\u3002\u4e1a\u52a1\u952e\u5728\u6570\u636e\u4ed3\u5e93\u7684schema\u4e2d\u65e2\u4e0d\u662f\u4e3b\u952e\uff0c\u4e5f\u4e0d\u662f\u5916\u952e\uff0c\u4ec5\u4ec5\u662f\u4e3a\u4e86\u5728\u6570\u636e\u7ef4\u62a4\u65f6\uff0c\u5c06\u65b0\u6570\u636e\u4e0e\u6e90\u8868\u7684\u66f4\u65b0\u6570\u636e\u8fdb\u884c\u533a\u522b\u3002<\/p>\n<\/p>\n
2.2.2.1 \u6bcf\u5217\u4f7f\u7528\u7684\u6570\u636e\u90fd\u662f\u4ee5\u4e0b\u6570\u636e\u7c7b\u578b\u4e2d\u7684\u4e00\u79cd\uff1a<\/p>\n
a) Indentifier\uff0c\u751f\u6210\u7684\u4efb\u4f55\u8be5\u5217\u952e\u503c\u90fd\u80fd\u88ab\u8fd9\u4e00\u5217\u4f7f\u7528<\/p>\n
b) Integer\uff0c\u8be5\u5217\u53ef\u4ee5\u51c6\u786e\u8868\u793a\u4efb\u4f55\u6574\u6570\uff0c\u503c\u57df\u4e3a-2^63\u52302^63-1<\/p>\n
c) Decimal(d, f)\uff0c\u8be5\u5217\u53ef\u4ee5\u7cbe\u786e\u8868\u793a\u8303\u56f4\u5185\u4efb\u4f55\u5c0f\u6570\uff0c\u8303\u56f4\u662f\u6574\u6570\u52a0\u5c0f\u6570\u6700\u591ad\u4f4d\uff0c\u5c0f\u6570\u70b9\u540e\u4e00\u5171f\u4f4d<\/p>\n
d) Char(N)\uff0c\u8be5\u5217\u53ef\u4ee5\u8868\u793a\u56fa\u5b9a\u957f\u5ea6\u4e3aN\u7684\u5b57\u7b26\u4e32\u3002\u4e0d\u8db3N\u7684\u540e\u9762\u81ea\u52a8\u8865\u7a7a\u683c\u5b58\u50a8\uff0c\u6216\u8005\u5728\u68c0\u7d22\u65f6\u81ea\u52a8\u8865\u7a7a\u683c\u4ee5\u4fdd\u8bc1CHAR_LENGTH()\u51fd\u6570\u8fd4\u56de\u503c\u4e3aN\u3002<\/p>\n
e) Varchar(N)\uff0c\u8be5\u5217\u53ef\u4ee5\u8868\u793a\u6700\u5927\u957f\u5ea6\u4e3aN\u7684\u5b57\u7b26\u4e32\u3002Varchar(N)\u53ef\u4ee5\u8f6cchar(N)\u3002<\/p>\n
f) Date\uff0c\u65e5\u671f\u8303\u56f41900\u5e741\u67081\u65e5\u52302199\u5e7412\u670831\u65e5<\/p>\n<\/p>\n
2.2.2.2 \u672c\u57fa\u51c6\u7684\u6570\u636e\u7c7b\u578b\u4e0d\u4e0e\u4efb\u4f55\u7279\u5b9aSQL\u7684\u6570\u636e\u7c7b\u578b\u76f8\u5bf9\u5e94\uff0c\u56e0\u6b64\u7ed9\u51fa\u4e86\u4e0a\u8ff0\u5b9a\u4e49\uff0c\u9610\u660e\u4e86\u6bcf\u4e2a\u6570\u636e\u7c7b\u578b\u7684\u7279\u70b9\u3002\u5b9e\u73b0\u57fa\u51c6\u65f6\uff0c\u53ef\u4ee5\u89c6\u60c5\u51b5\u7528\u7b26\u5408\u5bf9\u5e94\u6761\u4ef6\u7684SQL\u6570\u636e\u7c7b\u578b\u3002<\/p>\n<\/p>\n
2.2.2.3 \u9664\u6807\u8bc6\u7b26\u5916\uff0c\u4f7f\u7528\u8005\u5982\u679c\u9009\u62e9\u67d0\u79cd\u6570\u636e\u7c7b\u578bV\u5b9e\u73b0\u4e86\u57fa\u51c6\u4e2d\u7684\u4e00\u79cd\u6570\u636e\u7c7b\u578bT\uff0c\u5219\u57fa\u51c6\u4e2d\u6240\u6709\u76f8\u540c\u6570\u636e\u7c7b\u578bT\u7684\u5b9e\u4f8b\u90fd\u8981\u7531V\u6765\u5b9e\u73b0\u3002<\/p>\n<\/p>\n
\u5982\u679cNULL\u5217\u4e2d\u5305\u542b\u201cN\u201d\uff0c\u5219\u6bcf\u884c\u90fd\u4f1a\u586b\u5165\u6240\u6709\u6bd4\u4f8b\u56e0\u5b50\u3002\u5982\u679c\u8be5\u5b57\u6bb5\u4e3a\u7a7a\uff0c\u5219\u6b64\u5217\u53ef\u80fd\u5305\u542bNULL\u3002<\/p>\n<\/p>\n
\u5982\u679c\u8868\u5185\u67d0\u5217\u7684\u503c\u4e0e\u5176\u4ed6\u8868\u7684\u67d0\u5217\u76f8\u5173\u8054\uff0c\u5219\u5916\u90e8\u5217\u7684\u540d\u79f0\u5c06\u51fa\u73b0\u5728\u201c\u5916\u952e\u201d\u5b57\u6bb5\u4e2d\u3002<\/p>\n<\/p>\n
2.3.1.1 \u5546\u5e97\u9500\u552eER\u56fe<\/p>\n<\/p>\n
<\/p>\n<\/p>\n
2.3.1.2 \u5546\u5e97\u9500\u552e\u5217\u5b9a\u4e49<\/p>\n
\u8868\u4e2d\u6bcf\u884c\u4ee3\u8868\u4e00\u4e2a\u5355\u72ec\u7684\u8ba2\u5355\u9879\uff0c\u8fd9\u4e9b\u8ba2\u5355\u9879\u90fd\u662f\u901a\u8fc7\u5e97\u94fa\u6e20\u9053\u9500\u552e\u7684\uff0c\u5e76\u4e14\u8bb0\u5f55\u5728\u4e8b\u5b9e\u8868store_sales\u4e2d\u3002<\/p>\n<\/p>\n
<\/p>\n<\/p>\n
<\/p>\n<\/p>\n
2.3.2.1 \u5546\u5e97\u9000\u8d27ER\u56fe<\/p>\n<\/p>\n
<\/p>\n<\/p>\n
2.3.2.2 \u5546\u5e97\u9000\u8d27\u5217\u5b9a\u4e49<\/p>\n
\u8868\u4e2d\u6bcf\u884c\u4ee3\u8868\u4e00\u4e2a\u5355\u72ec\u7684\u9000\u8d27\u9879\uff0c\u8fd9\u4e9b\u9000\u8d27\u9879\u90fd\u662f\u901a\u8fc7\u5e97\u94fa\u6e20\u9053\u9500\u552e\u7684\uff0c\u5e76\u4e14\u8bb0\u5f55\u5728\u4e8b\u5b9e\u8868store_returns\u4e2d\u3002<\/p>\n<\/p>\n
<\/p>\n<\/p>\n
<\/p>\n<\/p>\n
2.3.3.1 \u76ee\u5f55\u9500\u552eER\u56fe<\/p>\n<\/p>\n
<\/p>\n<\/p>\n
2.3.3.2 \u76ee\u5f55\u9500\u552e\u5217\u5217\u5b9a\u4e49<\/p>\n
\u8868\u4e2d\u6bcf\u884c\u4ee3\u8868\u4e00\u4e2a\u5355\u72ec\u7684\u8ba2\u5355\u9879\uff0c\u8fd9\u4e9b\u8ba2\u5355\u9879\u90fd\u662f\u901a\u8fc7\u76ee\u5f55\u6e20\u9053\u9500\u552e\u7684\uff0c\u5e76\u4e14\u8bb0\u5f55\u5728\u4e8b\u5b9e\u8868catalog_sales\u4e2d\u3002<\/p>\n<\/p>\n
<\/p>\n<\/p>\n
<\/p>\n<\/p>\n
2.3.4.1 \u76ee\u5f55\u9000\u8d27ER\u56fe<\/p>\n<\/p>\n
<\/p>\n<\/p>\n
2.3.4.2 \u76ee\u5f55\u9000\u8d27\u5217\u5b9a\u4e49<\/p>\n
\u8868\u4e2d\u6bcf\u884c\u4ee3\u8868\u4e00\u4e2a\u5355\u72ec\u7684\u9000\u8d27\u9879\uff0c\u8fd9\u4e9b\u9000\u8d27\u9879\u90fd\u662f\u901a\u8fc7\u76ee\u5f55\u6e20\u9053\u9500\u552e\u7684\uff0c\u5e76\u4e14\u8bb0\u5f55\u5728\u4e8b\u5b9e\u8868catalog_returns\u4e2d\u3002<\/p>\n<\/p>\n
<\/p>\n<\/p>\n
<\/p>\n<\/p>\n
2.3.5.1 \u7f51\u7edc\u9500\u552eER\u56fe<\/p>\n<\/p>\n
<\/p>\n<\/p>\n
2.3.5.2 \u7f51\u7edc\u9500\u552e\u5217\u5b9a\u4e49<\/p>\n
\u8868\u4e2d\u6bcf\u884c\u4ee3\u8868\u4e00\u4e2a\u5355\u72ec\u7684\u8ba2\u5355\u9879\uff0c\u8fd9\u4e9b\u8ba2\u5355\u9879\u90fd\u662f\u901a\u8fc7\u7f51\u7edc\u6e20\u9053\u9500\u552e\u7684\uff0c\u5e76\u4e14\u8bb0\u5f55\u5728\u4e8b\u5b9e\u8868web_sales\u4e2d\u3002<\/p>\n<\/p>\n
<\/p>\n<\/p>\n
<\/p>\n<\/p>\n
2.3.6.1 \u7f51\u7edc\u9000\u8d27ER\u56fe<\/p>\n<\/p>\n
<\/p>\n<\/p>\n
2.3.6.2 \u7f51\u7edc\u9000\u8d27\u5217\u5b9a\u4e49<\/p>\n
\u8868\u4e2d\u6bcf\u884c\u4ee3\u8868\u4e00\u4e2a\u5355\u72ec\u7684\u9000\u8d27\u9879\uff0c\u8fd9\u4e9b\u9000\u8d27\u9879\u90fd\u662f\u901a\u8fc7\u7f51\u7edc\u6e20\u9053\u9500\u552e\u7684\uff0c\u5e76\u4e14\u8bb0\u5f55\u5728\u4e8b\u5b9e\u8868web_returns\u4e2d\u3002<\/p>\n<\/p>\n
<\/p>\n<\/p>\n
<\/p>\n<\/p>\n
2.3.7.1 \u5e93\u5b58ER\u56fe<\/p>\n<\/p>\n
<\/p>\n<\/p>\n
2.3.7.2 \u5e93\u5b58\u5217\u5b9a\u4e49<\/p>\n
\u8868\u4e2d\u6bcf\u884c\u8868\u793a\u6bcf\u5468\u7279\u5b9a\u4ed3\u5e93\u4e2d\uff0c\u8be5\u5546\u54c1\u7684\u6570\u91cf\u3002<\/p>\n<\/p>\n
<\/p>\n<\/p>\n
\u8be5\u7ef4\u5ea6\u8868\u4e2d\u6bcf\u884c\u663e\u793a\u4e00\u4e2a\u5546\u5e97\u7684\u7ec6\u8282\u4fe1\u606f\u3002<\/p>\n<\/p>\n
<\/p>\n<\/p>\n
<\/p>\n<\/p>\n
\u8be5\u7ef4\u5ea6\u8868\u4e2d\u6bcf\u884c\u663e\u793a\u4e00\u4e2a\u547c\u53eb\u4e2d\u5fc3\u7684\u7ec6\u8282\u4fe1\u606f\u3002<\/p>\n<\/p>\n
<\/p>\n<\/p>\n
\u8be5\u7ef4\u5ea6\u8868\u4e2d\u6bcf\u884c\u663e\u793a\u4e00\u4e2a\u76ee\u5f55\u9875\u7684\u7ec6\u8282\u4fe1\u606f\u3002<\/p>\n<\/p>\n
<\/p>\n<\/p>\n
\u8be5\u7ef4\u5ea6\u8868\u4e2d\u6bcf\u884c\u663e\u793a\u4e00\u4e2a\u7f51\u7ad9\u7684\u7ec6\u8282\u4fe1\u606f\u3002<\/p>\n<\/p>\n
<\/p>\n<\/p>\n
\u8be5\u7ef4\u5ea6\u8868\u4e2d\u6bcf\u884c\u663e\u793a\u4e00\u4e2a\u7f51\u9875\u7684\u7ec6\u8282\u4fe1\u606f\u3002<\/p>\n
<\/p>\n<\/p>\n
<\/p>\n<\/p>\n
\u8be5\u7ef4\u5ea6\u8868\u4e2d\u4ee3\u8868\u663e\u793a\u4e00\u4e2a\u5b58\u8d27\u4ed3\u5e93\u7684\u4fe1\u606f\u3002<\/p>\n<\/p>\n
<\/p>\n<\/p>\n
\u8be5\u7ef4\u5ea6\u8868\u4e2d\u6bcf\u884c\u4ee3\u8868\u4e00\u4e2a\u987e\u5ba2\u7684\u4fe1\u606f\u3002<\/p>\n<\/p>\n
<\/p>\n<\/p>\n
\u8be5\u7ef4\u5ea6\u8868\u4e2d\u6bcf\u884c\u4ee3\u8868\u4e00\u4e2a\u552f\u4e00\u7684\u987e\u5ba2\u5730\u5740\u4fe1\u606f\uff08\u6709\u4e9b\u987e\u5ba2\u4f1a\u6709\u4e0d\u6b62\u4e00\u4e2a\u5730\u5740\uff09\u3002<\/p>\n<\/p>\n
<\/p>\n<\/p>\n
<\/p>\n<\/p>\n
\u987e\u5ba2\u4eba\u7fa4\u7edf\u8ba1\u8868\u4e2d\uff0c\u6709\u4e00\u884c\u662f\u7528\u6765\u663e\u793a\u7279\u5b9a\u7684\u4eba\u7fa4\u4fe1\u606f\u7ec4\u5408\u3002<\/p>\n<\/p>\n
The customer demographics table contains one row for each unique combination of customer demographic
information<\/p>\n<\/p>\n
<\/p>\n<\/p>\n
\u8be5\u8868\u4e2d\uff0c\u6bcf\u4e00\u884c\u4ee3\u8868\u4e00\u4e2a\u516c\u5386\u65e5\u3002\u8be5\u884c\u7684\u5112\u7565\u65e5\u53ef\u4ee5\u7528\u4f5c\u4ee3\u7406\u5173\u952e\u5b57(d_date_sk)\u3002<\/p>\n<\/p>\n
<\/p>\n<\/p>\n
\u8be5\u8868\u4e2d\uff0c\u6bcf\u4e00\u884c\u8868\u793a\u4e00\u4e2a\u5bb6\u5ead\u4eba\u7fa4\u72b6\u51b5\u3002<\/p>\n<\/p>\n
<\/p>\n<\/p>\n
\u8be5\u8868\u4e2d\uff0c\u6bcf\u4e00\u884c\u8868\u793a\u4e00\u4e2a\u7279\u5b9a\u4ea7\u54c1\u7684\u6784\u6210\uff08\u4f8b\u5982\uff0c\u5c3a\u5bf8\uff0c\u989c\u8272\uff0c\u5236\u9020\u5546\u7b49\uff09\u3002<\/p>\n<\/p>\n
<\/p>\n<\/p>\n
\u8be5\u8868\u4e2d\u7684\u6bcf\u4e00\u884c\u8868\u793a\u4e00\u4e2a\u6536\u5165\u8303\u56f4\u7684\u4fe1\u606f\u3002<\/p>\n<\/p>\n
<\/p>\n<\/p>\n
\u8be5\u8868\u4e2d\uff0c\u6bcf\u884c\u8868\u793a\u4e00\u4e2a\u7279\u5b9a\u5546\u54c1\u7684\u4fc3\u9500\u4fe1\u606f\uff08\u4f8b\u5982\u5e7f\u544a\uff0c\u9500\u552e\uff0c\u516c\u5173\uff09\u3002<\/p>\n<\/p>\n
<\/p>\n<\/p>\n
\u6b64\u8868\u4e2d\u7684\u6bcf\u4e00\u884c\u8868\u793a\u4e00\u4e2a\u88ab\u9000\u8d27\u7684\u5546\u54c1\u7684\u9000\u8d27\u539f\u56e0\u3002<\/p>\n<\/p>\n
<\/p>\n<\/p>\n
\u6b64\u8868\u4e2d\u7684\u6bcf\u4e00\u884c\u8868\u793a\u4e00\u79cd\u8fd0\u9001\u6a21\u5f0f\u3002<\/p>\n<\/p>\n
<\/p>\n<\/p>\n
\u8be5\u8868\u4e2d\u6bcf\u884c\u8868\u793a\u4e00\u79d2\u3002<\/p>\n<\/p>\n
<\/p>\n<\/p>\n
\u57fa\u51c6\u6d4b\u8bd5\u65f6\u4e0d\u4f1a\u7528\u5230\u8fd9\u4e2a\u8868\uff0cdsdgen\u4f1a\u751f\u6210\u4e00\u4e2aflat file\uff08\u89c1\u9644\u5f55F\uff09\uff0c\u8fd9\u4e2a\u6587\u4ef6\u53ef\u4ee5\u786e\u4fdd\u4f60\u5728\u4f7f\u7528\u65f6\uff0c\u5f53\u524d\u7684\u6570\u636e\u96c6\u662f\u7531\u6b63\u786e\u7248\u672c\u7684TPC-DS\u642d\u5efa\u7684\u3002<\/p>\n<\/p>\n
<\/p>\n<\/p>\n
2.5.1.1 \u57282.2\u548c2.3\u4e2d\u5b9a\u4e49\u7684\u8868\u88ab\u79f0\u4e3a\u57fa\u8868(base tables)\uff0c\u7531dsdgen\u751f\u6210\u7684flat file\u6570\u636e\u4e0e\u6bcf\u4e2a\u57fa\u8868\u5bf9\u5e94\u5e76\u88ab\u52a0\u8f7d\u5230\u6bcf\u4e2a\u57fa\u8868\u4e2d\u79f0\u4e3a\u57fa\u8868\u6570\u636e\uff0c\u5305\u542b\u57fa\u8868\u6570\u636e\u7684\u7ed3\u6784\u88ab\u79f0\u4e3a\u57fa\u8868\u6570\u636e\u7ed3\u6784\u3002<\/p>\n<\/p>\n
2.5.1.2 \u9664\u4e86\u57fa\u8868\u6570\u636e\u7ed3\u6784\u4e4b\u5916\uff0c\u4efb\u4f55\u6570\u636e\u5e93\u7ed3\u6784\uff0c\u5982\u679c\u542b\u6709\u57fa\u8868\u6570\u636e\u7684\u590d\u5236\u3001\u5bf9\u57fa\u8868\u6570\u636e\u7684\u5f15\u7528\u3001\u6216\u7531\u57fa\u8868\u6570\u636e\u8ba1\u7b97\u5f97\u5230\u7684\u6570\u636e\uff0c\u90fd\u5c5e\u4e8e\u8f85\u52a9\u6570\u636e\u7ed3\u6784(ADS)\u3002ADS\u4e2d\u7684\u6570\u636e\u6765\u81ea\u4e8e\u57fa\u8868\uff0c\u53ef\u4ee5\u901a\u8fc7\u5f15\u7528\u7684\u65b9\u5f0f\u5b9e\u73b0ADS\u3002\u57fa\u8868\u6570\u636e\u7ed3\u6784\u4e2d\u7684\u6570\u636e\uff0c\u4e0e\u5176ADS\u4e2d\u7684\u6570\u636e\uff0c\u6709\u7740\u672c\u8d28\u533a\u522b\u3002ADS\u7531\u4e8e\u662f\u5bf9\u57fa\u8868\u6570\u636e\u7ed3\u6784\u7684\u4e00\u79cd\u590d\u5236\u6216\u5f15\u7528\uff0c\u56e0\u6b64\u5bf9ADS\u505a\u7684\u5220\u9664\u5e76\u4e0d\u4f1a\u4f5c\u7528\u5230\u57fa\u8868\u6570\u636e\u7ed3\u6784\u4e0a\uff0c\u53ea\u6709\u5728\u57fa\u8868\u6570\u636e\u7ed3\u6784\u4e0a\u505a\u7684\u5220\u9664\u624d\u4f1a\u5bfc\u81f4\u57fa\u8868\u81ea\u8eab\u7684\u6570\u636e\u4e22\u5931\u3002<\/p>\n<\/p>\n
2.5.1.3 ADS\u6709\u4e24\u79cd\u7c7b\u578b\uff1a\u663e\u6027ADS(EADS)\u4e0e\u9690\u5f62ADS(IADS)\u3002EADS\u7684\u521b\u5efa\u662f\u4e00\u4e9b\u6307\u4ee4\u5bfc\u81f4\u7684\u7ed3\u679c\uff08\u4f8b\u5982DDL\uff0c\u4f1a\u8bdd\u9009\u9879\uff0c\u5168\u5c40\u914d\u7f6e\u53c2\u6570\uff09\uff0c\u8fd9\u4e9b\u6307\u4ee4\u88ab\u79f0\u4e3aEADS\u6307\u4ee4\u3002EADS\u4e0d\u4f1a\u5728\u6ca1\u6709\u6307\u4ee4\u51fa\u73b0\u7684\u60c5\u51b5\u4e0b\u88ab\u521b\u5efa\u3002\u4e0d\u5c5e\u4e8eEADS\u7684ADS\u5c31\u88ab\u5b9a\u4e49\u4e3aIADS\u4e86\u3002<\/p>\n<\/p>\n
2.5.1.4 \u5c06\u8868\u6216EADS\u4e2d\u7684\u884c\uff0c\u5206\u914d\u7ed9\u4e0d\u540c\u7684\u6587\u4ef6\u3001\u78c1\u76d8\u3001\u6216\u533a\u57df\u7684\u8fc7\u7a0b\uff0c\u88ab\u79f0\u4e3a\u6c34\u5e73\u5206\u533a(horizontal partitioning)\u3002<\/p>\n<\/p>\n
2.5.1.5 \u5c06\u5217\u5206\u914d\u7ed9\u4e0d\u540c\u7684\u6587\u4ef6\u3001\u78c1\u76d8\u3001\u6216\u533a\u57df\u7684\u8fc7\u7a0b\uff0c\u5c31\u662f\u5782\u76f4\u5206\u533a(vertical partitioning)\u3002<\/p>\n<\/p>\n
2.5.1.6 \u4e3b\u952e\u662f\u552f\u4e00\u6807\u5fd7\u884c\u7684\u4e00\u4e2a\u6216\u591a\u4e2a\u5217\u3002\u4e3b\u952e\u5217\u4e0d\u7ba1\u6709\u51e0\u5217\uff0c\u91cc\u9762\u7684\u503c\u90fd\u4e0d\u80fd\u4e3a\u7a7a\uff0c\u800c\u4e14\u4e00\u4e2a\u8868\u6700\u591a\u53ea\u80fd\u6709\u4e00\u4e2a\u4e3b\u952e\uff0c\u5373\u4f7f\u6709\u591a\u4e2a\u4e3b\u952e\u5217\u4e5f\u53ea\u80fd\u6709\u4e00\u4e2a\u4e3b\u952e\u5b58\u5728\u3002<\/p>\n<\/p>\n
2.5.1.7 \u5916\u952e\u662f\u7528\u4e8e\u5728\u4e24\u4e2a\u8868\u4e2d\u7684\u6570\u636e\u4e4b\u95f4\u5efa\u7acb\u94fe\u63a5\u7684\u5217\u6216\u5217\u7684\u7ec4\u5408\u3002\u901a\u8fc7\u5c06a\u8868\u7684\u4e3b\u952e\u5217\u6dfb\u52a0\u5230b\u8868\u4e2d\uff0c\u4e3a\u4e24\u4e2a\u8868\u5efa\u7acb\u8fde\u63a5\uff0c\u5219a\u8868\u7684\u4e3b\u952e\u5217\u4e3ab\u8868\u4e2d\u7684\u5916\u952e\u3002\u56e0\u6b64\u4e00\u4e2a\u8868\u7684\u5916\u952e\u5b9e\u9645\u4e0a\u5c31\u662f\u522b\u7684\u8868\u7684\u4e3b\u952e\u3002<\/p>\n<\/p>\n
2.5.1.8 \u4e3b\u952e\u548c\u5916\u952e\u7684\u5b9a\u4e49\u7075\u6d3b\u3002<\/p>\n<\/p>\n
2.5.1.9 \u672c\u89c4\u8303\u63d0\u53ca\u7684\u4e3b\u952e\u548c\u5916\u952e\uff0c\u6307\u7684\u662f\u5728\u7b2c2.3\u548c2.4\u8282\u4e2d\u5b9a\u4e49\u7684\u4e3b\u952e\u548c\u5916\u952e\u3002<\/p>\n<\/p>\n
2.5.2.1 \u6570\u636e\u5904\u7406\u7cfb\u7edf\u5e94\u4f7f\u7528\u901a\u7528\u7684\u7cfb\u7edf\u8fdb\u884c\u5b9e\u73b0(DBMS)\u3002<\/p>\n<\/p>\n
2.5.2.2 \u7528\u4e8e\u5b9e\u73b0\u903b\u8f91schema\u5b9a\u4e49\u7684\uff0cSQL\u6570\u636e\u5b9a\u4e49\u8bed\u53e5\u548c\u76f8\u5173\u811a\u672c\uff0c\u88ab\u5b9a\u4e49\u4e3aDDL\u3002<\/p>\n<\/p>\n
2.5.2.3 \u8fdb\u884c\u67e5\u8be2\u9a8c\u8bc1\u6d4b\u8bd5\u7684\u6570\u636e\u5e93\u88ab\u5b9a\u4e49\u4e3a\u8d44\u683c\u6570\u636e\u5e93(qualification database)\u3002<\/p>\n<\/p>\n
2.5.2.4 \u8fdb\u884c\u6027\u80fd\u62a5\u544a\u7684\u6570\u636e\u5e93\u88ab\u5b9a\u4e49\u4e3a\u6d4b\u8bd5\u6570\u636e\u5e93(test database)\u3002<\/p>\n<\/p>\n
2.5.2.5 \u5982\u679c\u4e00\u4e2a\u805a\u7c7b\u4e0d\u4f1a\u6539\u53d8\u8868\u4e4b\u95f4\u7684\u903b\u8f91\u5173\u7cfb\uff0c\u5219\u53ef\u4ee5\u5bf9\u6570\u636e\u5e93\u4e2d\u4e0d\u540c\u8868\u8fdb\u884c\u805a\u7c7b\u3002<\/p>\n<\/p>\n
2.5.2.6 \u8868\u540d\u5e94\u7b26\u54082.3\u4ee5\u53ca2.4\u4e2d\u7684\u89c4\u5b9a\u3002\u5982\u679c\u6570\u636e\u5904\u7406\u7cfb\u7edf\u4e0d\u652f\u6301\u7b26\u5408\u89c4\u5b9a\u7684\u547d\u540d\uff0c\u90a3\u4e48\u53ef\u4ee5\u5bf9\u540d\u79f0\u8fdb\u884c\u4fee\u6539\uff0c\u5e76\u4e14\u4fdd\u8bc1\uff1a<\/p>\n
1. \u540d\u79f0\u6539\u53d8\u5f88\u5c0f<\/p>\n
2. \u540d\u79f0\u7684\u6539\u53d8\u4e0d\u4f1a\u5bf9\u6027\u80fd\u9020\u6210\u5f71\u54cd<\/p>\n
3. \u6839\u636e4.2.3\u5bf9\u67e5\u8be2\u96c6\u8fdb\u884c\u4fee\u6539<\/p>\n<\/p>\n
2.5.2.7 \u6839\u636e\u7b2c2.3\u6761\u548c\u7b2c2.4\u6761\u5217\u51fa\u7684\u6bcf\u4e2a\u8868\u683c\uff0c\u90fd\u5e94\u6309\u7167\u4ee5\u4e0a\u5b9a\u4e49\u6765\u5b9e\u73b0\u5217\u3002<\/p>\n<\/p>\n
2.5.2.8 \u5217\u540d\u5e94\u7b26\u54082.3\u4ee5\u53ca2.4\u4e2d\u7684\u89c4\u5b9a\u3002\u5982\u679c\u6570\u636e\u5904\u7406\u7cfb\u7edf\u4e0d\u652f\u6301\u7b26\u5408\u89c4\u5b9a\u7684\u547d\u540d\uff0c\u90a3\u4e48\u53ef\u4ee5\u5bf9\u540d\u79f0\u8fdb\u884c\u4fee\u6539\uff0c\u5e76\u4e14\u4fdd\u8bc1\uff1a<\/p>\n
1. \u540d\u79f0\u6539\u53d8\u5f88\u5c0f<\/p>\n
2. \u9075\u5faa\u5b9e\u73b0\u57fa\u51c6\u7684\u7cfb\u7edf\u4e2d\uff0c\u4f7f\u7528\u8bb0\u5f55\u7684\u547d\u540d\u7ea6\u5b9a<\/p>\n
3. \u540d\u79f0\u7684\u6539\u53d8\u4e0d\u4f1a\u5bf9\u6027\u80fd\u9020\u6210\u5f71\u54cd<\/p>\n
4. \u6839\u636e4.2.3\u5bf9\u67e5\u8be2\u96c6\u8fdb\u884c\u4fee\u6539<\/p>\n<\/p>\n
2.5.2.9 \u7ed9\u5b9a\u8868\u683c\u4e2d\u7684\u5217\u53ef\u4ee5\u4ee5\u4efb\u4f55\u987a\u5e8f\u5b9e\u73b0\uff0c\u4f46\u662f\u8868\u5b9a\u4e49\u4e2d\u5217\u51fa\u7684\u6240\u6709\u5217\u90fd\u5e94\u8be5\u88ab\u5b9e\u73b0\uff0c\u53ea\u662f\u4e0d\u5fc5\u90fd\u6dfb\u52a0\u5230\u8868\u4e2d\u3002<\/p>\n<\/p>\n
2.5.2.10 \u7b2c2.3\u548c2.4\u6761\u5b9a\u4e49\u7684\u6bcf\u4e2a\u5217\u5e94\u4e3a\u79bb\u6563\u5217\uff0c\u53ef\u4ee5\u7531\u6570\u636e\u5904\u7406\u7cfb\u7edf\u72ec\u7acb\u8bbf\u95ee\u3002\u7279\u522b\u6ce8\u610f\uff1a<\/p>\n
1. \u5217\u4e0d\u80fd\u88ab\u5408\u5e76\u3002\u6bd4\u5982\u4e0d\u80fd\u5c06C_LOGIN\u548cC_EMAIL_ADDRESS\u5408\u5e76\u4e3a\u4e00\u4e2aC_DATA\u5b9e\u73b0\u3002<\/p>\n
2. \u5217\u4e0d\u80fd\u88ab\u5206\u88c2\u3002\u6bd4\u5982P_TYPE\u4e0d\u80fd\u4ee5\u4e24\u4e2a\u79bb\u6563\u5217P_TYPE_SUBSTR1\u548cP_TYPE_SUBSTR2\u7684\u65b9\u5f0f\u5b9e\u73b0\u3002<\/p>\n<\/p>\n
2.5.2.11 \u6570\u636e\u5e93\u5e94\u5141\u8bb8\u63d2\u5165\u7b26\u5408\u5217\u6570\u636e\u7c7b\u578b\uff0c\u4e14\u7b26\u5408\u7ea6\u675f\u6761\u4ef6\u7684\u4efb\u610f\u6570\u636e\u503c\u3002\u7ea6\u675f\u6761\u4ef6\u9700\u9075\u5faa\u7b2c2.5.4\u6761\u5b9a\u4e49\u3002<\/p>\n<\/p>\n
2.3.5.1 \u9664\u672c\u8282\u89c4\u5b9a\u5916\uff0c\u7981\u6b62\u590d\u5236\u6570\u636e\u5e93\u5bf9\u8c61\uff08\u5373\u8868\uff0c\u884c\u6216\u5217\uff09\u3002<\/p>\n<\/p>\n
2.3.5.2 \u5982\u679c\u4e00\u4e2aEADS\u4e0d\u5305\u62ec\u4eceCatalog_Sales\u6216Catalog_Returns\u5b9e\u73b0\u7684\u6570\u636e\uff0c\u5219\u6b64EADS\u53d7\u4ee5\u4e0b\u9650\u5236\uff1a<\/p>\n
1) \u5b83\u53ef\u4ee5\u5b9e\u73b0\u7684\u6570\u636e\u6765\u81ea\u6700\u591a\u4e00\u4e2a\u57fa\u8868\u3002<\/p>\n
2) \u5b83\u53ef\u80fd\u4f1a\u5b9e\u73b0\u4ee5\u4e0b\u5168\u90e8\u6216\u90e8\u5206\u5185\u5bb9\uff1a<\/p>\n
1. \u5982\u679cPK\u662f\u590d\u5408\u952e\uff0c\u5219\u53ef\u4ee5\u5b9e\u73b0\u4e3b\u952e\u6216PK\u5217\u7684\u4efb\u4f55\u5b50\u96c6<\/p>\n
2. \u5b9e\u73b0\u5bf9\u76f8\u5e94\u57fa\u8868\u7684\u884c\u7684\u5f15\u7528\u6216\u6307\u9488\uff08\u4f8b\u5982\u201c\u884cID\u201d\uff09<\/p>\n
3. \u5b9e\u73b0\u4ee5\u4e0b\u6700\u591a\u4e00\u4e2a\uff1a<\/p>\n
a) \u5982\u679cFK\u662f\u590d\u5408\u952e\uff0c\u5219\u53ef\u4ee5\u5b9e\u73b0\u5916\u952e\u6216FK\u5217\u7684\u4efb\u4f55\u5b50\u96c6<\/p>\n
b) \u5b9e\u73b0\u5177\u6709\u65e5\u671f\u6570\u636e\u7c7b\u578b\u7684\u5217<\/p>\n
c) \u5b9e\u73b0\u4e1a\u52a1\u952e\u5217<\/p>\n<\/p>\n
2.3.5.3 \u5982\u679c\u4e00\u4e2aEADS\u5305\u542b\u4eceCatalog_Sales\u6216Catalog_Returns\u7684\u6570\u636e\uff0c\u90a3\u4e48\u53ef\u80fd\u4e0d\u5305\u62ecStore_Sales\uff0cStore_Returns\uff0cWeb_Sales\uff0cWeb_Returns\u6216Inventory\u4e2d\u7684\u4efb\u4f55\u6570\u636e\u3002<\/p>\n<\/p>\n
2.3.5.4 \u5982\u679c\u4e00\u4e2aEADS\u7684\u6570\u636e\u6765\u6e90\u4e8e\u4e8b\u5b9e\u8868\u548c\u7ef4\u5ea6\u8868\uff0c\u5219\u6b64EADS\u5fc5\u987b\u6709FK-PK\u76f8\u5173\u5217\u3002<\/p>\n<\/p>\n
2.3.5.5 \u9664\u975e\u662f2.5.3.2\u4e2d\u8bb8\u53ef\u7684\u7279\u6b8a\u60c5\u51b5\uff0c\u5426\u5219\u5b9e\u73b0\u5982\u679cEADS\u7684\u6570\u636e\u6765\u81ea\u4e00\u4e2a\u6216\u591a\u4e2a\u7ef4\u5ea6\u8868\uff0c\u5fc5\u987b\u540c\u65f6\u5b9e\u73b0Catalog_Sales\u548c\/\u6216Catalog_Returns\u7684\u6570\u636e\u7684EADS\u3002\u5b9e\u73b0\u6765\u81ea\u4e00\u4e2a\u6216\u591a\u4e2a\u7ef4\u5ea6\u8868\u7684\u6570\u636e\u7684EADS\u65f6\uff0c\u5fc5\u987b\u4e3a\u6bcf\u4e2a\u4e8b\u5b9e\u8868\u884c\u5b9e\u73b0\u81f3\u5c11\u4e00\u4e2a\u7ef4\u5ea6\u884c\uff0c\u9664\u975e\u7ef4\u5ea6\u884c\u7684\u5916\u952e\u503c\u4e3a\u7a7a\u3002<\/p>\n<\/p>\n
2.3.5.6 \u5728\u4ee5\u4e0b\u60c5\u51b5\u65f6\uff0c\u5b9e\u73b0EADS\u65f6\u53ef\u4ee5\u5bf9\u57fa\u8868\u6570\u636e\u590d\u5236\uff1a<\/p>\n
1. \u6240\u6709\u590d\u5236\u6570\u636e\u7531\u7528\u4e8e\u57fa\u51c6\u6d4b\u8bd5\u7684\u7cfb\u7edf\u7ba1\u7406<\/p>\n
2. \u6240\u6709\u590d\u5236\u5bf9\u6240\u6709\u6570\u636e\u64cd\u4f5c\u90fd\u662f\u900f\u660e\u7684<\/p>\n<\/p>\n
2.5.3.7 \u6240\u6709EADS\u7684\u521b\u5efa\u5fc5\u987b\u5305\u542b\u5728\u6570\u636e\u5e93\u52a0\u8f7d\u6d4b\u8bd5\u4e2d\uff08\u89c17.4.3\uff09\u3002\u6027\u80fd\u6d4b\u8bd5\u671f\u95f4\u53ef\u80fd\u4e0d\u4f1a\u521b\u5efa\u6216\u5220\u9664EADS\u3002<\/p>\n<\/p>\n
2.5.3.8 \u5206\u533a<\/p>\n
2.5.3.8.1 \u903b\u8f91\u8868\u7a7a\u95f4(logical table space)\u662f\u6307\uff0c\u903b\u8f91\u76f8\u90bb\u4e14\u4e0d\u53ef\u88ab\u5206\u7684\u5b9e\u4f53\u5b58\u50a8\u8bbe\u5907\u7684\u96c6\u5408\u3002<\/p>\n<\/p>\n
2.5.3.8.2 DDL\u7684\u8bed\u6cd5\uff0c\u53ef\u4ee5\u5b9e\u73b0\u5c06\u8868\u5b58\u50a8\u5728\u7279\u5b9a\u903b\u8f91\u8868\u7a7a\u95f4\u4e2d\u3002<\/p>\n<\/p>\n
2.5.3.8.3 \u57fa\u8868\u6216EADS\u53ef\u4ee5\u6c34\u5e73\u5206\u533a\u3002\u5982\u679c\u5206\u533a\u662f\u8868\u6216ADS\u4e2d\u6570\u636e\u7684\u51fd\u6570\uff0c\u5219\u5206\u914d\u5e94\u57fa\u4e8e\u5206\u533a\u5217\u4e2d\u7684\u503c\u3002\u53ea\u80fd\u4f7f\u7528\u4e3b\u952e\uff0c\u5916\u952e\uff0c\u65e5\u671f\u5217\u548c\u65e5\u671f\u4ee3\u7406\u952e\u4f5c\u4e3a\u5206\u533a\u5217\u3002\u5982\u679c\u5206\u533aDDL\u4e3a\u5206\u533a\u5217\u6307\u5b9a\u4e86\u663e\u5f0f\u5206\u533a\u503c\uff0c\u5219\u5b83\u4eec\u5e94\u6ee1\u8db3\u4ee5\u4e0b\u6761\u4ef6\uff1a<\/p>\n<\/p>\n
1. \u5b83\u4eec\u4e0d\u5173\u6ce8\u5b58\u50a8\u5728\u5206\u533a\u5217\u4e2d\u7684\u6570\u636e\uff0c\u4ec5\u4ec5\u5173\u6ce8\u8fd9\u4e9b\u5217\u7684\u6700\u5c0f\u503c\u548c\u6700\u5927\u503c\u4ee5\u53ca\u5217\u7684\u6570\u636e\u7c7b\u578b\u3002<\/p>\n
2. \u5b83\u4eec\u5c06\u5b9a\u4e49\u6bcf\u4e2a\u5206\u533a\u7684\u8303\u56f4\uff0c\u8be5\u5206\u533a\u53ef\u4ee5\u5bb9\u7eb3\u5728\u6700\u5c0f\u503c\u5230\u6700\u5927\u503c\u4e4b\u95f4\u7684\u6240\u6709\u503c\u3002<\/p>\n
3. \u5bf9\u4e8e\u57fa\u4e8e\u65e5\u671f\u7684\u5206\u533a\uff0c\u53ef\u4ee5\u6839\u636e\u5929\uff0c\u5468\uff0c\u6708\u6216\u5e74\u7684\u6574\u6570\u7c92\u5ea6\u5206\u914d\u5230\u76f8\u540c\u7684\u57df\u4e2d\uff0c\u6240\u6709\u8fd9\u4e9b\u90fd\u4f7f\u7528\u516c\u5386\uff08\u4f8b\u598230\u5929\uff0c4\u5468\uff0c1\u4e2a\u6708\uff0c1\u5e74\u7b49\uff09\u3002\u5bf9\u4e8e\u65e5\u671f\u4ee5\u5916\u7684\u57fa\u4e8e\u65e5\u671f\u7684\u5206\u533a\u7c92\u5ea6\uff0c\u5206\u533a\u8fb9\u754c\u53ef\u80fd\u4f1a\u8d85\u51fa\u8be5\u8868\u7684\u6570\u636e\u7279\u5f81\u4e2d\u786e\u5b9a\u7684\u6700\u5c0f\u6216\u6700\u5927\u8fb9\u754c\uff0c\u53ef\u89c1\u7b2c3.4\u8282\u3002<\/p>\n
4. \u53ef\u4ee5\u7ed9\u5206\u533a\u5217\u4e2d\u63d2\u5165\u8d85\u51fa\u6700\u5c0f\u503c\/\u6700\u5927\u503c\u8303\u56f4\u7684\u503c\uff0c\u89c11.5\u3002<\/p>\n<\/p>\n
\u5982\u679c\u4f7f\u7528\u4efb\u4f55\u6307\u4ee4\u6216DDL\u8fdb\u884c\u6c34\u5e73\u5206\u533a\uff0c\u5219\u5e94\u663e\u793a\u6240\u9700\u7684\u6307\u4ee4\u3001DDL\u3001\u4ee5\u53ca\u5176\u4ed6\u8be6\u7ec6\u4fe1\u606f\u3002<\/p>\n<\/p>\n
\u4ec5\u5f53\u6bcf\u7ea7\u5206\u533a\u6ee1\u8db3\u4e0a\u8ff0\u6761\u4ef6\u65f6\u624d\u5141\u8bb8\u57fa\u672c\u8868\u6216ADS\u8fdb\u884c\u591a\u7ea7\u5206\u533a\u3002<\/p>\n<\/p>\n
2.5.3.8.4 \u5f53\u6ee1\u8db3\u4ee5\u4e0b\u6240\u6709\u8981\u6c42\u65f6\uff0c\u53ef\u4ee5\u5bf9\u57fa\u8868\u6216EADS\u5782\u76f4\u5206\u533a\uff1a<\/p>\n
1. SQL DDL\u7981\u6b62\u6570\u636e\u663e\u6027\u5782\u76f4\u5206\u533a\u3002<\/p>\n
2. SQL DDL\u7684\u5206\u533a\u6307\u4ee4\u4e0d\u80fd\u5f71\u54cd\u6570\u636e\u7684\u7269\u7406\u5b58\u653e\u4f4d\u7f6e\u3002<\/p>\n
3. \u903b\u8f91\u4e0a\uff0c\u884c\u5fc5\u987b\u4f53\u73b0\u4e3a\u5217\u5185\u5143\u7d20\u7684\u96c6\u5408\u3002<\/p>\n<\/p>\n
\u8fd9\u610f\u5473\u7740\u4e0d\u9700\u8981\u663e\u6027\u5206\u533a\u6307\u4ee4\u7684\u5782\u76f4\u5206\u533a\u662f\u5141\u8bb8\u7684\u3002\u663e\u6027\u5206\u533a\u6307\u4ee4\u662f\u5c06\u4e00\u884c\u4e2d\u7684\u5217\u5206\u914d\u5230\u6587\u4ef6\uff0c\u78c1\u76d8\u6216\u4e0d\u540c\u4e8e\u5b58\u50a8\u8be5\u884c\u4e2d\u5176\u4ed6\u5217\u7684\u533a\u57df\u7684\u533a\u57df\u3002<\/p>\n<\/p>\n
2.5.4.1 \u53ef\u4ee5\u4f7f\u7528\u5f3a\u5236\u7ea6\u675f\u6216\u975e\u5f3a\u5236\u7ea6\u675f\u3002\u5982\u679c\u4f7f\u7528\u7ea6\u675f\u6761\u4ef6\uff0c\u5e94\u6ee1\u8db3\u4ee5\u4e0b\u8981\u6c42\uff1a<\/p>\n
1. \u5f3a\u5236\u7ea6\u675f\u5e94\u5728\u58f0\u660e(statement)\u6216\u4ea4\u6613(transaction)\u7ea7\u6267\u884c\u3002<\/p>\n
2. \u5728\u52a0\u8f7d\u6d4b\u8bd5\u4e4b\u540e\u548c\u6027\u80fd\u6d4b\u8bd5\u4e4b\u524d\uff0c\u5fc5\u987b\u9a8c\u8bc1\u975e\u5f3a\u5236\u7ea6\u675f\u3002<\/p>\n
3. \u5b83\u4eec\u4ec5\u9650\u4e8e\u4e3b\u952e\uff0c\u5916\u952e\u548cNOT NULL\u7ea6\u675f\u3002<\/p>\n
4. \u53ef\u4ee5\u5bf9EADS\u548c\u8868\u4f7f\u7528NOT NULL\u7ea6\u675f\u3002\u53ea\u6709\u903b\u8f91\u8868\u5b9a\u4e49\u4e2d\u6807\u8bb0\u4e3a\u201cN\u201d\u7684\u5217\uff08\u6216\u4ece\u8fd9\u4e9b\u5217\u5bfc\u51fa\u7684EADS\u4e2d\u7684\u5217\uff09\u53ef\u4ee5\u4f7f\u7528NOT NULL\u7ea6\u675f\u3002<\/p>\n<\/p>\n
2.5.4.2 \u5982\u679c\u5b9a\u4e49\u548c\u6267\u884c\u5916\u952e\u7ea6\u675f\uff0c\u5f53\u6267\u884c\u7ea6\u675f\uff08\u4f8b\u5982\uff0cANSI SQL RESTRICT\uff0cCASCADE\uff0cNO ACTION\uff09\u65f6\uff0c\u6ca1\u6709\u7279\u6b8a\u7684\u5220\u9664\/\u66f4\u65b0\u64cd\u4f5c\u7684\u8981\u6c42\u3002<\/p>\n
1. \u53ef\u4ee5\u88ab\u57fa\u7840\u7cfb\u7edf\u652f\u6301\u7684\u4efb\u610f\u6761\u4ef6\u8bc6\u522b<\/p>\n
2. \u4f7f\u7528\u7b2c2.6.2\u6761\u4e2d\u63cf\u8ff0\u7684\u540d\u79f0\uff0c\u5e76\u5bf9\u6240\u6709\u8868\u4f7f\u7528\u76f8\u540c\u7684\u6570\u636e\u64cd\u4f5c\u8bed\u4e49\u548c\u8bed\u6cd5<\/p>\n<\/p>\n
\u4f8b\u5982\uff0c\u7528\u4e8e\u67e5\u8be2\u4efb\u4f55\u4e00\u4e2a\u8868\u4e2d\u7684\u4efb\u610f\u4e00\u884c\u7684\u8bed\u4e49\u548c\u8bed\u6cd5\u5728\u67e5\u8be2\u4efb\u4f55\u5176\u4ed6\u8868\u4e2d\u7684\u53e6\u4e00\u4e2a\u4efb\u610f\u884c\u65f6\u4e5f\u53ef\u4ee5\u4f7f\u7528\u3002\u6b64\u6761\u4e3b\u8981\u4e3a\u4e86TPC-DS\u7684\u67e5\u8be2\u5728\u8bbf\u95ee\u6570\u636e\u5e93\u4e2d\u7684\u6570\u636e\u65f6\u5177\u6709\u901a\u7528\u6027\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"TPC-DS\u6807\u51c6\u89c4\u8303(2)TPC-DS\u662f\u4e00\u5957\u51b3\u7b56\u652f\u6301\u7cfb\u7edf\u6d4b\u8bd5\u57fa\u51c6\uff0c\u4e3b\u8981\u9488\u5bf9\u96f6\u552e\u884c\u4e1a","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[],"tags":[],"_links":{"self":[{"href":"https:\/\/mushiming.com\/wp-json\/wp\/v2\/posts\/7104"}],"collection":[{"href":"https:\/\/mushiming.com\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/mushiming.com\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/mushiming.com\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/mushiming.com\/wp-json\/wp\/v2\/comments?post=7104"}],"version-history":[{"count":0,"href":"https:\/\/mushiming.com\/wp-json\/wp\/v2\/posts\/7104\/revisions"}],"wp:attachment":[{"href":"https:\/\/mushiming.com\/wp-json\/wp\/v2\/media?parent=7104"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/mushiming.com\/wp-json\/wp\/v2\/categories?post=7104"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/mushiming.com\/wp-json\/wp\/v2\/tags?post=7104"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}