Subject Re: [firebird-support] Confusion on sequence for importing data
Author Milan Babuskov
moscow@... wrote:

> As a relative newcomer here, I could really do with some help:
>
> I am required to create a database, then import the data from several
> Access (spit!) tables, and create indexes, triggers/generators and FK
> constraints.
>
> The problem I have is with the sequence in which these should be done.
>
> The structure of all the FB tables (and their indexes/constraints etc) has
> been decided, and saved as an .sql
>
> I modified the .sql script to only create the database and tables, then
> pumped over the data (using dbWB), then attempted to add the indexes/FKs
> and triggers/generators. This doesn't appear to work as I had hoped.
>
> In these circumstances, is there an 'accepted' sequence to follow?

Create database and tables
Create triggers and generators (they are probably needed so generate
some PKs, default values, etc. while importing data)
Pump the data over
Add indices

Try to add FKs... you may get errors.

It would be great if you would elaborate on that "doesn't appear to
work" part, and tell us what exactly doesn't work. What do you do, what
do you expect, and what happens...

--
Milan Babuskov
http://fbexport.sourceforge.net