Building Database Applications Using ADS

The Advantage Database Server is a RDBMS (relational database management system), but it is not a full-scale database development environment. While ADS includes a varied set of tools for creating and configuring the files that will be used by a database application, you do not use it directly to build the actual client applications. For that purpose you use one of a wide range of development environments.

This section is designed to provide you with a broad understanding of the role that ADS, and the tools that come with it, play in application development. To meet this end, this discussion is broken down into two parts: creating the database and creating the client applications.

In reality, this discussion could have been organized in a number of different, yet equally correct, ways. For example, database development is often described as a four-part process of design, development, testing, and deployment. While true, that description focuses on the process, and not the tools. Since this book is specifically about the Advantage Database Server, we felt that a tool-based view is more appropriate.

Creating the Database

A database, as the term is used here, is a collection of files used by the Advantage Database Server. With ADS, these files include tables, memo files, indexes, and in most cases, data dictionaries.


If you are unfamiliar with what the parts of a database are, you might want to take a quick look at Chapter 2 (creating tables), Chapter 3 (defining indexes), and Chapter 4 (using data dictionaries). The introductions to each of these chapters define what these various files are, and what roles they play in a database.

In most cases, you use the Advantage Data Architect to create your database. Specifically, you either import existing data into one or more tables, or you design the tables from scratch. You then consider how your data will be accessed by the client applications, and design the indexes that will make that access fast.

In many cases, you also design a data dictionary. A data dictionary, as far as ADS is concerned, is a special file that is used to access all of the tables within a given application. Data dictionaries provide your client applications with a number of powerful features, such as security, constraints, and referential integrity, to name just a few. Here again, you will probably use the Advantage Data Architect to create your data dictionary.

Instead of using the Advantage Data Architect to create your database, you can also create your database at runtime from one or more of your client applications. To do this, your client applications would need to include code that defines new tables, indexes, and data dictionaries, as needed, on-the-fly. Your client applications would not explicitly create memo files. Memo files are created automatically when data is inserted into memo or BLOB (binary large objects) fields.

Creating databases on-the-fly from within a client application requires a lot of programming, compared with creating databases with the Advantage Data Architect. Fortunately, creating a database at runtime is normally only necessary in special situations. For example, some applications need to store separate data in separate databases. If these applications need to be able to create a new database at any time, then you will probably need to take the extra effort to create the new database at runtime.

Before a client application can access the tables, indexes, and data dictionaries of an application, the client workstation must be able to send IP packets to the server upon which Advantage Database Server is running. Client applications don’t even need the rights to access the individual files. The server does this. The exception is when the client is using ALS, in which case the client application must have rights to the shared table, index, and memo files.

The server on which you install your database and the Advantage Database Server can be running one of the following operating systems: Windows 98, Windows ME, Windows NT 4.0 (Service Pack 6 or later), Windows 2000, Windows 2003, Novell NetWare 4 or later, or Linux.

Actually, there are four versions of the ADS server. The most popular version is designed for Windows NT 4.0 or later, which includes 2000 and 2003. For Novell networks, there is a NLM (NetWare loadable module), which requires NetWare version 4 or later. The Linux version of ADS requires glibc 2.1.2-11 or newer and kernel version 2.2 or newer. Finally, there is a Windows 98/ME version. However, Windows 98 and ME are poor hosts for a server, so you should consider one of the other versions of ADS.


Windows XP is not listed as a supported OS since XP is marketed by Microsoft as a client operating system only, not as a server operating system. ADS for Windows NT/2000/2003 runs on XP, although XP is not a supported OS.

Some final comments about creating a database are in order before continuing on to the discussion about building client applications. First, while creating tables, indexes, and data dictionaries is not hard, the design of the tables, indexes, and data dictionaries is often the result of research and thoughtful consideration.

For example, you need to take into account what kind of data your need to store and how it will be used. This will lead you to consider how many tables you will need to create, and what indexes you will add to them. Likewise, how you set up a data dictionary, including what groups and users to add, what views to define, and whether to use referential integrity, can have a big impact on the success of your database application.

A second consideration is that the design of your database is something that will likely change over time. In short, database design is often an iterative process.

As your design begins to take shape, you often will discover that a particular table is missing one or more fields, or that additional indexes need to be created, or that entirely new tables must be added.

These changes, when they happen, will often affect both the server and the client parts of the application. For instance, if you find that you have to add a new field to a table, you might use the Advantage Data Architect to update the table file. In most cases you will then also need to change your client applications so that they can use the newly added field.

Creating the Client Applications

The Advantage Data Architect is a pretty powerful piece of software. You will learn as you work through the later chapters in this book, that not only does the Advantage Data Architect provide you with the tools to design a database, but also that it permits you to work with the database. Specifically, using the Advantage Data Architect, you can add new records to your tables, change existing records, and delete records. It also provides you with a number of tools to sort the data in your tables, as well as to filter your data to display only a subset of the records in a given table. Indeed, it even permits you to export your data to HTML (hypertext markup language), which you can then print, using this feature as a simple reporting mechanism.

Here is another way to look at it. The Advantage Data Architect is an ADS client application. However, it is a very general ADS client whose primary purpose is to give you the ability to easily design and test your database. In most cases, you will create one or more custom client applications to work with your ADS databases.

Custom client applications are all about making your data accessible to your end users. Sure, an end user could use the Advantage Data Architect to view just a subset of records, but that would require that your end user know SQL. Similarly, while an end user could export the results of a SQL query to HTML, and then print this from a Web browser, the output would lack the quality and sophistication that most people want to see in a report.

With a custom client application, your end users are presented with data options that make sense in the context of the data. For example, your application can display a form from which the end user enters a customer account number. Once the number is entered, your application can perform a query to select the data for that customer, and display the customer data in an easy to view format. Similarly, your application can include a menu item that, when selected, creates and prints an attractive report that makes the data easily digestible.

You can create custom client applications that use ADS from a wide variety of application development platforms. Examples of languages from which you can access ADS include Borland products Delphi, C++Builder, C#Builder, Kylix, and JBuilder; Microsoft products Visual Basic, Visual C++, Visual C#, FoxPro, Visual J#, and Visual Studio.NET; IBM’s VisualAge for Java; Sun Microsystems’ Sun ONE Studio; Computer Associates’ Clipper; Grafx Software’s Visual Objects; and Corel’s Paradox. For Web-based development, many of the preceding products can be used to create CGI or ISAPI (Internet server application programming interface) Web server extensions. In addition, you can access ADS from PHP and Perl.

In short, you can use any application development environment for which Extended Systems supplies a data access mechanism. Fortunately, Extended Systems provides a large number of data access mechanisms. These are listed in Table 1-1, which includes a description of the development environments best suited for each mechanism.

Table 1-1: Data Access Mechanisms for the Advantage Database Server

Data Access Mechanism

Supported Development Environments

Advantage TDataSet Descendant

Any language that supports Borland's VCL (visual component library) or CLX (component library cross-platform). These include Delphi, C++Builder, and Kylix.

Advantage ODBC Driver

Any language that supports ODBC drivers. These include almost all Windows-based development environments such as Visual Basic, Visual C++, Visual FoxPro, Delphi, and C++Builder, to name a few. There is also a Linux ODBC version for ODBC-enabled Linux applications.

Advantage OLE DB Provider

Any language that supports ADO (ActiveX data objects). These include Visual Basic, Visual C++, Delphi, C++Builder, and any .NET development tool such as Visual Studio .NET and C#Builder.

Advantage Client Engine (ACE) API

Any language that can make an API call into a Windows DLL (dynamic link library) or Linux SO (shared object ) file, such as Visual Basic, Delphi, Kylix, and C/C++.

Advantage Clipper RDDs (replaceable database drivers)


Advantage Visual Objects RDDs

Visual Objects.

Advantage JDBC Driver

Any Java development environment that supports JDBC drivers such as JBuilder, Sun ONE Studio, and VisualAge for Java.

Advantage .NET Data Provider

Any .NET-enabled development environment including, but not limited to, Visual Studio.NET and C#Builder.

Advantage DBI Driver

Perl under Windows or Linux.

Advantage PHP Extension

For PHP version 3 or later under Windows or Linux.

Advantage Crystal Reports Driver

Seagate Crystal Reports versions 6 and later.

Several of the data access mechanisms listed in Table 1-1 refer to groups of drivers. For example, there are two Advantage ODBC drivers, one for 32-bit Windows and another for Linux. Similarly, there are Windows and Linux versions of both the Perl and PHP drivers.

As you can see from this list, you have an impressive selection of data access options with the Advantage Database Server. As a result, you can access your data from Advantage Database Server with nearly every modern software development environment.

There is another point that deserves mention here. Each of these data access options can access any version of the Advantage Database Server. Specifically, even though the Advantage OLE DB Provider is only available for Windows clients, it can access ADS running under Linux as well as Novell NetWare. Similarly, a Java client using the Advantage JDBC Driver running on a Macintosh can access any ADS server, regardless of the operating system the server is running on.


The drivers listed in Table 1-1 can be found on the CD-ROM accompanying this book.

Advantage Database Server. The Official Guide
Advantage Database Server: The Official Guide
ISBN: 0072230843
EAN: 2147483647
Year: 2002
Pages: 129 © 2008-2017.
If you may any questions please contact us: