Converting .dbf to SQLite

classic Classic list List threaded Threaded
13 messages Options
Reply | Threaded
Open this post in threaded view
|

Converting .dbf to SQLite

Rich Shepard
   Now that I have a working tool to convert from Access .mdb to sqlitedb
files, I need one for dBASE .dbf files. Or, a conversion to .csv will work,
too. Needs to run on linux, of course.

   My Google searches turned up a bunch of tools for the Windows platforms,
supposedly free converters that had prices on them, but nothing like the
mdbtools or mdb-sqlite.

TIA,

Rich
_______________________________________________
sqlite-users mailing list
[hidden email]
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
Reply | Threaded
Open this post in threaded view
|

Re: Converting .dbf to SQLite

Dave Lilley
Not trying to be silly here but why not write a wee program that reads in
the dbf file and for each row read in write the data into an sql file?

note the sql database & tables would be already created.

in this message you don't really give an indication on whether you are able
to do this or not so what i've said maybe of no use to you.

dave.

2009/11/12 Rich Shepard <[hidden email]>

>   Now that I have a working tool to convert from Access .mdb to sqlitedb
> files, I need one for dBASE .dbf files. Or, a conversion to .csv will work,
> too. Needs to run on linux, of course.
>
>   My Google searches turned up a bunch of tools for the Windows platforms,
> supposedly free converters that had prices on them, but nothing like the
> mdbtools or mdb-sqlite.
>
> TIA,
>
> Rich
> _______________________________________________
> sqlite-users mailing list
> [hidden email]
> http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
>
_______________________________________________
sqlite-users mailing list
[hidden email]
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
Reply | Threaded
Open this post in threaded view
|

Re: Converting .dbf to SQLite

Jean-Christophe Deschamps
In reply to this post by Rich Shepard


>    Now that I have a working tool to convert from Access .mdb to sqlitedb
>files, I need one for dBASE .dbf files. Or, a conversion to .csv will
>work,
>too. Needs to run on linux, of course.
>
>    My Google searches turned up a bunch of tools for the Windows
> platforms,
>supposedly free converters that had prices on them, but nothing like the
>mdbtools or mdb-sqlite.

I'm pretty sure OpenOffice can do a number of such conversions, free
and portable.  About command-line tools for linux, I just don't know.




_______________________________________________
sqlite-users mailing list
[hidden email]
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
Reply | Threaded
Open this post in threaded view
|

Re: Converting .dbf to SQLite

jreidthompson
Jean-Christophe Deschamps wrote:
>
>>    Now that I have a working tool to convert from Access .mdb to sqlitedb
>> files, I need one for dBASE .dbf files. Or, a conversion to .csv will
>> work,
>> too. Needs to run on linux, of course.

perhaps
http://developer.berlios.de/projects/dbf/
_______________________________________________
sqlite-users mailing list
[hidden email]
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
Reply | Threaded
Open this post in threaded view
|

Re: Converting .dbf to SQLite

jreidthompson
Reid Thompson wrote:
> Jean-Christophe Deschamps wrote:
>>>    Now that I have a working tool to convert from Access .mdb to sqlitedb
>>> files, I need one for dBASE .dbf files. Or, a conversion to .csv will
>>> work,
>>> too. Needs to run on linux, of course.
>
> perhaps
> http://developer.berlios.de/projects/dbf/
>
or one of these
http://sourceforge.net/search/?type_of_search=soft&words=dbf
_______________________________________________
sqlite-users mailing list
[hidden email]
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
Reply | Threaded
Open this post in threaded view
|

Re: Converting .dbf to SQLite

Rich Shepard
In reply to this post by Dave Lilley
On Thu, 12 Nov 2009, dave lilley wrote:

> Not trying to be silly here but why not write a wee program that reads in
> the dbf file and for each row read in write the data into an sql file?

   Because I'd have to research the format of the .dbf file and I'd probably
be re-inventing the wheel.

Rich
_______________________________________________
sqlite-users mailing list
[hidden email]
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
Reply | Threaded
Open this post in threaded view
|

Re: Converting .dbf to SQLite

Rich Shepard
In reply to this post by Jean-Christophe Deschamps
On Thu, 12 Nov 2009, Jean-Christophe Deschamps wrote:

> I'm pretty sure OpenOffice can do a number of such conversions, free and
> portable.  About command-line tools for linux, I just don't know.

   Perhaps. I learned today that only the Winduhs version of OO.o can import
.mdb files; the linux version cannot.

Rich
_______________________________________________
sqlite-users mailing list
[hidden email]
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
Reply | Threaded
Open this post in threaded view
|

Re: Converting .dbf to SQLite

Dave Lilley
In reply to this post by Rich Shepard
2009/11/12 Rich Shepard <[hidden email]>

> On Thu, 12 Nov 2009, dave lilley wrote:
>
> > Not trying to be silly here but why not write a wee program that reads in
> > the dbf file and for each row read in write the data into an sql file?
>
>   Because I'd have to research the format of the .dbf file and I'd probably
> be re-inventing the wheel.
>

No I mean you use a programming language to read the DBF datafile and write
out to your new database.

And as someone else has suggested you use OOo spreadsheet to connect to the
DBF file and then write it out to a CVS file so you can import into your new
DB.

if your not confidant with programming then i strongly suggest you take this
option as you then only have to import the CVS data into SQLlite.

Rich
> _______________________________________________
> sqlite-users mailing list
> [hidden email]
> http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
>
_______________________________________________
sqlite-users mailing list
[hidden email]
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
Reply | Threaded
Open this post in threaded view
|

Re: Converting .dbf to SQLite

Alexey Pechnikov-2
In reply to this post by Rich Shepard
Hello!

On Thursday 12 November 2009 07:30:28 Rich Shepard wrote:
>    Perhaps. I learned today that only the Winduhs version of OO.o can import
> .mdb files; the linux version cannot.

Try to read by Linux ODBC and save to SQLite.

Best regards, Alexey Pechnikov.
http://pechnikov.tel/
_______________________________________________
sqlite-users mailing list
[hidden email]
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
Reply | Threaded
Open this post in threaded view
|

ogr2ogr

stormtrooper
In reply to this post by Rich Shepard
Rich,

There is a command line tool (ogr2ogr) that runs on linux or windows that converts dbf to sqlite, csv, xml, etc. It is primarily a converter for geographic data but supports tabular data as well. OGR is part of fwtools.

http://fwtools.maptools.org/

http://www.gdal.org/ogr/ - supported formats and OGR SQL are worthy reads.

Keith

Reply | Threaded
Open this post in threaded view
|

Re: ogr2ogr

Rich Shepard
On Thu, 12 Nov 2009, stormtrooper wrote:

> There is a command line tool (ogr2ogr) that runs on linux or windows that
> converts dbf to sqlite, csv, xml, etc. It is primarily a converter for
> geographic data but supports tabular data as well. OGR is part of fwtools.

Keith,

   Thank you. I'm getting back to using GRASS for terrain analyese and
hydrological modeling after a number of years and have not used ogr2ogr.
It's installed here. I've read the man page and will now look for syntax
examples. It's just the tool I need.

Thank you,

Rich
_______________________________________________
sqlite-users mailing list
[hidden email]
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
Reply | Threaded
Open this post in threaded view
|

Re: Converting .dbf to SQLite

Alex Mandel-2
In reply to this post by Dave Lilley
Using R might actually be a convenient way to do it all in essentially
one step, and technically batch scriptable.

You'd need the RSQlite add on package, I think dbf reading is built in.

Alex

dave lilley wrote:

> 2009/11/12 Rich Shepard <[hidden email]>
>
>> On Thu, 12 Nov 2009, dave lilley wrote:
>>
>>> Not trying to be silly here but why not write a wee program that reads in
>>> the dbf file and for each row read in write the data into an sql file?
>>   Because I'd have to research the format of the .dbf file and I'd probably
>> be re-inventing the wheel.
>>
>
> No I mean you use a programming language to read the DBF datafile and write
> out to your new database.
>
> And as someone else has suggested you use OOo spreadsheet to connect to the
> DBF file and then write it out to a CVS file so you can import into your new
> DB.
>
> if your not confidant with programming then i strongly suggest you take this
> option as you then only have to import the CVS data into SQLlite.
>
> Rich
_______________________________________________
sqlite-users mailing list
[hidden email]
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
Reply | Threaded
Open this post in threaded view
|

Re: Converting .dbf to SQLite

Rich Shepard
On Thu, 12 Nov 2009, Alex Mandel wrote:

> Using R might actually be a convenient way to do it all in essentially
> one step, and technically batch scriptable.

   I found a perl script that converts .dbf to .csv. It's then trivial to
import the .csv into SQLite.

Rich
_______________________________________________
sqlite-users mailing list
[hidden email]
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users