tpcc_current (Дополнительные методические материалы), страница 9
Описание файла
Файл "tpcc_current" внутри архива находится в следующих папках: Дополнительные методические материалы, TPC-C. PDF-файл из архива "Дополнительные методические материалы", который расположен в категории "". Всё это находится в предмете "структурное проектирование автоматизированных систем обработки информации и управления" из 10 семестр (2 семестр магистратуры), которые можно найти в файловом архиве МГТУ им. Н.Э.Баумана. Не смотря на прямую связь этого архива с МГТУ им. Н.Э.Баумана, его также можно найти и в других разделах. Архив можно найти в разделе "остальное", в предмете "структурное проектирование автоматизированных систем обработки информации и управления" в общих файлах.
Просмотр PDF-файла онлайн
Текст 9 страницы из PDF
The content of theC_DATA field never exceed s 500 characters. The selected cu stom er is u p d ated w ith the new C_DATA field . IfC_DATA is im p lem ented as tw o field s (see Clau se 1.4.9), they m u st be treated and op erated on as one singlefield .TPC Benchm ark™C - Stand ard Sp ecification, Revision 5.11 - Page 34 of 130Comment: The form at u sed to store the history inform ation m u st be su ch that its d isp lay on the inp u t/ ou tp u tscreen is in a read able form at.
(e.g. the W_ID p ortion of C_DATA m u st u se the sam e d isp lay form at as theou tp u t field W_ID).• H _DATA is bu ilt by concatenating W_N AME and D_N A ME sep arated by 4 sp aces.• A new row is inserted into the H ISTORY table w ith H _C_ID = C_ID, H _C_D_ID = C_D_ID, H _C_W_ID =C_W_ID, H _D_ID = D_ID, and H _W_ID = W_ID.• The d atabase transaction is com m itted .• The ou tp u t d ata (see Clau se 2.5.3.3) are com m unicated to the term inal.2.5.3Terminal I/O2.5.3.1For each transaction the originating term inal m u st d isp lay the follow ing inp u t/ ou tp u t screen w ith allinp u t and ou tp u t field s cleared (w ith either sp aces or zeros) excep t for the Warehou se field w hich has not changedand m u st d isp lay the fixed W_ID valu e associated w ith that term inal. In ad d ition, all ad d ress field s (i.e.,W_STREET_1, W_STREET_2, W_CITY, W_STATE, and W_ZIP) of the w arehou se m ay d isp lay the fixed valu es forthese field s if these valu es w ere alread y retrieved in a p reviou s transaction.123451234567890123456789012345678901234567890123456789012345671Payment2 Date: DD-MM-YYYY hh:mm:ss34 Warehouse: 9999District:5 XXXXXXXXXXXXXXXXXXXXXXXXXXXXXX6 XXXXXXXXXXXXXXXXXXXXXXXXXXXXXX7 XXXXXXXXXXXXXXXXXXXX XX XXXXX-XXXXXXXXXXXXXX89 Customer: 9999 Cust-Warehouse: 9999 Cust-District10 Name:XXXXXXXXXXXXXXXX XX XXXXXXXXXXXXXXXXSi11XXXXXXXXXXXXXXXXXXXXCr12XXXXXXXXXXXXXXXXXXXX%D13XXXXXXXXXXXXXXXXXXXX XX XXXXX-XXXXPh1415 Amount Paid:$9999.99New Cust-Balanc16 Credit Limit:$9999999999.991718 Cust-Data: XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX19XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX20XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX21XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX2223242.5.3.2The em u lated u ser m u st enter, in the ap p rop riate field s of the inp u t/ ou tp u t screen, the requ i red inp u td ata w hich is organized as the d istinct field s: D_ID, C_ID or C_LAST, C_D_ID, C_W_ID, and H _AMOUN T.Comment: In ord er to m aintain a reasonable am ou nt of keyed inp u t, the cu stom er w arehou se field m u st be filled ineven w hen it is th e sam e as the hom e w arehou se.TPC Benchm ark™C - Stand ard Sp ecification, Revision 5.11 - Page 35 of 1302.5.3.3The em u lated term inal m ust d isp lay, in the ap p rop riate field s of the inp u t/ ou tp u t screen, all inp u td ata and the ou tp u t d ata resu lting from the execu tion of the transaction.
The follow ing field s are d i sp layed : W_ID,D_ID, C_ID, C_D_ID, C_W_ID, W_STREET_1, W_STREET_2, W_CITY, W_STATE, W_ZIP, D_STREET_1,D_STREET_2, D_CITY, D_STATE, D_ZIP, C_FIRST, C_MIDDLE, C_LAST, C_STREET_1, C_STREET_2, C_CITY,C_STATE, C_ZIP, C_PH ON E, C_SIN CE, C_CREDIT, C_CREDIT_LIM, C_DISCOUN T, C_BALAN CE, the first 200characters of C_DATA (only if C_CREDIT = "BC"), H _AMOUN T, and H _DATE.2.5.3.4The follow ing table su m m arizes the term inal I/ O requirem ents for the Paym ent transaction :EnterN on-rep eating Grou pD_IDC_ID 1C_D_IDC_W_IDH _AMOUN TC_LAST 2Disp layRow / Colu m nW_IDD_IDC_IDC_D_IDC_W_IDH _AMOUN TH _DATEW_STREET_1W_STREET_2W_CITYW_STATEW_ZIPD_STREET_1D_STREET_2D_CITYD_STATED_ZIPC_FIRSTC_MIDDLEC_LASTC_STREET_1C_STREET_2C_CITYC_STATEC_ZIPC_PH ON EC_SIN CEC_CREDITC_CREDIT_LIMC_DISCOUN TC_BALAN CEC_DATA 3Coord inates4/ 124/ 529/ 119/ 549/ 3315/ 242/ 75/ 16/ 17/ 17/ 227/ 255/ 426/ 427/ 427/ 637/ 6610/ 910/ 2610/ 2911/ 912/ 913/ 913/ 3013/ 3313/ 5810/ 5811/ 5816/ 1812/ 5815/ 5618-21/ 121 Enter only for p aym ent by cu stom er nu m berEnter only for p aym ent by cu stom er last na m eDisp lay the first 200 characters only if C_CREDIT = "BC"2.5.3.5For general term inal I/ O requ irem ents, see Clau se 2.2.TPC Benchm ark™C - Stand ard Sp ecification, Revision 5.11 - Page 36 of 130232.6The Order-Status TransactionThe Ord er-Statu s bu siness transaction qu eries the statu s of a cu stom er's last ord er.
It rep resents a m id -w eight read only d atabase transaction w ith a low frequ ency of execu tion a nd resp onse tim e requ irem ent to satisfy on -line u sers.In ad d ition, this table inclu d es non -p rim ary key access to the CUSTOMER table.2.6.1Input D ata Generation2.6.1.1interval.For any given term inal, the hom e w arehou se nu m ber (W_ID) is constant over the w hole m easu rem ent2.6.1.2The d istrict nu m ber (D_ID) is rand om ly selected w ithin [1 ..10] from the hom e w arehou se. Thecu stom er is rand om ly selected 60% of the tim e by last nam e (C_W_ID, C_D_ID, C_LAST) and 40% of the tim e bynu m ber (C_W_ID, C_D_ID, C_ID) from the selected d istrict (C_D_ID = D_ID) and the hom e w arehou se nu m ber(C_W_ID = W_ID).
This can be im p lem ented by generating a rand om nu m ber y w ithin [1 .. 100];• If y <= 60 a cu stom er last nam e (C_LAST) is generated accord ing to Clau se 4.3.2.3 from a non -u niformrand om valu e u sing the N URand (255,0,999) fu nction. The cu stom er is u sing his/ her last nam e and is one ofthe, p ossibly several, cu stom ers w ith that last nam e.Comment: This case illu strates the situ ation w hen a cu stom er d oes not u se his/ h er u niqu e cu stom er nu m ber.• If y > 60 a non-u niform rand om cu stom er nu m ber (C_ID) is selected u sing the N URand (1023,1,3000) function.The cu stom er is u sing his/ her cu stom er nu m ber.2.6.22.6.2.11.Transaction ProfileQu erying for the statu s of an ord er is d one in a single d atabase transaction w ith the follow ing step s:Find the cu stom er and his/ her last ord er, com p rised of:Case 1, the cu stom er is selected based on cu stom er nu m ber:2 row selections w ith d ata retrieval.Case 2, the cu stom er is selected based on cu stom er last nam e:4 row selections (on average) w ith d ata retrieval.2.Check statu s (d elivery d ate) of each item on the ord er (average item s -p er-ord er = 10), com p rised of:(1 * item s-p er-ord er) row selections w ith d ata retrieval.N ote: The above su m m ary is p rovid ed for inform ation only.
The actu al requ irem ent is d efined by the d etailedtransaction p rofile below .2.6.2.2For a given cu stom er nu m ber (C_W_ID , C_D_ID , C_ ID):• The inp u t d ata (see Clau se 2.6.3.2) are com m u nicated to the SUT.• A d atabase transaction is started .• Case 1, the cu stom er is selected based on cu stom er nu m ber: the row in the CUSTOMER table w ith m atchingC_W_ID, C_D_ID, and C_ID is selected and C_BALAN CE, C_FIRST, C_MIDDLE, and C_LAST are retrieved .TPC Benchm ark™C - Stand ard Sp ecification, Revision 5.11 - Page 37 of 130Case 2, the cu stom er is selected based on cu stom er last nam e: all row s in the CUSTOMER table w ithm atching C_W_ID, C_D_ID and C_LAST are selected sorted by C_FIRST in ascend ing ord er. Let n be thenu m ber of row s selected . C_BALAN CE, C_FIRST, C_MIDDLE, and C_LAST are retrieved from the row atp osition n/ 2 rou nd ed u p in the sorted set of selected row s from the CUSTOMER table.• The row in the ORDER table w ith m atching O_W_ID (equ als C_W_ID), O_D_ID (equ als C_D_ID), O_C_ID(equ als C_ID), and w ith the largest existing O_ID, is selected .
This is the m ost recent ord er p laced by thatcu stom er. O_ID, O_EN TRY_D, and O_CARRIER_ID are retrieved .• All row s in the ORDER-LIN E table w ith m atching OL_W_ID (equ als O_W_ID), OL_D_ID (equ als O_D_ID),and OL_O_ID (equ als O_ID) are selected and the corresp ond ing sets of OL_I_ID, OL_SUPPLY_W_ID,OL_QUAN TITY, OL_AMOUN T, and OL_DELIVERY_D are retrieved .• The d atabase transaction is com m itted .Comment: a com m it is not requ ired as long as all ACID p rop erties are satisfied (see Clau se 3).• The ou tp u t d ata (see Clau se 2.6.3.3) are com m unicated to the term inal.2.6.3Terminal I/O2.6.3.1For each transaction the originating term inal m u st d isp lay the follow ing inp u t/ ou tp u t screen w ith allinp u t and ou tp u t field s cleared (w ith either sp aces or zeros) excep t for the Warehou se field w hich has not changedand m u st d isp lay the fixed W_ID valu e associated w ith that term inal.12345123456789012345678901234567890123456789012345678901234567Order-Status1District: 992 Warehouse: 9999Name: XXXXXXXXXXXXXXXX XX XXXXXXXX3 Customer: 99994 Cust-Balance: $-99999.995Entry-Date: DD-MM-YYYY hh:6 Order-Number: 99999999Item-IdQtyAmountDeliver7 Supply-W999999999999$99999.99DD-MM8999999999999$99999.99DD-MM9999999999999$99999.99DD-MM10999999999999$99999.99DD-MM11999999999999$99999.99DD-MM12999999999999$99999.99DD-MM13999999999999$99999.99DD-MM14999999999999$99999.99DD-MM15999999999999$99999.99DD-MM16999999999999$99999.99DD-MM17999999999999$99999.99DD-MM18999999999999$99999.99DD-MM19999999999999$99999.99DD-MM20999999999999$99999.99DD-MM21999999999999$99999.99DD-MM2223242.6.3.2The em u lated u ser m u st enter, in the ap p rop riate field of the inp u t/ ou tp u t screen, the requ ired inp u td ata w hich is organized as the d istinct field s: D_ID and either C_ID or C_LAST.TPC Benchm ark™C - Stand ard Sp ecification, Revision 5.11 - Page 38 of 1302.6.3.3The em u lated term inal m ust d isp lay, in the ap p rop riate field s of the inp u t/ ou tp u t screen, all inp u td ata and the ou tp u t d ata resu lting from the execu tion of the transaction.