1. | Which constraints can become "not trusted"? |
|
2. | Can the use of foreign key constraints result in increased performance for some SELECT statements? |
|
3. | Can the use of triggers result in increased performance for some SELECT statements? |
|
4. | Which type of data integrity results in more code needing to be written: declarative data integrity or procedural data integrity? |
|
Answers
1. | Foreign key constraints and check constraints can become "not trusted." |
2. | Yes, for some SELECT statements, the use of foreign key constraints can result in increased performance. This is because the query optimizer can see the definition of the foreign key constraint and use it to optimize the produced execution plan. |
3. | No, the use of triggers will not result in increased performance for any SELECT statements. This is because triggers contain procedural code so the optimizer does not use them to optimize execution plans. |
4. | Procedural data integrity results in more code needing to be written. |