Special

Introducing the “Welcome to Xojo” Bundle!

New to Xojo and looking for guidance? We've put together a terrific bundle to welcome you! Xojo Bundle

This bundle includes six back issues of the magazine -- all of year 21 in printed book and digital formats -- plus a one-year subscription (beginning with 22.1) so you'll be learning all about Xojo for the next year. It's the perfect way to get started programming with Xojo. And you save as much as $35 over the non-bundle price!

This offer is only available for a limited time as supplies are limited, so hurry today and order this special bundle before the offer goes away!

Article Preview


Buy Now

Issue 5.1

COLUMN

REALSQLDatabase (SQLite)

Triggers and Views

Issue: 5.1 (September/October 2006)
Author: Paul Lefebvre
Author Bio: Paul Lefebvre is President and Chief Software Architect of LogicalVue Software.
Article Description: No description available.
Article Length (in bytes): 4,297
Starting Page Number: 38
Article Number: 5115
Related Link(s): None

Excerpt of article text...

The features of SQLite that we'll be looking at this time are Triggers and Views. These are two fairly advanced database concepts, so they won't be something that you will need all the time. However, it is important to know about them and to keep them in mind as a possible way to simplify any databases you are creating.

Triggers

A database trigger is essentially code that lives on the database and that is run automatically (or is "triggered") when a specific action occurs. Triggers can be a useful way to enforce data integrity rules directly on the database. This can prevent bad data from ever being inserted into a database, even by someone who doesn't use your application.

A trigger is associated to a table and runs automatically when a specific action occurs on a table, such as inserting, updating or deleting data. The trigger contains SQL commands to run when the event occurs. Some reasons for triggers include:

...End of Excerpt. Please purchase the magazine to read the full article.