Unconstrained integrity

Referential integrity and data integrity are important foundational rules within relational databases. The In-Memory OLTP engine introduced an extremely limited set of constraints that could be used in SQL Server 2014. This meant that solutions had to widely forgo many expectations of assigning referential and data integrity to memory-optimized tables.

Starting with SQL Server 2016, it is now possible to implement the following referential and data integrity rules for memory-optimized tables:

  • FOREIGN KEY constraints (between memory-optimized tables)
  • CHECK constraints
  • DEFAULT constraints
  • UNIQUE constraints
  • AFTER triggers for INSERT, UPDATE, and DELETE operations; triggers for memory-optimized tables must be created using WITH NATIVE_COMPILATION so that the trigger is natively compiled at creation time

These changes will now allow developers to create tables with some semblance of sane referential and data integrity rules (such as they are used to with disk-based tables).

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
18.188.137.37