Skip to main content

Foreign Keys

Foreign Keys

An InterSystems SQL table can also have foreign keysOpens in a new tab. To define these, you add foreign key definitions to the corresponding class definition.

Foreign keys establish referential integrity constraints between tables that InterSystems IRIS uses when new data is added or when data is changed. If you use relationships, the system automatically treats these as foreign keys. But you can add foreign keys if you do not want to use relationships or if you have other reasons to add them.

For more information on foreign keys, see Other Options for Persistent Classes.

FeedbackOpens in a new tab