inman has asked for the wisdom of the Perl Monks concerning the following question:
I am faced with the task of iterating through a substantial set of MS Access databases (*.MDB) files and, without knowing anything about their schema, writing out an XML file containing all of the table contents. The idea being that I can then run a search engine spider over the resulting XML files such that I can locate databases on the file system. This is part of a data discovery tool used for risk management.
I am seeking the wisdom of fellow monks with this task because I believe that I am not the only one to have needed to do this. I am also looking for an example of how to discover the schema of an MS Access database.
The plan so far:
- Scan the network drive for *.mdb files using File::Find.
- Create / update and ODBC DSN for each database file using Win32::ODBC to manage the conection.
- Open a connection to the database using DBI and the DBD::ODBC driver.
- Discover the schema - This is where I need some information!
- Iterate over the tables, rows, columns. Write out to an XML file using XML::Writer.
Any help on the 'Discover the Schema' bit would be most appreciated.
|
---|
Replies are listed 'Best First'. | |
---|---|
Re: Flattening Access DB to XML
by g00n (Hermit) on Jan 26, 2004 at 13:18 UTC | |
by g00n (Hermit) on Jan 27, 2004 at 04:16 UTC | |
Re: Flattening Access DB to XML
by Grygonos (Chaplain) on Jan 26, 2004 at 14:53 UTC | |
Re: Flattening Access DB to XML
by been42 (Curate) on Jan 26, 2004 at 14:54 UTC | |
Re: Flattening Access DB to XML
by iburrell (Chaplain) on Jan 26, 2004 at 21:55 UTC | |
by inman (Curate) on Jan 27, 2004 at 10:09 UTC | |
Re: Flattening Access DB to XML
by inman (Curate) on Jan 27, 2004 at 14:07 UTC |
Back to
Seekers of Perl Wisdom