Analyze Database Data (DbAna)      

Description:
DbAna allows you to analyze the contents of a DBF, CSV, TXT or XML formatted file.
DbAna will scan thru the specified input file and use the first line for the column
names (unless you don't have a header line with the -n option).
DbAna will find for each column the maximum length and maximum digits
after the decimal dot (for currency or non integer values).
Columns with more than 255 characters are marked as memo fields.
DbAna also will analyze the character distribution for each column.
The result is written to the XXX_ana.txt file (XXX = input filename)
DbAna writes all diagnostics to a log file "logs/yyyymmdd/DbAna.log"
Note that In demo mode up to 100 records can be analyzed.

Syntax:
DbAna (Analyze ADO(SqlServer/Postgres),MDB, DBF, CSV, TXT or XML data)
usage: dbana [-sn] [-d{db}] -i{in} [-t table]
-d = DATABASE: Specify database input file
-i = INPUT : Specify input file (DBF, CSV, TXT or XML)
-t = TABLE : Table name (only for MDB input)
-s = SILENT : Dont show diagnostics (XX Records written..)
-n = NOHEADER: Input has no header line for column names
(Logfile written to logs/YYYYMMDD/dbana.log
Example: dbana -i Employees.XML
Example: dbana -i sample.mdb -t Employees

Example1:
DbAna
-i Employees.XML
Line 9: scanned Employees.XML
dbana: 9 Record(s) processed from 'Employees.XML'
Result in 'Employees_ana.txt'

Analyzed the external data from Employees.XML and written the output to Employees_ana.txt

Example2:

DbAna
-i sample.mdb -t Employees
Line 9: scanned sample.mdb
dbana: 9 Record(s) processed from 'sample.mdb'
Result in 'Employees_ana.txt'

Analyzed the table "Employees" in sample.mdb and written the output to Employees_ana.txt

Logfile:

If you run this command on Feb 18th, 2001 the logfile would be created in:
logs/20010218/Txt2Db.log
INIT    |13:35:03.438 |====== Opening c:/dbtkxml/logs/20010218/Txt2Db.log ======
DbTkXml |16:07:06.856 |ExecCmd: analyze Employees.TXT
Analyze |16:07:06.926 |Input=Employees.TXT, 
Analyze |16:07:06.986 |9 Record(s) processed from 'Employees.TXT'++Result in 'Employees_ana.txt'
DbTkXml |16:07:07.026 |ExecCmd: CreateDb Employees_ana.txt|Emp.DBF

Example Analyze file (Employees_ana.txt):
DATABASE ANALYSIS
===============================
Processed 9 Records from Employees.XML

COLUMNS
=======
>Integer(3) 1 EmployeeID
>Text(10) 9 LastName
>Text(10) 8 FirstName
>Text(10) 24 Title
>Text(10) 4 TitleOfCourtesy
>Date(8) 10 BirthDate
>Date(8) 10 HireDate
>Text(10) 30 Address
>Text(10) 8 City
>Text(10) 2 Region
>Text(10) 7 PostalCode
>Text(10) 3 Country
>Text(10) 14 HomePhone
>Integer(3) 4 Extension
>Text(10) 13 Photo
>Memo(12) 448 Notes
>Text(10) 1 ReportsTo


DATA ANALYSIS
========================
Integer(3) 1 EmployeeID
'1' 1 11.11%
'2' 1 11.11%
'3' 1 11.11%
'4' 1 11.11%
'5' 1 11.11%
'6' 1 11.11%
'7' 1 11.11%
'8' 1 11.11%
'9' 1 11.11%
===============================
Text(10) 9 LastName
'B' 1 11.11%
'C' 1 11.11%
'D' 2 22.22%
'F' 1 11.11%
'K' 1 11.11%
'L' 1 11.11%
'P' 1 11.11%
'S' 1 11.11%
'a' 9 100.00%
'c' 3 33.33%
'd' 1 11.11%
'e' 4 44.44%
'g' 2 22.22%
'h' 3 33.33%
'i' 3 33.33%
'k' 1 11.11%
'l' 6 66.67%
'm' 1 11.11%
'n' 5 55.56%
'o' 5 55.56%
'r' 3 33.33%
's' 1 11.11%
't' 1 11.11%
'u' 3 33.33%
'v' 2 22.22%
'w' 1 11.11%
'y' 1 11.11%
===============================
Text(10) 8 FirstName
'A' 2 22.22%
'J' 1 11.11%
'L' 1 11.11%
'M' 2 22.22%
'N' 1 11.11%
'R' 1 11.11%
'S' 1 11.11%
'a' 7 77.78%
'b' 1 11.11%
'c' 2 22.22%
'd' 1 11.11%
'e' 8 88.89%
'g' 1 11.11%
'h' 1 11.11%
'i' 1 11.11%
'l' 1 11.11%
'n' 6 66.67%
'o' 1 11.11%
'r' 5 55.56%
't' 4 44.44%
'u' 1 11.11%
'v' 1 11.11%
'w' 1 11.11%
'y' 1 11.11%
===============================
Text(10) 24 Title
' ' 11 122.22%
',' 1 11.11%
'C' 1 11.11%
'I' 1 11.11%
'M' 1 11.11%
'P' 1 11.11%
'R' 6 66.67%
'S' 9 100.00%
'V' 1 11.11%
'a' 18 200.00%
'c' 1 11.11%
'd' 3 33.33%
'e' 38 422.22%
'g' 1 11.11%
'i' 10 111.11%
'l' 9 100.00%
'n' 10 111.11%
'o' 3 33.33%
'p' 6 66.67%
'r' 10 111.11%
's' 17 188.89%
't' 14 155.56%
'v' 6 66.67%
===============================
Text(10) 4 TitleOfCourtesy
'.' 9 100.00%
'D' 1 11.11%
'M' 8 88.89%
'r' 5 55.56%
's' 5 55.56%
===============================
Date(8) 10 BirthDate
'/' 18 200.00%
'0' 14 155.56%
'1' 14 155.56%
'2' 6 66.67%
'3' 5 55.56%
'4' 2 22.22%
'5' 5 55.56%
'6' 5 55.56%
'7' 3 33.33%
'8' 4 44.44%
'9' 14 155.56%
===============================
Date(8) 10 HireDate
'/' 18 200.00%
'0' 13 144.44%
'1' 20 222.22%
'2' 4 44.44%
'3' 5 55.56%
'4' 5 55.56%
'5' 4 44.44%
'7' 2 22.22%
'8' 1 11.11%
'9' 18 200.00%
===============================
Text(10) 30 Address
LF 3 33.33%
CR 3 33.33%
' ' 26 288.89%
'-' 2 22.22%
'.' 11 122.22%
'0' 4 44.44%
'1' 5 55.56%
'2' 5 55.56%
'4' 3 33.33%
'5' 1 11.11%
'6' 1 11.11%
'7' 4 44.44%
'8' 1 11.11%
'9' 1 11.11%
'A' 4 44.44%
'B' 2 22.22%
'C' 2 22.22%
'E' 3 33.33%
'G' 1 11.11%
'H' 4 44.44%
'M' 2 22.22%
'N' 1 11.11%
'O' 1 11.11%
'R' 4 44.44%
'W' 4 44.44%
'a' 7 77.78%
'c' 1 11.11%
'd' 9 100.00%
'e' 10 111.11%
'g' 1 11.11%
'h' 5 55.56%
'i' 4 44.44%
'l' 7 77.78%
'm' 2 22.22%
'n' 5 55.56%
'o' 9 100.00%
'p' 2 22.22%
'r' 5 55.56%
's' 5 55.56%
't' 10 111.11%
'u' 2 22.22%
'v' 4 44.44%
'w' 1 11.11%
'y' 4 44.44%
===============================
Text(10) 8 City
'K' 1 11.11%
'L' 4 44.44%
'R' 1 11.11%
'S' 2 22.22%
'T' 1 11.11%
'a' 5 55.56%
'c' 1 11.11%
'd' 7 77.78%
'e' 5 55.56%
'i' 1 11.11%
'k' 1 11.11%
'l' 3 33.33%
'm' 2 22.22%
'n' 10 111.11%
'o' 10 111.11%
'r' 1 11.11%
't' 4 44.44%
===============================
Text(10) 2 Region
'A' 5 55.56%
'W' 5 55.56%
===============================
Text(10) 7 PostalCode
' ' 4 44.44%
'0' 4 44.44%
'1' 5 55.56%
'2' 5 55.56%
'3' 2 22.22%
'4' 1 11.11%
'5' 2 22.22%
'7' 2 22.22%
'8' 6 66.67%
'9' 6 66.67%
'C' 1 11.11%
'E' 1 11.11%
'G' 2 22.22%
'J' 2 22.22%
'L' 1 11.11%
'P' 1 11.11%
'R' 3 33.33%
'S' 2 22.22%
'T' 1 11.11%
'W' 2 22.22%
===============================
Text(10) 3 Country
'A' 5 55.56%
'K' 4 44.44%
'S' 5 55.56%
'U' 9 100.00%
===============================
Text(10) 14 HomePhone
' ' 9 100.00%
'(' 9 100.00%
')' 9 100.00%
'-' 9 100.00%
'0' 5 55.56%
'1' 8 88.89%
'2' 9 100.00%
'3' 2 22.22%
'4' 8 88.89%
'5' 30 333.33%
'6' 5 55.56%
'7' 8 88.89%
'8' 7 77.78%
'9' 4 44.44%
===============================
Integer(3) 4 Extension
'1' 1 11.11%
'2' 3 33.33%
'3' 6 66.67%
'4' 8 88.89%
'5' 8 88.89%
'6' 3 33.33%
'7' 3 33.33%
'8' 1 11.11%
===============================
Text(10) 13 Photo
' ' 9 100.00%
'1' 9 100.00%
'7' 9 100.00%
'O' 9 100.00%
'T' 9 100.00%
'b' 9 100.00%
'c' 9 100.00%
'e' 18 200.00%
'j' 9 100.00%
'p' 9 100.00%
't' 9 100.00%
'y' 9 100.00%
===============================
Memo(12) 448 Notes
' ' 397 4411.11%
'"' 12 133.33%
'(' 5 55.56%
')' 5 55.56%
',' 14 155.56%
'-' 1 11.11%
'.' 32 355.56%
'0' 1 11.11%
'1' 20 222.22%
'2' 5 55.56%
'3' 4 44.44%
'4' 2 22.22%
'5' 1 11.11%
'6' 5 55.56%
'7' 3 33.33%
'8' 5 55.56%
'9' 27 300.00%
'A' 17 188.89%
'B' 11 122.22%
'C' 14 155.56%
'D' 2 22.22%
'E' 5 55.56%
'F' 7 77.78%
'G' 2 22.22%
'H' 6 66.67%
'I' 5 55.56%
'J' 5 55.56%
'K' 1 11.11%
'L' 6 66.67%
'M' 14 155.56%
'N' 2 22.22%
'P' 5 55.56%
'R' 3 33.33%
'S' 24 266.67%
'T' 5 55.56%
'U' 8 88.89%
'W' 1 11.11%
'a' 168 1866.67%
'b' 9 100.00%
'c' 57 633.33%
'd' 61 677.78%
'e' 236 2622.22%
'f' 40 444.44%
'g' 39 433.33%
'h' 69 766.67%
'i' 124 1377.78%
'j' 3 33.33%
'k' 4 44.44%
'l' 73 811.11%
'm' 55 611.11%
'n' 166 1844.44%
'o' 116 1288.89%
'p' 30 333.33%
'r' 121 1344.44%
's' 111 1233.33%
't' 130 1444.44%
'u' 34 377.78%
'v' 18 200.00%
'w' 12 133.33%
'x' 2 22.22%
'y' 23 255.56%
===============================
Text(10) 1 ReportsTo
'2' 5 55.56%
'5' 3 33.33%
===============================
>Employees

DbTkXml,DbXmlTools,DbXml,Database,Export,Import,SQL,MDB,XML,DTD,HTML,CSV,Access,Toolkit,
Table,Column,Field,Record,Index,Query,External Data,Save As,merge,synchronize,explorer,
Db2XML,Db2CSV,Db2Txt,Db2Html,DbLoad,DbExplorer,DbSql,DbQuery,DbScript,
Conversion,Automate,API,Windows,Microsoft,utilities,file,management,administration,
command,line,batch scipts, shareware