tpcc_current (Дополнительные методические материалы), страница 7

PDF-файл tpcc_current (Дополнительные методические материалы), страница 7 Структурное проектирование автоматизированных систем обработки информации и управления (14077): Другое - 10 семестр (2 семестр магистратуры)tpcc_current (Дополнительные методические материалы) - PDF, страница 7 (14077) - СтудИзба2017-12-22СтудИзба

Описание файла

Файл "tpcc_current" внутри архива находится в следующих папках: Дополнительные методические материалы, TPC-C. PDF-файл из архива "Дополнительные методические материалы", который расположен в категории "". Всё это находится в предмете "структурное проектирование автоматизированных систем обработки информации и управления" из 10 семестр (2 семестр магистратуры), которые можно найти в файловом архиве МГТУ им. Н.Э.Баумана. Не смотря на прямую связь этого архива с МГТУ им. Н.Э.Баумана, его также можно найти и в других разделах. Архив можно найти в разделе "остальное", в предмете "структурное проектирование автоматизированных систем обработки информации и управления" в общих файлах.

Просмотр PDF-файла онлайн

Текст 7 страницы из PDF

Itrep resents a m id -w eight, read -w rite transaction w ith a high frequ ency of execu tion and stringent resp onse tim erequ irem ents to satisfy on -line u sers. This transaction is the backbone of the w orkload . It is d esigned to p lace avariable load on the system to reflect on -line d atabase activity as typ ically fou nd in p rod u ction environm ents.2.4.1Input D ata Generation2.4.1.1For any given term inal, the hom e w arehou se nu m ber (W_ID) is constant over the w hole m easu rem e ntinterval (see Clau se 5.5).2.4.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 non -u niform rand om cu stom er nu m ber (C_ID) is selected u sing the N URand (1023,1,3000) fu nction fromthe selected d istrict nu m ber (C_D_ID = D_ID) and the hom e w arehou se nu m ber (C_W_ID = W_ID).2.4.1.3The nu m ber of item s in the ord er (ol_cnt) is rand om ly selected w ithin [5 .. 15] (an average of 10). Thisfield is not entered . It is generated by the term inal em u lator to d eterm ine the size of the ord er.

O_OL_CN T is laterd isp layed after being com p u ted by the SUT.2.4.1.4A fixed 1% of the N ew -Ord er transaction s are chosen at rand om to sim u late u ser d ata entry errors andexercise the p erform ance of rolling back u p d ate transactions. This m u st be im p lem ented by generating a rand omnu m ber rbk w ithin [1 .. 100].Comment: All N ew -Ord er transaction s m u st have ind ep end ently generated inp u t d ata. The inp u t d ata from a rolledback transaction cannot be u sed for a su bsequ ent transaction.2.4.1.5For each of the ol_cnt item s on the ord er:1.

A non-u niform rand om item nu m ber (OL_I_ID) is selected u sing the N URand (8191,1,100000) fu nction. If thisis the last item on the ord er and rbk = 1 (see Clau se 2.4.1.4), then the item num ber is set to an u nu sed valu e.Comment: An unused valu e for an item nu m ber is a valu e not fou nd in the d atabase su ch that its u se w illp rod u ce a "not-fou nd " con d ition w ithin the ap p lication p rogram . This cond ition shou ld resu lt in rolling backthe cu rrent d atabase transaction .2. A su p p lying w arehou se nu m ber (OL_SUPPLY_W_ID) is selected as the hom e w arehou se 99% of the tim e andas a rem ote w arehou se 1% of the tim e. This can be imp lem ented by generating a rand om num ber x w ithin [1..

100];- If x > 1, the item is su p p lied from the hom e w arehou se (OL_SUPPLY_W_ID = W_ID).- If x = 1, the item is su p p lied from a rem ote w arehou se (OL_SUPPLY_W_ID is rand om ly selected w ithin therange of active w arehou ses (see Clau se 4.2.2) other than W_ID).Comment 1: With an average of 10 item s p er ord er, ap p roxim ately 90% of all ord ers can be su p p lied in fu ll bystocks from the hom e w arehou se.Comment 2: If the system is configu red for a single w arehou se, then all item s are su p p lied from that singlehom e w arehou se.3.

A qu antity (OL_QUAN TITY) is rand om ly selected w ithin [1 .. 10].TPC Benchm ark™C - Stand ard Sp ecification, Revision 5.11 - Page 28 of 1302.4.1.6tim e.The ord er entry d ate (O_EN TRY_D) is gener ated w ithin the SUT by u sing the cu rrent system d ate and2.4.1.7An ord er-line is said to be home if it is su p p lied by the hom e w arehou se (i.e., w henOL_SUPPLY_W_ID equ als O_W_ID).2.4.1.8An ord er-line is said to be remote w hen it is su p p lied by a rem ote w arehou se (i.e., w henOL_SUPPLY_W_ID d oes not equ al O_W_ID).2.4.22.4.2.11.Transaction ProfileEntering a new ord er is d one in a single d atabase transaction w ith the follow ing step s:Create an ord er head er, com p rised of:2 row selections w ith d ata retrieval,1 row selection w ith d ata retrieval and u p d ate,2 row insertions.2.Ord er a variable nu m ber of item s (average ol_cnt = 10), com p rised of:(1 * ol_cnt) row selections w ith d ata retrieval,(1 * ol_cnt) row selections w ith d ata retrieval and u p d ate,(1 * ol_cnt) row insertions.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.4.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 ber (C_W_ID, C_D_ID , C_ ID), cou nt of item s (ol_cnt, not com m u nicated to the SUT), and for a given set of item s (OL_I_ID),su p p lying w arehou ses (OL_SUPPLY_W_ID), and qu antities (OL_QUAN TITY):• The inp u t d ata (see Clau se 2.4.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 and W_TAX, the w arehou se tax r ate, isretrieved .• The row in the DISTRICT table w ith m atching D_W_ID and D_ ID is selected , D_TAX, the d istrict tax rate, isretrieved , and D_N EXT_O_ID, the next available ord er nu m ber for the d istrict, is retrieved and increm entedby one.• The row in the CUSTOMER table w ith m atching C_W_ID, C_D_ID, and C_ID is selected and C_DISCOUN T,the cu stom er's d iscou nt rate, C_LAST, the cu stom er's last nam e, and C_CREDIT, the cu stom er's cred it sta tu s,are retrieved .• A new row is inserted into both the N EW -ORDER table and the ORDER table to reflect the creation of thenew ord er.

O_CARRIER_ID is set to a nu ll valu e. If the ord er inclu d es only hom e ord er -lines, thenO_ALL_LOCAL is set to 1, otherw ise O_ALL_LOCAL is set to 0.• The nu m ber of item s, O_OL_CN T, is com p u ted to m atch ol_cnt.TPC Benchm ark™C - Stand ard Sp ecification, Revision 5.11 - Page 29 of 130• For each O_OL_CN T item on the ord er:-The row in the ITEM table w ith m atching I_ID (equ als OL_I_ID) is selected and I_PRICE, the p ri ce of theitem , I_N AME, the nam e of the item , and I_DATA are retrieved . If I_ID has an u nu sed valu e (see Clau se2.4.1.5), a "not-fou nd " cond ition is signaled , resu lting in a rollback of the d atabase transaction (see Clau se2.4.2.3).-The row in the STOCK table w ith m atching S_I_ID (equ als OL_I_ID) and S_W_ID (equ alsOL_SUPPLY_W_ID) is selected . S_QUAN TITY, the quantity in stock, S_DIST_xx, w here xx rep resents thed istrict nu m ber, and S_DATA are retrieved .

If the retrieved valu e for S_QUAN TITY exceed sOL_QUAN TITY by 10 or m ore, then S_QUAN TITY is d ecreased by OL_QUAN TITY; otherw iseS_QUAN TITY is u p d ated to (S_QUAN TITY - OL_QUAN TITY)+91. S_YTD is increased byOL_QUAN TITY and S_ORDER_CN T is increm ented by 1. If the or d er-line is rem ote, thenS_REMOTE_CN T is increm ented by 1.-The am ou nt for the item in the ord er (OL_AMOUN T) is com p u ted as:OL_QUAN TITY * I_PRICE-The strings in I_DATA and S_DATA are exam ined . If they both inclu d e the string "ORIGIN AL", the brandgeneric field for that item is set to "B", otherw ise, the brand-generic field is set to "G".-A new row is inserted into the ORDER-LIN E table to reflect the item on the ord er.

OL_DELIVERY_D is setto a nu ll valu e, OL_N UMBER is set to a u niqu e valu e w ithin all the ORDER-LIN E row s that have the sam eOL_O_ID valu e, and OL_DIST_IN FO is set to the content of S_DIST_xx, w here xx rep resents the d istrictnu m ber (OL_D_ID)• The total-amount for the com p lete ord er is com p u ted as:su m (OL_AMOUN T) * (1 - C_DISCOUN T) * (1 + W_TAX + D_TAX)• The d atabase transaction is com m itted , u nless it has been rolled back as a resu lt of an unused valu e for the lastitem nu m ber (see Clau se 2.4.1.5).• The ou tp u t d ata (see Clau se 2.4.3.3) are com m unicated to the term inal.2.4.2.3For transactions that rollback as a resu lt of an u nu sed item nu m ber, the com p lete transaction p rofilem u st be execu ted w ith the excep tion that the follow in g step s need not be d one:• Selecting and retrieving the row in the STOCK table w ith S_I_ID m atching the u nused item nu m ber.• Exam ining the strings I_DATA and S_DATA for the u nu sed item .• Inserting a new row into the ORDER-LIN E table for the u nu sed item .• Ad d ing the am ou nt for the u nu sed item to the su m of all OL_AMOUN T.The transaction is not com m itted .

Instead , the transaction is rolled back.Comment 1: The intent of this clau se is to ensu re that w ithin the N ew -Ord er transaction all valid item s are p rocessedp rior to p rocessing the u nu sed item . Know led ge that an item is u nu sed , resu lting in rolling back the transaction, canonly be u sed to skip execu tion of the above step s.

N o other op tim ization can resu lt from this know led ge (e.g.,skip p ing other step s, changing the execu tion of other step s, u sing a d ifferent typ e of transaction, etc.).Comment 2: This clau se is an excep tion to Clau se 2.3.1. The ord er of d ata m anip u lation s p rior to signaling a "notfou nd " cond ition is im m aterial.TPC Benchm ark™C - Stand ard Sp ecification, Revision 5.11 - Page 30 of 1302.4.3Terminal I/O2.4.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.123451234567890123456789012345678901234567890123456789012345671New Order2 Warehouse: 9999District: 993 Customer: 9999Name: XXXXXXXXXXXXXXXXCredit: X4 Order Number: 99999999 Number of Lines: 99W56 Supp_W Item_Id Item NameQty Sto7 9999999999XXXXXXXXXXXXXXXXXXXXXXXX 99998 9999999999XXXXXXXXXXXXXXXXXXXXXXXX 99999 9999999999XXXXXXXXXXXXXXXXXXXXXXXX 999910 9999999999XXXXXXXXXXXXXXXXXXXXXXXX 999911 9999999999XXXXXXXXXXXXXXXXXXXXXXXX 999912 9999999999XXXXXXXXXXXXXXXXXXXXXXXX 999913 9999999999XXXXXXXXXXXXXXXXXXXXXXXX 999914 9999999999XXXXXXXXXXXXXXXXXXXXXXXX 999915 9999999999XXXXXXXXXXXXXXXXXXXXXXXX 999916 9999999999XXXXXXXXXXXXXXXXXXXXXXXX 999917 9999999999XXXXXXXXXXXXXXXXXXXXXXXX 999918 9999999999XXXXXXXXXXXXXXXXXXXXXXXX 999919 9999999999XXXXXXXXXXXXXXXXXXXXXXXX 999920 9999999999XXXXXXXXXXXXXXXXXXXXXXXX 999921 9999999999XXXXXXXXXXXXXXXXXXXXXXXX 999922 Execution Status: XXXXXXXXXXXXXXXXXXXXXXXX23242.4.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, th e requ ired inp u td ata w hich is d ivid ed in tw o grou p s and organized as follow s:• Tw o field s: D_ID and C_ID.Comment: The valu e for ol_cnt cannot be entered , bu t m u st be d eterm ined by the ap p lication u p onp rocessing of the inp u t d ata.• One rep eating grou p of field s: OL_I_ID, OL_SUPPLY_W_ID and OL_QUAN TITY.

Свежие статьи
Популярно сейчас
Зачем заказывать выполнение своего задания, если оно уже было выполнено много много раз? Его можно просто купить или даже скачать бесплатно на СтудИзбе. Найдите нужный учебный материал у нас!
Ответы на популярные вопросы
Да! Наши авторы собирают и выкладывают те работы, которые сдаются в Вашем учебном заведении ежегодно и уже проверены преподавателями.
Да! У нас любой человек может выложить любую учебную работу и зарабатывать на её продажах! Но каждый учебный материал публикуется только после тщательной проверки администрацией.
Вернём деньги! А если быть более точными, то автору даётся немного времени на исправление, а если не исправит или выйдет время, то вернём деньги в полном объёме!
Да! На равне с готовыми студенческими работами у нас продаются услуги. Цены на услуги видны сразу, то есть Вам нужно только указать параметры и сразу можно оплачивать.
Отзывы студентов
Ставлю 10/10
Все нравится, очень удобный сайт, помогает в учебе. Кроме этого, можно заработать самому, выставляя готовые учебные материалы на продажу здесь. Рейтинги и отзывы на преподавателей очень помогают сориентироваться в начале нового семестра. Спасибо за такую функцию. Ставлю максимальную оценку.
Лучшая платформа для успешной сдачи сессии
Познакомился со СтудИзбой благодаря своему другу, очень нравится интерфейс, количество доступных файлов, цена, в общем, все прекрасно. Даже сам продаю какие-то свои работы.
Студизба ван лав ❤
Очень офигенный сайт для студентов. Много полезных учебных материалов. Пользуюсь студизбой с октября 2021 года. Серьёзных нареканий нет. Хотелось бы, что бы ввели подписочную модель и сделали материалы дешевле 300 рублей в рамках подписки бесплатными.
Отличный сайт
Лично меня всё устраивает - и покупка, и продажа; и цены, и возможность предпросмотра куска файла, и обилие бесплатных файлов (в подборках по авторам, читай, ВУЗам и факультетам). Есть определённые баги, но всё решаемо, да и администраторы реагируют в течение суток.
Маленький отзыв о большом помощнике!
Студизба спасает в те моменты, когда сроки горят, а работ накопилось достаточно. Довольно удобный сайт с простой навигацией и огромным количеством материалов.
Студ. Изба как крупнейший сборник работ для студентов
Тут дофига бывает всего полезного. Печально, что бывают предметы по которым даже одного бесплатного решения нет, но это скорее вопрос к студентам. В остальном всё здорово.
Спасательный островок
Если уже не успеваешь разобраться или застрял на каком-то задание поможет тебе быстро и недорого решить твою проблему.
Всё и так отлично
Всё очень удобно. Особенно круто, что есть система бонусов и можно выводить остатки денег. Очень много качественных бесплатных файлов.
Отзыв о системе "Студизба"
Отличная платформа для распространения работ, востребованных студентами. Хорошо налаженная и качественная работа сайта, огромная база заданий и аудитория.
Отличный помощник
Отличный сайт с кучей полезных файлов, позволяющий найти много методичек / учебников / отзывов о вузах и преподователях.
Отлично помогает студентам в любой момент для решения трудных и незамедлительных задач
Хотелось бы больше конкретной информации о преподавателях. А так в принципе хороший сайт, всегда им пользуюсь и ни разу не было желания прекратить. Хороший сайт для помощи студентам, удобный и приятный интерфейс. Из недостатков можно выделить только отсутствия небольшого количества файлов.
Спасибо за шикарный сайт
Великолепный сайт на котором студент за не большие деньги может найти помощь с дз, проектами курсовыми, лабораторными, а также узнать отзывы на преподавателей и бесплатно скачать пособия.
Популярные преподаватели
Добавляйте материалы
и зарабатывайте!
Продажи идут автоматически
5209
Авторов
на СтудИзбе
430
Средний доход
с одного платного файла
Обучение Подробнее