Firebird Docset → Firebird Database Docs → Migration from MS-SQL to Firebird → SQL Tricks |
This section shows how to use some advanced Firebird features to emulate MS SQL behaviour, and avoid MS SQL workarounds.
Versions of MS SQL previous to 2000 will not support cascading updates and deletes. Foreign keys will always roll back on changes.
In MS SQL, this is typically solved by a combination of stored procedures and triggers, to avoid declaring the foreign key explicitly. This, in turns, makes the relationships implicit rather than explicit, which means that tools can't read the relationships directly and work on them.
During the migration process, all of the workaround procedures and triggers can be ignored - Firebird supports the cascading updates and deletes enforcing declaratively.
Versions of MS SQL previous to 2000 will not support updates on joined views fully. This is a major issue, since views are typically considered read-only; there are numerous restrictions to have them being updateable.
In Firebird, there are also a number of restrictions, but they are only meant for automatic updating. If the engine cannot perform the updates by itself, you can write triggers on the view to perform the required logic.
Firebird Docset → Firebird Database Docs → Migration from MS-SQL to Firebird → SQL Tricks |