Back to home page

sPhenix code displayed by LXR

 
 

    


Warning, /RDBC/macros/README.RDBC is written in an unsupported language. File is not indexed.

0001 # $Id: README.RDBC,v 1.1.1.1 2004/02/18 20:58:02 dave Exp $
0002 #
0003 #     This file is part of the RDBC
0004 #     Author: Valeriy Onuchin <onuchin@sirius.ihep.su>
0005 
0006 
0007 This directory contains some RDBC test macros:
0008 
0009 ___________________________________________________________________  
0010                      RDBCmysql.C
0011 
0012    not ready yet
0013 
0014 ___________________________________________________________________  
0015                      RDBCbench.C 
0016 
0017   This is a sample implementation of the 
0018   Transaction Processing Performance Council Benchmark B 
0019   The code was adaptated from JAVA code taken from
0020   http://www.worldserver.com/mm.mysql/
0021 
0022  Usage:
0023 
0024  root[] .include <RDBC path>/include    // add RDBC to include path 
0025  root[] gSystem->Load("libRDBC");      // load library
0026 
0027  Do either:
0028 
0029  root[] .L RDBCbench.C                 // load interpreted macro
0030  root[] .L RDBCbench.C++               // load compiled macro
0031 
0032  Run test:
0033 
0034  root[] bench(dsn,usr,psw,[option],[tpc],[clients]); // execute
0035 
0036       dsn          URL/DSN
0037       usr          user name
0038       psw          password
0039       tpc          transactions per client
0040       clients      number of simultaneous clients
0041 
0042       option string can contain:
0043          -v           verbose error messages
0044          -init        initialize the tables
0045 
0046             --------------------------------------
0047 
0048  To compile standalone executable program use:
0049 
0050  1. Compile shared RDBCbench_C.so by:
0051 
0052        root[0] gSystem->Load("libRDBC");
0053        root[1] .L RDBCform.C++
0054    
0055    or as single shell command:
0056    
0057    $root -b -q >/dev/null tmp.C | echo '{gSystem->Load("libRDBC"); gSystem->CompileMacro("RDBCbench.C","kf");}' >tmp.C
0058 
0059    Comment: 
0060       - RDBCbench class uses signal-slots which require generating dictionary for this class.
0061       - The quickest way to do it is to use  ACLiC (Automatic Compiler of Shared Library for CINT)
0062 
0063  2. Comiple an executable by:
0064 
0065     $ g++ -O -o RDBCbench RDBCbench.C `root-config --cflags --glibs` -lRDBC -DSTANDALONE 
0066 
0067  3. Run it:
0068  
0069     $ ./RDBCbench url username [password] [option] [tpc] [clients] 
0070 
0071 
0072 ___________________________________________________________________  
0073             RDBCconsumer.C RDBCproducer.C
0074 
0075    Scripts were tested  only with Oracle, not working with MySQL yet
0076 
0077  
0078 ___________________________________________________________________  
0079                   RDBCemp.C
0080 
0081    Script requires standard demo tables for Oracle.
0082    To create these demo tables for MySQL  run:
0083    
0084    $ mysql test -u username -p <demobld.mysql   
0085 
0086    Usage:
0087   
0088  root[] gSystem->Load("libRDBC");      // load library
0089  root[] .L RDBCemp.C                   // load macro
0090  root[] RDBCemp(dsn,[usr],[pwd]);      // execute the function from macro
0091 
0092 
0093            --------------------------------------
0094 
0095  To compile standalone executable program use:
0096 
0097     $ g++ -O -o RDBCemp RDBCemp.C `root-config --cflags --glibs` -lRDBC -DSTANDALONE 
0098 
0099 
0100  Run it:
0101  
0102     $ ./RDBCemp url username password &  
0103 
0104 
0105 ___________________________________________________________________  
0106                   RDBCfirst.C
0107 
0108    Script requires standard demo tables for Oracle.
0109    To create these demo tables for MySQL  run:
0110    
0111    $ mysql test -u username -p <demobld.mysql 
0112  
0113    Usage:
0114   
0115  root[] gSystem->Load("libRDBC");         // load library
0116  root[] .L RDBCfirst.C                    // load macro
0117  root[] RDBCfirst(dsn,[usr],[pwd]);       // execute the function from macro
0118 
0119 
0120            --------------------------------------
0121 
0122  To compile standalone executable program use:
0123 
0124     $ g++ -O -o RDBCfirst RDBCfirst.C `root-config --cflags --glibs` -lRDBC -DSTANDALONE 
0125 
0126 
0127  Run it:
0128  
0129     $ ./RDBCfirst url username password   
0130  
0131 ___________________________________________________________________  
0132                   RDBCform.C
0133 
0134   An example of GUI form which can be used for browsing of tables
0135 
0136  Usage:
0137   
0138  root[0] gSystem->Load("libRDBC");  // load library
0139  root[1] .L RDBCform.C              // load macro
0140  root[2]  new DbForm();             // create form  
0141 
0142  Warnings:
0143 
0144    - this macro uses TGxxx classes which don't work with win32
0145    - some tables ( for example Oracle system tables) can
0146      be browsed only with forward_only cursor. 
0147      Use DbForm::SetForwardOnly() method to force this
0148      setting.
0149 
0150             --------------------------------------
0151 
0152  To compile standalone executable program use:
0153 
0154  1. Compile shared RDBCform_C.so by:
0155 
0156        root[0] gSystem->Load("libRDBC");
0157        root[1] .L RDBCform.C++
0158 
0159   or as single shell command:
0160    
0161    $root -b -q >/dev/null tmp.C | echo '{gSystem->Load("libGui"); gSystem->Load("libRDBC"); gSystem->CompileMacro("RDBCform.C","kf");}' >tmp.C
0162 
0163    Comment: 
0164       - Few classes from this example use signal-slots which require generating dictionaries.
0165       - The quickest way to do it is to use  ACLiC (Automatic Compiler of Shared Library for CINT)
0166 
0167  2. Comiple executable by:
0168 
0169     $ g++ -O -o RDBCform RDBCform.C `root-config --cflags --glibs` -lRDBC -DSTANDALONE 
0170 
0171   Check the main() code for details
0172 
0173  3. Run it:
0174  
0175     $ ./RDBCform&
0176 
0177 ___________________________________________________________________  
0178                   RDBCscroll.C
0179 
0180    This example based on libodbc++/tests/scroll.cpp 
0181 
0182   This should work with almost any almost-compliant database out there,
0183   providing it supports scrollable cursors.
0184 
0185  Usage:
0186   
0187  root[] gSystem->Load("libRDBC");       // load library
0188  root[] .L RDBCscroll.C                 // load macro
0189  root[] RDBCscroll(dsn,usr,psw);        // execute the function from macro
0190 
0191     REQUIREMENTS
0192 
0193       o You must have create table/drop table rights