Server-side SQL
<< SQL syntax | Migration from MS SQL to Firebird | Client access >>
Server-side SQL
This section goes beyond simple SQL syntax differences, and describes the different tasks which can be accomplished server-side through SQL.
SQL tricks
This section shows how to use some advanced Firebird features to emulate MS SQL behaviour, and avoid MS SQL workarounds.
Trick: using cascades
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.
Trick: using updateable views
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.
back to top of page
<< SQL syntax | Migration from MS SQL to Firebird | Client access >>