ReadMe - FrontBase 3.x on Mac OS X (and Mac OS X Server 10.x)
|2.||The components of a FrontBase configuration|
|3.||The innards of a FrontBase installation|
|4.||Download and installation|
|6.||sql92 - super brief introduction|
|8.||Transactions - please read|
|9.||PlugIn for WebObjects 5
|11.||Installing a license string|
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 us ers. To obtain an E-Starter license consult our Web site, www.frontbase.com.
2. The components of the FrontBase configuration for Mac OS X
2. The components of the FrontBase configuration for Mac OS X
|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 manageme nt applications, but can also be started from the command line.|
|c)||sql92||A command line tool for managing and accessing databases. sql92 will let you create, start and 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)||FBAccess||A Cocoa framework providing the API that allows Cocoa applications to administrate and connect to FrontBase databases.|
|h)||EOF Adaptor||A Cocoa framework providing the functionality required by the Enterprise Objects Framework which is a part of WebObjects 4.5.1 from Apple Computer, Inc.|
|i)||FrontBaseManager||A Cocoa application for managing databases, database schemas and content. The FrontBaseManager also contains an "sql92" functionality; i.e. SQL statements can be sen t to a FrontBase database for execution. Please note that the FrontBaseManager can manage databases on all hosts in a network with a FrontBase installation.|
|j)||FBInfoCenter||A command line tool which prints out details about your FrontBase installation and your machine.|
|k)||PlugIn for WebObjects 5||The FrontBase PlugIn for WebObjects 5 needed for accessing FrontBase through a JDBC connection.|
3. The innards of a FrontBase installation
FrontBase is installed into a number of directories on a Mac OS X computer system. The core installation directory (FrontBase home directory) is /Library/FrontBase.
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.
The Mac OS X specific components are installed in:
FrontBaseManager /Applications FBAccess /Library/Frameworks
4. Download and installation
The latest version of FrontBase can always be downloaded from the download area of the FrontBase Web site.
Once you have downloaded the .dmg file, locate the file according to the preferences of your browser. The .dmg file is expanded with the disk utility to a .pkg file, select the .dmg file and double click. To install the .pkg, select the file, double cl ick, and the Installer will be launched ready to install FrontBase. The Installer will provide you with further directions.
The FBWebManager executable is installed in the proper cgi-bin directory (/Library/WebServer/CGI-Executables) of the Apache installation. Images and other files needed by the FBWebManager are installed into /Library/WebServer/Documents/FBWebManager. p>
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 /Library/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:
374 ? S 0:00 FBExec
If for some reason the FBExec isn't running, try to launch it from the command line:
In case of problems, you can e-mail email@example.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:
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
Locate the FrontBaseManager application (/Applications) and double-click on the icon to launch it.
|1.|| Click on the File menu, and then New Database (File
|2.||Provide a name for your new database and click "Create".|
|3.||Double click on the new database icon which appears in the monitoring window (this starts a connection).|
|4.||Click "Open" at the Open Database Window (using the default login settings).|
|5.||In the SQL Interpreter text view which comes up, type:
|6.||Press the "Execute SQL" button.|
|7.||Close the database connection window.|
|8.||Select your new database in the Monitoring Window and click the "Stop" button. Confirm.|
|9.||Now click the "Delete" button. Confirm.|
Congratulations! You have just created a database, connected to it, performed a simple fetch, stopped, and deleted it. It is as simple as that!
7.2 sql92 command line tool
First open a terminal window and launch the sql92 tool:
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 firstdb;
Congratulations! You have just created a database, connected to it twice, created a new user, committed a transaction, and deleted a database. It is as simple as that!
The FBWebManager allows you to use a 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 you r network to interface it.
Assuming that you have successfully installed the FBWebManager (and the FBWebEnabler), you can connect to it from a 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:
|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. TD>|
|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 a s 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" m enu 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" me nu 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
A transaction is a grouping of a sequence of SQL statements into a unit; execution of the unit as a whole either succeeds completely, or, if one of the commands fails or is a ROLLBACK command, the database is left unchanged.
Transactions are initiated automatically by the server when needed. Most SQL statements need a transaction. A COMMIT or a ROLLBACK SQL statement ends the current transaction.
Most 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. FrontBase PlugIn for WebObjects 5
The FrontBase PlugIn for WebObjects 5 is required for WebObjects 5 applications to work properly with FrontBase databases through a JDBC connection.
9.1 The innards of a FrontBase PlugIn installation
The FrontBase PlugIn consists of three items which are installed into a number of directories on the target computer system.
The Mac OS X specific components are installed in:
FrontBasePlugIn.EOMplugin /Developer/EOMBundles FrontBasePlugIn.frameworks /Library/Frameworks frontbasejdbc.jar /Library/FrontBase/Java
These items will enable you to connect to FrontBase from WebObjects 5 using the FrontBase plugin.
9.2 Download and Installation
The latest version of the FrontBase PlugIn can always be downloaded from
Once you have downloaded the .dmg file, locate the file according to the preferences of your browser. The .dmg file is expanded with the disk utility to a .pkg file, select the .dmg file and double click. To install the .pkg select the file double clic k, and the Installer will be launched ready to install the FrontBase PlugIn. The Installer will provide you with further directions. You can e-mail firstname.lastname@example.org and ask for help.
EOModeler: In the login panel it is only necessary to specify a URL in the URL field. Alternatively the user and password fields can be extracted and entered into the respective fields in the login panel. The URL format is as follows:
Please note that the user name is compulsory for the connection to work. If you have not created any users then you could simply use _SYSTEM (user=_SYSTEM) to get started.
WebObjects 5 runtime:
In order to make a WebObjects 5 project use the FrontBase plugin the framework FrontBasePlugIn.framework must be added to the project's Application Server target.
This framework is located in /Library/Frameworks/.
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.
11. 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 FrontBaseManager (or FBWebManager) to install the license or use your favorite text editor. If you want to use a text edit or, 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:/Library/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:
/Library/FrontBase/bin/FrontBase <database name>
If there are problems with the license string, FrontBase will print out error messages.