If I create a foreign key is referential integrity automatic? Do I have to set anything else to make cascading work?
edit: for example, in postgres. I mean by automatic that I don’t need to set anything else up to make RI work. Deletes. I am guessing though a FK means that it will insure data is present in the FK for the insert.
Yes, Referential Integrity is enforced as soon as you create a foreign key. You can define other options as well, such as cascading updates and deletes. Usually this is part of the same syntax used to create the foreign key and it normally has to be specified when the foreign key is created – at least that’s how it works in standard SQL.