InterBase Change Views – Part 1 – What is a change view
This is the first post of a series on InterBase Change Views and is intended to be a high level overview of the new powerful change view technology that is patent pending and part of InterBase. Following this post I plan to show more posts taking the concept of Change Views into the real world with some real application examples.
InterBase Change Views
InterBase XE7 introduces a new way to track data changes to the database called Change Views.
Change Views are a new “subscription based” model allowing you to “subscribe” to data; once subscribed you are able to ask the database at a later time, spanning connections, for what has changed.
This is an especially cool, low cost way to reduce network traffic, mobile data costs and development time when tasked with keeping multiple remote database caches up to date. (especially if you have large tables to keep up dated).
Change Views are simple to use and reduce the upfront planning needed for building in data tracking that history has shown to be inherently complex and error prone.
Best of all change views has zero impact on database performance regardless of the number of subscribers!
Subscription & Subscribers
A core concept to change views is that of Subscriptions and Subscribers. InterBase Change view allows multiple subscribers to a subscription.
A subscription is defined once and then can be connected to by multiple users. Once defined, you can control who can subscribe thanks to the InterBase inbuilt user security.
Subscriptions work at field level and can be defined to track either an entire table or multiple tables. Subscriptions can also be defined to track Inserts, Updates or Deletes (or a mix of)
Multiple devices per subscriber
In addition to allowing specific users to subscribe to data, you can use a single user to have multiple destinations that are subscribing. This allows a user to subscribe for different devices such as their Phone, Tablet, Laptop or for a single user to be used programatically to distinguish multiple sites – e.g. Office 1, Office 2 etc.
This is done using the “at” verb when connecting to the subscription.
What Change Views are not!
Change Views are not an auditing system. While you can track deleted records, Change View are about identifying what has changed without keeping every value that it has been. If you want to do that, then continue to use Triggers and logging tables for the values you need to audit.
Video – Change Views
An overview of Change Views is available in the InterBase product address from CodeRage 9. I will be digging into more code based versions through this series. This covers the syntax used
Documentation – Change View
There is a great introduction to InterBase Change Views in the release notes for InterBase XE7
The post InterBase Change Views – Part 1 – What is a change view appeared first on Stephen Ball's Technical Blog.
Please login first in order for you to submit comments