Re: FOREIGN KEY IN DIFFERENT DATABASES
Posted in 1997
Carlos Alberto Cobos Lozada wrote: > > Please, help me... > I have Informix-Online 5.0 UC1 and can not make a foreign key > restriccion from two tables in different database in the same server ^^^^^^^^^^^ Spelling aside (and I'm not immune in that dpratment.. ;-), you mean, of course, constraint. > (They are not in different machines). > If I buy INFORMIX-Online Dynamic Server 7.X, I could make it? No you could not. Nor should you want to. If a pair of tables is so closely related that you want to create a referential constraint between them, then they belong in the same database. And no, it will not help to try faking out a local table using an alias. Give the Informix *some* credit for intelligence! That said: You can simulate a referential constraint across servers - even on different machines - if you use triggers on both tables. *THAT* said - If I understand the basics of XPS, there may be a way to do what you want to do. I'm out of my league on this one so I'm not going out on a limb. I do hope someone else picks this up because I'm also curious about the great features of XPS. But you still shouldn't want to do it for the reason cited above. -- -- Jake (Never yelled "CROWDED THEATER!" during a fire) +------------------------------------------------------------+ | The expedient performance of a task with excessive concern | | regarding its duration-to-completion engenders a virtual | | certainty of diminished benefit therefrom. | | -- Benjamin Franklin (but he said it in 3 words) | +------------------------------------------------------------+