Developer Quick Start
The Zen Software Development Kit (SDK) offers you the best of both worlds for database solutions: The MicroKernel Engine offers high speed data transactions, and the Relational Engine provides full featured relational data access to the same data with greater performance in reporting and decision support.
The following topics offer quick tips to help you begin building applications with Zen:
Choosing An Access Method
Many factors affect development strategy choices. Availability of tools on different platforms, the developer's familiarity with a given programming environment, and portability requirements often play decisive roles in the process. On the other hand, when the developer has more flexibility, various subtle factors should be considered.
Performance is always a consideration. Run-time performance, however, must be balanced against development time: is it more important to deliver the program quickly, or to have it run quickly in use?
In the context of database programming, the database interface affects both development time and run-time performance. Often the choice between SQL and Btrieve is based on these factors alone.
If you are new to Zen products, you may want to use access methods such as ADO.NET, JDBC, Zen Direct Access Components for Delphi and C++ Builder, or other third-party development tools to develop Zen applications.
If you want to directly write to the Btrieve API, see Btrieve API Programming.
The following table compares the various Zen access methods.
Access Method
Characteristics
Suitable For
Btrieve API
DLL can be called by (almost) any Windows programming language.
Exposes the complete feature set of the database.
Minimum size.
Greatest flexibility.
Shortest code path between application and data.
Least code overhead in the relational database management system (but more application code must be devoted to database management issues).
Client-server capability.
BLOB support.
Applications where size or run-time performance is the primary consideration.
Java
Thin client.
Cross-platform portability.
Internet/Intranet capability.
Supports Winsock and JNI protocols.
Machine and OS independence. Internet and Web capability.
Minimum size.
Good flexibility.
Rowset, field abstractions implemented in the interface.
Fair overall performance (Java is an interpreted language which carries a heavy code overhead).
Client-server features, version control inherent in the language
Web applets.
Internet-based applications.
Applications which must run on various hardware and OS platforms.
ADO.NET
Good overall performance.
Internet capability.
XML Support
Efficient scalable architecture
Applications running in a managed environment where runtime is paramount.
SQL/ODBC
Abstracts the application interface from the database implementation.
Most programming languages, many applications support it.
Relational access only.
Large. Generally slower than direct interface to the native DBMS API. Provides a "generic" interface to an application.
Full relational implementation.
Subset of native functionality.
Standard interface supported by nearly all Windows programming environments and many off-the-shelf applications.
Applications that require heterogeneous access to different data stores, or which must be independent of any particular data store, should consider ODBC.
Applications where maintaining a relational data store is the primary consideration, but run-time performance is still important.
Zen Direct Access Components
Replaces Embarcadero Database Engine in Delphi and C++ Builder
Classes to access data from either a transactional or relational context.
Application development using Embarcadero IDEs.
Database Connection Quick Reference
This section provides links to quick information on how to get connected to a Zen database.
These examples should only supplement the full documentation for each access method. For each access method, there are links to more detailed information.
Each sample references the Course table in the DEMODATA sample database, which is included with Zen.
ADO.NET Connections
For complete information on ADO.NET tasks, see
Using the Data Providers in Data Provider for .NET Guide
Code examples provided when you install the downloaded ADO.NET sample headers and files
Sample ADO.NET DB Connection Code
"ServerDSN=Demodata;UID=test;PWD=test;ServerName=localhost;";
JDBC Connections
For complete information on JDBC tasks, see the following topics in JDBC Driver Guide:
Sample JDBC Connection Code
Class.forName("com.pervasive.jdbc.v2.Driver");
Connection con = DriverManager.getConnection("jdbc:pervasive://localhost:1583/DEMODATA");
PreparedStatement stmt = con.prepareStatement("SELECT * FROM Course ORDER BY Name");
ResultSet rs = stmt.executeQuery();
Java Class Library
For complete information on Java Class Library tasks, see
Sample JCL Connection String
Session session = Driver.establishSession();
Database db = session.connectToDatabase();
db.setDictionaryLoc("c:\\PVSW\\DEMODATA");
DSN-Less Connections
Zen allows an application to perform a DSN-less connection (connecting to the SQL engine without using a DSN):
The following steps should be used when running locally on the server or from a remote client. This method works with Enterprise Server as well as Workgroup engines.
1. SQLAllocEnv
2. SQLAllocConnect
3. SQLDriverConnect: "Driver={Pervasive ODBC Client Interface};ServerName=<ServerName to Resolve>;dbq=@<ServerSide DBName>;"
Example
Driver={Pervasive ODBC Client Interface};ServerName=myserver;dbq=@DEMODATA;
ODBC Information
The implementation and limitations of the Zen ODBC access method is documented in the ODBC Guide. This documentation is shipped with Zen Enterprise Server, Cloud Server, Workgroup, and Client editions.
For ODBC information, see Zen ODBC Reference in ODBC Guide.
For supported SQL syntax, see SQL Syntax Reference in SQL Engine Reference.
Other SQL Access Methods
JDBC
For JDBC programming to the SQL engine, see the following topics in JDBC Driver Guide.
PDAC
Zen Direct Access Components are for Delphi and C++ Builder applications. For more information, see the following topics in Zen Direct Access Components Guide.
Additional Resources for Application Developers
The following topics provide further reading on Zen concepts.
Conceptual Information
This manual contains database conceptual information on both the MicroKernel Engine and Relational Engine.
Reference Information
Reference information for developers is contained in the various software development kit (SDK) manuals. In the Eclipse Help that can be installed with the database engine, see the topic Developer Reference.
Online Developer Resources
Get information for developers online at the Actian Zen website.
Sample Code
You can find the sample applications in your installation of the SDK component. The available samples include the following:
Zen Direct Access Components using Delphi or C++ Builder
Java Programming with the Zen Java Class Library or JDBC
Distributed Tuning Interface for Visual C++ or Delphi
Distributed Tuning Objects for Visual Basic
 
Last modified date: 10/31/2023