User Input File Requirements
Database Initialization File
Database Initialization File is used for initializing the database(s) you are going to use in this experiment . Each time you run the two-phase experiment, the tool will first clean up all the tables, data and other related objects in your database and then read your initialization file to re-create the table(s) and data.
File Name Restriction
None
Content Convention
This file is described using XML 1.0. The pre-defined XML element are listed below:
XML Tag/Atttribute
Description
<DatabaseInit> The Root Element <DB> DB represents one of DBMS you are going to use. It can have more than one. -- name The name of DBMS, right now support "SYBASE" and "DB2" --userid Your login ID for this db --passd Your password for this db <initSchema> Inside this element, you should define the table schema you want the tool to create for this experiment. <initData> Inside this element, you should define the insert SQL command to initialize the table.
Sample File
In the example below, it is pretty self-explanatory. We create a Sales table for Sybase and insert two tuples inside that table. Create a TotalSales table for DB2 and insert one tuple for that table.
<?xml version="1.0" ?>
<DatabaseInit>
<DB name="SYBASE" usrid="JodieWu" passd="XXX">
<initSchema>
create table Sales
(
saleID numeric(6,0) identity,
amount float
) lock datarows
</initSchema>
<initData>insert into Sales values (1000)</initData>
<initData>insert into Sales values (80)</initData>
</DB>
<DB name="DB2" usrid="JODIEWU" passd="XXX">
<initSchema>
create table TotalSales
(
branchID varchar(10),
totalAmount DECIMAL(16,2)
)
</initSchema>
<initData>insert into TotalSales values ('branch1',1080)</initData>
</DB>
</DatabaseInit>
Back to User Input File Requirements