baslinux AT lists.ibiblio.org
Subject: Baslinux mailing list
List archive
Re: [BL] dbf to sql convertor, was Re: Spanish dollybase,
- From: baslinux AT lists.ibiblio.org
- To: baslinux AT lists.ibiblio.org
- Subject: Re: [BL] dbf to sql convertor, was Re: Spanish dollybase,
- Date: Sun, 13 Jul 2008 22:33:12 +0000 (UTC)
sqlite 3I can't figure out how this works.
Also imports csv files.
I created database.csv which I wanted to make into database.db
csv has comma rather than | as separator
sqlite3 database.db
.separator ',' .import database.csv database
(instructions are .import FILE TABLE)
TABLE appears NOT to refer to the name of my database file.
dbf convertor can convert dbf to csv, a much shorter format.
I am hoping any garbage will get removed from my file by converting dbf to
csv and thence to sqlite db format.
I found documentation for the later dbf (0.9.0) but as dbf.sgml, for which an hour's online hunting did not find me a convertor to HMTL. You apparently need to have the sgml creating package to get docbook-to-manand then use man2html (which I do have). Anyway, I read (between the many large tags) about the --trim command, recommended for making much smaller sql files. r - l - or b (b is both left and right). I think it removes stray spaces.
dbf --trim b --sql file.sql file.dbf
(The --trim b must precede the --sql.)
My 437K dbf file, without trimming, produced 548K sql > 1MB db
Trimming produced 347K sql and 152K db. Which makes sqlite's format much more efficient than dbf or even csv (294K because of all the " ") even despite a lot of garbage.
There is still lots of garbage in the file (created by my buggy dbf database program) but about 640K less of it. Fragments of records are found in the header section. Long stretches of ^@ are found at random intervals.
Also, sqlite chopped off the entire first page (25 lines or so) of records from the sql file when reading it in. (It did not do this to the small non-buggy sample file, just my big actual buggy one).
I can enter this infomratoin back manually while referring to the dbf file,
once I figure out how.
Sindi
-
Re: [BL] dbf to sql convertor, was Re: Spanish dollybase, was Re: DBF database package xdb-1.2.0 for glibc225
, (continued)
-
Re: [BL] dbf to sql convertor, was Re: Spanish dollybase, was Re: DBF database package xdb-1.2.0 for glibc225,
baslinux, 07/09/2008
- Re: [BL] dbf to sql convertor, was Re: Spanish dollybase, was Re: DBF database package xdb-1.2.0 for glibc225, baslinux, 07/10/2008
-
Re: [BL] dbf to sql convertor, was Re: Spanish dollybase,,
baslinux, 07/11/2008
- Re: [BL] dbf to sql convertor, was Re: Spanish dollybase,, baslinux, 07/12/2008
- Re: [BL] dbf to sql convertor, was Re: Spanish dollybase,, baslinux, 07/12/2008
- Re: [BL] dbf to sql convertor, was Re: Spanish dollybase,, baslinux, 07/12/2008
- [BL] upgrading glibc 2.2.5 to 2.3.1, baslinux, 07/12/2008
- [BL] Opera 9.51 was Re: upgrading glibc 2.2.5 to 2.3.1, baslinux, 07/13/2008
- Re: [BL] Opera 9.51 was Re: upgrading glibc 2.2.5 to 2.3.1, baslinux, 07/15/2008
- Re: [BL] dbf to sql convertor, was Re: Spanish dollybase,, baslinux, 07/13/2008
- Re: [BL] dbf to sql convertor, was Re: Spanish dollybase,, baslinux, 07/15/2008
-
Re: [BL] dbf to sql convertor, was Re: Spanish dollybase, was Re: DBF database package xdb-1.2.0 for glibc225,
baslinux, 07/09/2008
- Re: [BL] dbf to sql convertor, was Re: Spanish dollybase,, baslinux, 07/14/2008
- Re: [BL] dbf to sql convertor, was Re: Spanish dollybase,, baslinux, 07/14/2008
- [BL] Importing csv to sqlite db, was Re: dbf to sql convertor, was Re: Spanish dollybase,, baslinux, 07/14/2008
- Re: [BL] Importing csv to sqlite db, was Re: dbf to sql convertor, was Re: Spanish dollybase,, baslinux, 07/15/2008
- Re: [BL] Importing csv to sqlite db, was Re: dbf to sql convertor, was Re: Spanish dollybase,, baslinux, 07/15/2008
- Re: [BL] Importing csv to sqlite db, was Re: dbf to sql, baslinux, 07/16/2008
- Re: [BL] Importing csv to sqlite db, was Re: dbf to sql, baslinux, 07/16/2008
- Re: [BL] Importing csv to sqlite db, was Re: dbf to sql, baslinux, 07/17/2008
- Re: [BL] dbf to sql convertor, was Re: Spanish dollybase,, baslinux, 07/14/2008
Archive powered by MHonArc 2.6.24.