On Thu, 11 Nov 2004 11:53:15 +0000, Chris Green chris@areti.co.uk wrote:
Looking at the Rekall appendices (I think it's there) it tells you how Rekall manages this with various database backends. Postgresql has a rowId type thing (not called that) rather like Oracle whereas mysql doesn't. Thus with mysql a unique column of some sort is required whereas it's 'built in' as it were with postgresql.
In postgresql I make a unique identifier thusly: CREATE SEQUENCE jenny_serial START 1;
Then apply it to the table: CREATE TABLE t_example ( example_id INTEGER NOT NULL DEFAULT NEXTVAL('jenny_serial'), ...etc This will automatically add an incrementing integer each time you add a record to the table, and can thus be used to link to other tables that want to know about that record. i.e. CREATE TABLE t_postcode ( postcode_id INTEGER NOT NULL DEFAULT NEXTVAL('postcode_serial'), example_id INTEGER REFERENCES t_example, postcode VARCHAR ...etc
As far as I can recall, msaccess "auto" numbers don't export to postgres. However, I know nothing about mySQL and the above may not be at all relevant. If mySQL has an interactive sql prompt like psql it is well worth having a look at what the tables really look like without the clutter of a GUI in the way. jen