Developer Guide |
|
FairCom Java & .NET Stored Procedures |
|
Audience: |
Developers |
Subject: |
How to use .NET and Java to develop stored procedures, triggers, and user-defined functions that run inside the FairCom DB |
Copyright: |
© Copyright 2024, FairCom Corporation. All rights reserved. For full information, see the FairCom Copyright Notice. |
About the Documentation
FairCom supports stored procedures, user-defined functions, and triggers written in either of two different development environments: cross-platform Java and .NET languages such as in C#. This book contains information about both environments:
In addition, you will find tutorials for these languages in the ReadMe's:
FairCom also provides utilities for exporting and deploying stored procedures. See the following topic in the Command-Line Utilities guide:
test
Stored procedures and triggers provide the ability to write Java and .NET routines that contain SQL statements and store those routines within a FairCom DB SQL database. Tools and applications can then execute the procedures.
A stored procedure is a snippet of code embedded in an SQL CREATE PROCEDURE statement. The snippet can use all standard Java or .NET features as well as FairCom DB SQL supplied Java classes for processing any number of SQL statements.
A trigger is a special type of stored procedure that helps ensure referential integrity for a database. Like stored procedures, triggers also contain Java or .NET code (embedded in a CREATE TRIGGER statement) and classes. However, triggers are automatically invoked (“fired”) by certain SQL operations (an insert, update, or delete operation) on the trigger’s target table.
User defined functions (UDFs) extend the availability of built-in scalar functions with modules written by the user. The user can transform data with custom routines for their unique business needs. These procedures are created with the FairCom DB SQL CREATE FUNCTION statement.
Stored procedures and triggers provide a flexible, general mechanism to store a collection of SQL statements and program constructs in a database enforcing business rules and performing administrative tasks.
The ability to write stored procedures and triggers expands the flexibility and performance of applications that access a FairCom DB SQL environment: