D&C Lug - Home Page
Devon & Cornwall Linux Users' Group

[ Date Index ][ Thread Index ]
[ <= Previous by date / thread ] [ Next by date / thread => ]

Re: [LUG] DATABASE FOR LINUX



-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Mark Evans wrote:
|
| Whilst OO.org does have the ability to handle databases it cannot
open
| MS Access files.

I'm fairly sure something can read the raw data, because on Redhat
the thumbnail icon for the databases shows real data IIRCC. Not that
I'd trust it.

Oh look a new toy to play with....

apt-get install mdb-tools

srw@xxxxx:~$ mdb-sql email.mdb
1 => list tables
2 => go

+------------------------------+
|Tables                        |
+------------------------------+
|emails                        |
+------------------------------+
1 Row retrieved
1 => describe table emails
2 => go

+------------------------------+--------------------+----------+
|Column Name                   |Type                |Size      |
+------------------------------+--------------------+----------+
|emailfrom                     |Text                |100       |
|emailto                       |Text                |100       |
+------------------------------+--------------------+----------+
2 Rows retrieved
1 => select * from email;
2 => go
email is not a table in this database
Error at Line : syntax error near ;

1 => select * from emails
2 => go

+----------------------------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------+
|emailfrom                      |emailto
~               |
+----------------------------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------+

... All one row of my data snipped - sorry ....

+----------------------------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------+
1 Row retrieved
1 =>


srw@xxxxx:~$ mdb-schema email.mdb - ------------------------------------------------------------- - -- MDB Tools - A library for reading MS Access database files - -- Copyright (C) 2000-2004 Brian Bruns - -- Files in libmdb are licensed under LGPL and the utilities under - -- the GPL, see COPYING.LIB and COPYING files respectively. - -- Check out http://mdbtools.sourceforge.net - -------------------------------------------------------------

DROP TABLE emails;
CREATE TABLE emails
~ (
~        emailfrom                       Text (100),
~        emailto                 Text (100)
);
- -- CREATE ANY INDEXES ...



- -- CREATE ANY Relationships ...

- -- relationships are not supported for access

... Hmm I could swear emailfrom is a primary key, and thus indexed.
But I have no Access around here to check. Still better than no data
at all, but use with care.

I'm guessing if it skips this kind of basics it is only useful for
simple imports - still it can print out the data as SQL Insert
statements, and create a schema suitable for Postges, so we are at
least within shooting distance of something useful.
-----BEGIN PGP SIGNATURE-----
Comment: Using GnuPG with Debian - http://enigmail.mozdev.org

iD8DBQFBjDI0GFXfHI9FVgYRAreWAKCOrCSfywtQOPZBOOWy9GYjBv3dQQCeKP8p
L/Jn3S+CYD4hwL1Iae87PlU=
=6RQS
-----END PGP SIGNATURE-----

--
The Mailing List for the Devon & Cornwall LUG
Mail majordomo@xxxxxxxxxxxx with "unsubscribe list" in the
message body to unsubscribe.



Lynx friendly