ReadMe - FrontBase 3.x on FreeBSD

1.   Introduction
2.   The components of a FrontBase configuration
3.   The innards of a FrontBase installation
4.   Download and Installation
5.   Post installation
6.   sql92 - super brief introduction
7.   Getting started
7.1   sql92 command line tool
7.2   FBWebManager
8.   Transactions - please read
9.   Documentation
10.   Installing a license string


1. Introduction

FrontBase is a high performance, scalable, SQL 92 compliant relational database server created in the internet age for universal deployment.

The basic package is called E-Starter, which contains a free non-expiring license. The E-Starter package is a fully networked version including 3 technical support instances. There is no limit to the number of concurrent connections or the number of users . To obtain an E-Starter license consult our Web site, www.frontbase.com.


2. The components of the FrontBase configuration for FreeBSD

  a)   FBExec   The FBExec is a service background process that is typically started automatically when the computer is restarted. The FBExec provides status, management and access information to all client applications.
  b)   FrontBase   FrontBase is the actual database server. There is a FrontBase process running for each running database. A FrontBase process is typically started by various management applications, but can also be started from the command li ne.
  c)   sql92   A command line tool for managing and accessing databases. sql92 will let you create/start/stop databases, connect to databases, and execute SQL statements.
  d)   FBWebEnabler   A background process that services requests from the FBWebManager application. Please note that the FBWebEnabler can manage databases on all hosts in a network with a FrontBase installation.
  e)   FBWebManager   A small program that is started by the Web server whenever a service request (request/response loop) is received from a client browser. The FBWebManager forwards the request to the FBWebEnabler, waits for a reply and forwards this to the Web server (e.g. Apache).
  f)   FBCAccess   A C library providing the API that allows client applications to administrate and connect to FrontBase databases.
  g)   FBInfoCenter   A command line tool which prints out details about your FrontBase installation and your machine.


3. The innards of a FrontBase installation

FrontBase is installed into a number of directories on the target computer system. The core installation directory (FrontBase home directory) is /usr/local.

The subdirectory structure of the core installation directory is as follows:

   Backups         Backup directories, one for each database
   Collations      Collation files
   Databases       All databases and the associated log files
   Library         Files used by the FrontBase server process
   Templates       HTML template files used by FBWebManager
   TransactionLogs Transaction log files
   Translations    Translation files
   bin             The executable components
   include         Header files for e.g. the FBCAccess library
   lib             Client side libraries.

4. Download and Installation

FrontBase can be downloaded from download.

Once you have downloaded the .tar file, install it as follows (terminal window, logged in as root):
   tar xvf <FrontBase version>.tar
   cd <FrontBase version>
   sh install.sh
The FBWebManager executable is attempted installed in the cgi-bin directory (/usr/local/www/cgi-bin) of the Apache installation. Images and other files needed by the FBWebManager are installed into /usr/local/www/html/FBWebManager. If Apache on your compu ter isn't installed into /usr/local/www, please copy/move the FBWebManager and the associated files to the appropriate places.

Please note that the FBExec is installed to be automatically started when the computer is restarted. The FBExec is also started as part of the installation process, i.e. there is no need to restart the computer after installation.


5. Post installation

Once you have installed FrontBase it is a good idea to include /usr/local/FrontBase/bin in the search path of the various accounts that will use the FrontBase tools. This step is not necessary, but it can make your command line tool life easier.

There is no need to restart the computer after an installation, but it is a good idea to verify that the FBExec process is running by doing (from a terminal window):
   ps axc | grep FBExec
which should produce output like the following example:
  275 con- I+     0:00.05 FBExec
If for some reason the FBExec isn't running, try to launch it from the command line:
   /usr/local/FrontBase/bin/FBExec &
In case of problems, you can e-mail support@frontbase.com and ask for help.


6. sql92 - super brief introduction

sql92 is an interactive command line tool which allows you to manage and access all databases in the network. sql92 is launched by issuing the following shell command:
   /usr/local/FrontBase/bin/sql92
To create/start a database:
   sql92> create database firstdb;
To connect to a database:
   sql92> connect to <database-name> [on <host-name>] [user <user-name>];
If you omit the host name, the current host name is used, and if the user name is omitted the login name is used.

Always terminate sql92 commands with a ';'.

Quit sql92 by entering quit<enter> or by pressing Ctrl-D.

The sql92 help command will print a short summary of the sql92 command options.


7. Getting started

7.1 sql92 command line tool

First open a terminal window and launch the sql92 tool:
   /usr/local/FrontBase/bin/sql92
Enter the following sql92 commands (the semicolons are important):
   create database firstdb;
   connect to firstdb user _system;
   create user test;
   commit;
   disconnect current;
   connect to firstdb user test;
   values(server_name);
   disconnect current;
   connect to firstdb user _system;
   stop database;
   delete database;
Congratulations! You have just created a database, connected to it three times, created a new user, committed a transaction, and deleted a database. It is as simple as that!


7.2 FBWebManager

The FBWebManager allows you to use a normal Web browser as the interface to managing and accessing FrontBase databases in your network. Once the FBWebManager has been installed on some computer in your network, you can use a Web browser on any computer in your network to interface it.

Assuming that you have successfully installed the FBWebManager (and the FBWebEnabler), you can connect to it from a normal Web browser by using a standard URL:
   http://<host name or IP address>/cgi-bin/FBWebManager
The <host name or IP address> designates the host on which the FBWebEnabler/FBWebManager combo is installed. If this is your local machine, you can use:
   http://localhost/cgi-bin/FBWebManager
  1.   Click on the "CREATE" menu item (in the left-hand side of the browser window).
  2.   On the new page, enter the hostname (on which you want to create a database), firstdb as the name of the database and click on the "Create" button.
  3.   Assuming that you entered proper host and database names, an icon is added for the new database. You may have to click "Refresh" before the icon is shown as solid green (indicating that the database is now running).
  4.   Click on the green icon so it gets a yellowish background and click on the "CONNECT" menu item (left hand side of the browser window).
  5.   Enter _SYSTEM as user name and click on the "Connect" button.
  6.   On the new page, which is titled "DATABASE: <DATABASE NAME>@<HOST NAME>", click on the "User" menu item (button).
  7.   Click on the "Add new user" button; enter test as the "New user name" and click on the "Add" button.
  8.   Go back to the overview page (click on "DATABASE MONITOR VIEW"), select the green icon denoting the firstdb database and click on the "CONNECT" menu item.
  9.   Enter the proper hostname, test as user name and click on the "Connect" button.
  10.   In the "Commands" text field enter VALUES(SERVER_NAME); and click on the "Execute" button.
  11.   One row should be returned and displayed. In the log text field, you should now see the SQL statement together with some statistics.
  12.   Go back to the overview page (click on "DATABASE MONITOR VIEW"), select the green icon denoting the firstdb database and click on the "DELETE" menu item.

Congratulations! You have just created a database, connected to it twice, created a new user, committed a transaction, stopped and deleted a database. It is as simple as that!


8. Transactions - please read

Transactions are started automatically by the server when needed. Most SQL statements need a transaction. A COMMIT or a ROLLBACK (SQL statements) ends the current transaction.

Many of the FrontBase tools use, as default transaction settings, SERIALIZABLE, WRITE, PESSIMISTIC, which has the consequence that access to referenced tables is effectively serialized.

The user may change the defaults according to the SQL 92 specification.

When you are working with the FrontBase tools, you should always remember to COMMIT or ROLLBACK transactions in order not to block the access to the database.

If you try to access a table and it seems that your application or tool doesn't do anything, it is most likely waiting for some other session to COMMIT or ROLLBACK an active transaction. Neither your application/tool nor the FrontBase server is hanging!
FrontBase offers a feature called AUTO COMMIT, i.e. a way to tell the server that it should automatically commit each statement that is successfully executed. The sql92 command line tool uses, as default, this feature.

You can control the AUTO COMMIT feature by executing the following statements:
   SET COMMIT FALSE; -- Turns off AUTO COMMIT
   SET COMMIT TRUE;  -- Turns on  AUTOCOMMIT

9. Documentation

The documentation for the FrontBase database server can be downloaded from the documentation area of our Web site.

Please take the time to peruse this documentation, so you at least have a good feeling for what's in there.

The documentation as a whole can be downloaded as one document for offline perusal and reference.


10. Installing a license string

Once you have obtained a valid license string, it must be installed on the computer where FrontBase is installed. You can use the FBWebManager to install the license or use your favorite text editor. If you want to use a text editor, the instructions are as follows:
Create a new file with a single line consisting of the 64-character license string, followed by a colon (:) and the 16-character license check, i.e. a total of 81 characters.

Save this file into:
   /usr/local/FrontBase/LicenseString
Once the license string has been installed, you need to restart all running FrontBase databases.

If you are in doubt as to whether the license string has been installed correctly, you can try to start FrontBase from a shell:
   /usr/local/FrontBase/bin/FrontBase <database name>
If there are problems with the license string, FrontBase will print out error messages.