Firebird Documentation IndexMigration from MS-SQL to Firebird → SQL Tricks
Firebird Home Firebird Home Prev: Server-Side SQLFirebird Documentation IndexUp: Migration from MS-SQL to FirebirdNext: Client Access

SQL Tricks

Trick: Using Cascades
Trick: Using Updateable Views

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.

Prev: Server-Side SQLFirebird Documentation IndexUp: Migration from MS-SQL to FirebirdNext: Client Access
Firebird Documentation IndexMigration from MS-SQL to Firebird → SQL Tricks