OSDL-DBT-1
An On-Line Transaction Processing Test Kit
Maintenance
Version 1.0
Table of Contents
1Maintenance Documentation 3
1.1CVS Tree Structure 3
1.2appServer 4
1.3common 4
1.4datagen 4
1.5dbdriver 4
1.6interfaces 5
1.6.1odbc 5
1.7include 5
1.8scripts 6
1.8.1sapdb 6
1.8.2stats 7
1.9storedproc 7
1.9.1sapdb 7
1.10tools 8
This document is aimed at developers who want to contribute to the OSDL-DBT-1 test kit.
rdbms_workload/
LICENSE
readme.txt
sizing.sdc
appServer/
common/
datagen/
dbdriver/
interfaces/
odbc
include/
scripts/
db/
stats/
storedproc/
sapdb/
tools/
wgen/
readme.txt: Describes the files under each directory.
LICENSE: The Artistic license agreement under which this project is released.
sizing.sdc: Star Office spreadsheet that calculates various sizing info.
appServer: Contains the files that create the middle tier application server module.
common: Functions described in the TPC-W™ specification that can be shared throughout the toolkit.
datagen: Contains the files that create the database data generator module.
dbdriver: Contains the files that create the database driver module.
interfaces: Contains DB interface modules.
include: All include files.
scripts: Shell scripts that create and load the database, and collect statistics on the system resources, etc.
storedproc: The stored procedure files. Currently only contains files for SAP DB.
tools: Tools such as small component drivers, analysis programs, and other tools to aid in the debugging or to support the running of the benchmark.
wgen: A TPC supplied data generator required by datagen.
Under each directory, there are readme.txt files.
The appServer module is the transaction management server. It receives a directive from the Emulated User and places the request into a transaction queue. It is also responsible for creating multiple connections to the back-end database. The files in this directory are:
Makefile: The makefile to build the files in this directory.
app_txn_array.c: A transaction array used to hold transaction requests and responses to/from the database.
app_txn_queue.c: A transaction queue used to hold waiting transaction requests.
app_interface.c: The communication interface between the driver and the
appServer.
appServer.c: The main module that handles requests from the driver.
app_threadpool.c: Implements the worker threads that access the database.
design: Data structures and implementation details.
readme.txt A textual description of the files in this directory.
The common directory contains a collection of functions that can be shared by the modules in the test kit. The files in this directory are:
Makefile: Makefile to build the files in this directory.
common.c: Functions defined in the TPC-W™ specification.
_socket.c: Socket function wrappers.
readme.txt A textual description of the files in this directory.
The datagen directory contains the files that create the database data generator module. The files in this directory are:
Makefile: The makefile to build the files in this directory.
address.c: Generates Address table data.
author.c: Generates Author table data.
country.data: Static Country table data.
customer.c: Generates Customer table data.
item.c: Generates Item table data.
main.c: The Main file.
orders.c: Generates Orders, Order Line, and CC_Xacts table data.
The dbdriver directory contains files that create OSDL-DBT-1 drivers.
The files in this directory are:
Makefile: The makefile to build the files in this directory.
eu.c: All logic required to emulate a user.
main.c: The main file to start the application.
tm_interface.c: The communication interface between the driver and the appServer.
The interfaces directory contains subdirectories for various database interfaces. There is currently only one interface included.
odbc: This directory contains interface files that use ODBC to communicate with the
database.
The files in this directory are:
Makefile: Makefile to build all files in this directory.
odbc_interaction_admin_confirm.c: ODBC interface functions for Admin Confirm.
odbc_interaction_admin_request.c: ODBC interface functions for Admin Request.
odbc_interaction_best_sellers.c: ODBC interface functions for Best Sellers.
odbc_interaction_buy_confirm.c: ODBC interface functions for Buy Confirm.
odbc_interaction_buy_request.c: ODBC interface functions for Buy Request.
odbc_interaction.c: ODBC interface functions for connecting, disconnecting and error handling.
odbc_interaction_home.c: ODBC interface functions for Home.
dbc_interaction_new_products.c: ODBC interface functions for New Products.
odbc_interaction_order_display.c: ODBC interface functions for Order Display.
odbc_interaction_order_inquiry.c: ODBC interface functions for Order Inquiry.
odbc_interaction_product_detail.c: ODBC interface functions for Product Detail.
odbc_interaction_search_request.c: ODBC interface functions for Search Request.
odbc_interaction_search_results.c: ODBC interface functions for Search Results.
odbc_interaction_shopping_cart.c: ODBC interface functions for Shopping Cart.
This directory includes all of the C header files.
app_interface.h: Definitions and prototypes for the communication
interface between the driver and appServer.
app_threadpool.h: Definitions and prototypes for threadpool.
app_txn_array.h: Definitions and prototypes for txn_array.
app_txn_queue.h: Definitions and prototypes for txn_queue.
common.h: Definitions and prototypes for common functions shared by the modules in this kit.
datagen.h: Definitions and prototypes for the data generator.
eu.h: Definitions and prototypes for Emulated User
related functions.
odbc_interaction_admin_confirm.h: Definitions and prototypes for Admin Confirm.
odbc_interaction_admin_request.h: Definitions and prototypes for Admin Request.
odbc_interaction_best_sellers.h: Definitions and prototypes for Best Sellers.
odbc_interaction_buy_confirm.h: Definitions and prototypes for Buy Confirm.
odbc_interaction_buy_request.h: Definitions and prototypes for Buy Request.
odbc_interaction.h: Definitions and prototypes for general ODBC
functions.
odbc_interaction_home.h: Definitions and prototypes for Home.
odbc_interaction_new_products.h: Definitions and prototypes for New Products.
odbc_interaction_order_display.h: Definitions and prototypes for Order Display.
odbc_interaction_order_inquiry.h: Definitions and prototypes for Order Inquiry.
odbc_interaction_product_detail.h: Definitions and prototypes for Product Detail.
odbc_interaction_search_request.h: Definitions and prototypes for Search Request.
odbc_interaction_search_results.h: Definitions and prototypes for Search Results.
odbc_interaction_shopping_cart.h: Definitions and prototypes for Shopping Cart.
_socket.h: Definitions and prototypes for socket related
functions.
There are two sub-directories in the scripts directory. The sub-directories are:
sapdb: The db directory contains scripts to create and load the database for SAP DB.
stats: This directory contains scripts to collect statistics on system resources.
The sapdb directory contains scripts to create and load the database specifically for SAP DB. The files in this directory are:
address.sql: Sql file to load the address table.
author.sql: Sql file to load the author table.
backup_db.sh: Script to backup up the database.
cc_xacts.sql: Sql file to load the cc_xacts table.
country.sql: Sql file to load the country table.
create_db.sh: Script to create database and devspaces.
create_indexes.sql: Sql file to create indexes.
create_indexes.sh: Script to execute dbmcli to execute the sql file.
create_keys.sql: Sql file to crate foreign keys.
create_keys.sh: Scripts to execute dbmcli to execute the sql file.
create_tables.sql: Sql file to create tables.
create_tables.sh: Script to execute dbmcli to execute the sql file.
drop_dbproc.sql: Sql file to drop all stored procedures.
drop_db.sh: Sript to drop the database.
drop_tables.sql: Sql file to drop tables.
drop_tables.sh: Scripts to execute dbmcli to execute the sql files.
item.command: Sql file to load the item table.
load_db.sh: Scripts to execute repmcli to execute the sql files.
order_line.sql: Sql file to load the order line table.
orders.sql: Sql file to load the orders table.
update_stats.sql: Sql file to update stats on all tables.
update_stats.sh: Script to execute dbmcli to execute the sql file.
The stats directory contains shell scripts that collect statistics on system resources. The files included in this directory are:
cpu.sh: Script to collect CPU stats using iostat.
io.sh: Script to collect I/O stats using iostat.
paging.sh: Script to collecting memory paging stats using sar.
This directory contains subdirectories that contain stored procedure files for specific databases. Currently, only stored procedures for SAP DB are included.
sapdb: Stored procedures for SAP DB.
The SAP DB stored procedures are located in this directory. These files contain the SQL statements to execute the interactions of the OSDL-DBT-1 test kit. The files included in this directory are:
getPromoImages.sql: Get the related items for the item.
DigSyl.sql: Generate u_name and password according to c_id.
getSCSubTotal.sql: For the given shopping_cart id, calculate sub_total
according to the cost and the quantity of each item in the
shopping cart.
addToSC.sql: Add an item to the shopping cart.
createSC.sql: Create a new shopping cart
refreshSC.sql: Update the shopping_cart_line info.
getCustInfo.sql: Get the customer information.
InsertCust.sql: Create a new customer.
updateSC.sql: Calculate and update the sub_total, tax, ship_cost, and total
for the shopping cart.
initSCItems.sql: Initialize output variables.
getSCDetail.sql: Get the shopping_cart_line info.
initOrderItems.sql: Initialize output variables.
getOrderItems.sql: Get the order_line_info.
home.sql: Get customer name if the user is a known customer. Call
getPromoImages.
buyrequest.sql: Implement Buy Request interaction.
buyconfirm.sql: Implement Buy Confirm interaction.
shoppingcart.sql: Implement Shopping Cart interaction.
order_inquiry.sql: Return c_uname for the user.
order_display.sql: Get the order information for the user.
admin_request.sql: Implement Admin Request interaction.
admin_confirm.sql: Implement Admin Confirm interaction.
new_products.sql: Implement New Products interaction.
best_sellers.sql: Implement Best Sellers interaction.
search_results_author.sql: Implement Search Results (search by author) interaction.
search_results_subject.sq: Implement Search Results (search by subject) interaction.
search_results_title.sql: Implement Search Results (search by title) interaction.
The tools directory contain utilities and programs that aid in the debugging or to support the running of the test. The files contained in this directory are:
Makefile: Makefile to build all files in this directory.
odbc_test.c: Test tool for each interaction.
load_db_proc.c: Tools to load some of the stored procedures.
postproc.c: Tools to analyze data after the run.