Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Difference between logical and physical foreign key constraints?

Status
Not open for further replies.

Guest_imported

New member
Jan 1, 1970
0
I am running Sybase ASE 11.9.2
I add a foreign key using alter table and sp_foreignkey

alter table table_A add constraint FK_table_B_table_A
foreign key
(
table_B_id
)
references table_B
(
table_B_id
)

sp_foreignkey table_A, table_B, table_B_id

in this example table_B is the parent and table_A
is the child

When I open DBArtisian this noted as a Logical Foreign Key?
Artisian says that because it is a Logical that the RI is not enforced.
I am unaware of any differences in syntax for the alter table add constraint for logical vs physical.
What is happening here?
Thanks
 
I figured it out by dropping the foreign key and recreating it with the DBArtisian GUI.

DBArtisian refers to a logical foreign key as just a row in syskeys.

this is done by executing sp_foreignkey

using the alter table creates the fk constraint.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top