tpcc_current (Дополнительные методические материалы), страница 8
Описание файла
Файл "tpcc_current" внутри архива находится в следующих папках: Дополнительные методические материалы, TPC-C. PDF-файл из архива "Дополнительные методические материалы", который расположен в категории "". Всё это находится в предмете "структурное проектирование автоматизированных систем обработки информации и управления" из 10 семестр (2 семестр магистратуры), которые можно найти в файловом архиве МГТУ им. Н.Э.Баумана. Не смотря на прямую связь этого архива с МГТУ им. Н.Э.Баумана, его также можно найти и в других разделах. Архив можно найти в разделе "остальное", в предмете "структурное проектирование автоматизированных систем обработки информации и управления" в общих файлах.
Просмотр PDF-файла онлайн
Текст 8 страницы из PDF
The grou p is rep eatedol_cnt tim es (once p er item in the ord er). The valu es of these field s are chosen as per Clau se 2.4.1.5.Comment: In ord er to m aintain a reasonable am ou nt of key ed inp u t, the su p p ly w arehou se field s m u st befilled in for each item , even w hen the su p p ly w arehou se is the hom e w arehou se.2.4.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 d isp lay field s are d ivid ed in tw ogrou p s as follow s:• One non-rep eating grou p of field s: W_ID, D_ID, C_ID, O_ID, O_OL_CN T, C_LAST, C_CREDIT,C_DISCOUN T, W_TAX, D_TAX, O _EN TRY_D, total_amount, and an op tional execu tion statu s m essage oth erthan "Item nu m ber is not valid ".TPC Benchm ark™C - Stand ard Sp ecification, Revision 5.11 - Page 31 of 130• One rep eating grou p of field s: OL_SUPPLY_W_ID, OL_I_ID, I_N AME, OL_QUAN TITY, S_QUAN TITY,brand_generic, I_PRICE, an d OL_AMOUN T. The grou p is rep eated O_OL_CN T tim es (once p er item in th eord er), equ al to the com p u ted valu e of ol_cnt.2.4.3.4For transactions that are rolled back as a resu lt of an u nu sed item nu m ber (1% of all N ew -Ord ertransaction s), the em u lated term inal m u st d isp lay in the ap p rop riate field s of the inp u t/ ou tp u t screen the field s:W_ID, D_ID, C_ID, C_LAST, C_CREDIT, O_ID, and the execu tion statu s m essage "Item nu m ber is not valid ".
N otethat no execu tion statu s m essage is req u ired for su ccessfu lly com m itted transactions. H ow ever, this field m ay notd isp lay "Item nu m ber is not valid " if the transaction is su ccessfu l.Comment: The nu m ber of the rolled back ord er, O_ID, m u st be d isp layed to verify that p art of t he transaction w asp rocessed .2.4.3.5The follow ing table su m m arizes the term inal I/ O requirem ents for the N ew -Ord er transaction :EnterN on-rep eatingGrou pD_IDC_IDDisp layAfter rollbackDisp layRow / Colu m nW_IDD_IDC_IDC_LASTC_CREDITC_DISCOUN TW_TAXD_TAXO_OL_CN TO_IDO_EN TRY_Dtotal-amountW_IDD_IDC_IDC_LASTC_CREDITCoord inatesO_ID"Item nu m beris not valid "Rep eating Grou pOL_SUPPLY_W_IDOL_I_IDOL_QUAN TITY2.4.3.6OL_SUPPLY_W_IDOL_I_IDI_N AMEOL_QUAN TITYS_QUAN TITYbrand-genericI_PRICEOL_AMOUN TFor 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 32 of 1302/ 122/ 293/ 123/ 253/ 523/ 644/ 514/ 674/ 424/ 152/ 6122/ 7122/ 197-22/ 37-22/ 107-22/ 207-22/ 457-22/ 517-22/ 587-22/ 637-22/ 722.5The Payment TransactionThe Paym ent bu siness transaction u p d ates the cu stom er's balance and reflects the p aym ent on the d istrict andw arehou se sales statistics.
It rep resents a light -w eight, read -w rite transaction w ith a high frequ ency of execu tion andstringent resp onse tim e requ irem ents to satisfy on -line u sers. In ad d ition, this transaction inclu d es non -p rim ary keyaccess to the CUSTOMER table.2.5.1Input D ata Generation2.5.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.5.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 (D_W_ID) =W_ID).
The cu stom er is rand om ly selected 60% of th e tim e by last nam e (C_W_ID , C_D_ID, C_LAST) and 40% ofthe tim e by nu m ber (C_W_ID , C_D_ID , C_ID). Ind ep end ent of the m od e of selection, the cu stom er resid entw arehou se is the hom e w arehou se 85% of the tim e and is a rand om ly selected rem ote w arehou se 15% of the tim e.This can be im p lem ented by generating tw o rand om nu m bers x and y w ithin [1 ..
100];• If x <= 85 a cu stom er is selected from the selected d istrict nu m ber (C_D_ID = D_ID) and the hom e w arehou senu m ber (C_W_ID = W_ID). The cu stom er is p aying throu gh h is/ her ow n w arehou se.• If x > 85 a cu stom er is selected from a rand om d istrict nu m ber (C_D_ID is rand om ly selected w ithin [1 .. 10]),and a rand om rem ote w arehou se nu m ber (C_W_ID is rand om ly selected w ithin the range of act ivew arehou ses (see Clau se 4.2.2), and C_W_ID ≠ W_ID). The cu stom er is p aying throu gh a w arehou se and ad istrict other than his/ her ow n.• 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.Comment: If the system is configu red for a single w arehou se, then all cu stom ers are selected from that single hom ew arehou se.2.5.1.3The p aym ent am ou nt (H _AMOUN T) is rand om ly selected w ithin [1.00 ..
5,000.00].2.5.1.4The p aym ent d ate (H _DATE) in generated w ithin the SUT by u sing the cu rrent system d ate and tim e.2.5.1.5A Paym ent transaction is said to be home if the cu stom er belongs to the w areh ou se from w hich thep aym ent is entered (w hen C_W_ID = W_ID).2.5.1.6A Paym ent transaction is said to be remote if the w arehou se from w hich the paym ent is entered is notthe one to w hich the cu stom er belongs (w hen C_W_ID d oes no t equ al W_ID).TPC Benchm ark™C - Stand ard Sp ecification, Revision 5.11 - Page 33 of 1302.5.2Transaction Profile2.5.2.1The Paym ent transaction enters a cu stom er's p aym ent w ith a single d atabase transaction and iscom p rised of:Case 1, the cu stom er is selected based on cu stom er nu m ber:3 row selections w ith d ata retrieval and u p d ate,1 row insertion.Case 2, the cu stom er is selected based on cu stom er last nam e:2 row selections (on average) w ith d ata retrieval,3 row selections w ith d ata retrieval a nd u p d ate,1 row insertion.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.5.2.2For a given w arehou se nu m ber (W_ID), d istrict nu m ber (D_W_ID , D_ID), cu stom er nu m be r (C_W_ID, C_D_ID , C_ ID) or cu stom er last nam e (C_W_ID , C_D_ID , C_LAST), and p aym ent am ou nt (H _AMOUN T):• The inp u t d ata (see Clau se 2.5.3.2) are com m u nicated to the SUT.• A d atabase transaction is started .• The row in the WAREH OUSE table w ith m atching W_ID is selected .
W_N AME, W_STREET_1,W_STREET_2, W_CITY, W_STATE, and W_ZIP are retrieved and W_YTD, the w arehou se's year -to-d atebalance, is increased by H _ AMOUN T.• The row in the DISTRICT table w ith m atching D_W_ID and D_ID is selected .
D_N AME, D_STREET_1,D_STREET_2, D_CITY, D_STATE, and D_ZIP are retrieved and D_YTD, the d istrict's year -to-d ate balance, isincreased by H _AMOUN T.• 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 .
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, and C_BALAN CE areretrieved . C_BALAN CE is d ecreased by H _AMOUN T. C_YTD_PAYMEN T is increased by H _AMOUNT.C_PAYMEN T_CN T is increm ented by 1.Case 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_ID, C_FIRST, C_MIDDLE, C_STREET_1, C_STREET_2, C _CITY, C_STATE,C_ZIP, C_PH ON E, C_SINCE, C_CREDIT, C_CREDIT_LIM, C_DISCOUN T, and C_BALAN CE are retrievedfrom the row at p osition (n/ 2 rou nd ed u p to the next integer) in the sorted set of selected row s from theCUSTOMER table. C_BALAN CE is d ecr eased by H _AMOUN T. C_YTD_PAYMEN T is increased byH _AMOUN T.
C_PAYMEN T_CN T is increm ented by 1.• If the valu e of C_CREDIT is equ al to "BC", then C_DATA is also retrieved from the selected cu stom er and thefollow ing history inform ation: C_ID, C_D_ID, C_W_ID, D_ID, W_ID, and H _AMOUN T, are inserted at theleft of the C_DATA field by shifting the existing content of C_DATA to the right by an equ al nu m ber of bytesand by d iscard ing the bytes that are shifted ou t of the right sid e of the C_DATA field .