Getting Started Guide
Getting Started Guide
Solid
Database Engine
Getting Started
Guide
Version 4.2
June 2004
All rights reserved. No portion of this product may be used in any way except as expressly authorized in writing by
Solid Information Technology.
Solid logo with the text "SOLID" is a registered trademark of Solid Information Technology Inc.
Solid AcceleratorLib™, Solid Availability™, Solid Bonsai Tree™, Solid BoostEngine™, Solid CarrierGrade
Option™, Solid Database Engine™, Solid Diskless™, Solid EmbeddedEngine™, Solid FlowControl™, Solid Flo-
wEngine™, Solid High Availability™, Solid HotStandby™, Solid Information Technology™, Solid Intelligent
Transaction™, Solid Remote Control ™, Solid SmartFlow™, Solid SQL Editor™, Solid SynchroNet™, and Built
Solid™ are trademarks of Solid Information Technology Inc. All other products, services, companies and publica-
tions are trademarks or registered trademarks of their respective owners.
Solid Intelligent Transaction patented Solid Information Technology (U.S. patent 6144941).
This product contains the skeleton output parser for bison ("Bison"). Copyright (c) 1984, 1989, 1990 Bob Corbett
and Richard Stallman.
For a period of three (3) years from the date of this license, Solid Information Technology Inc. will provide you, the
licensee, with a copy of the Bison source code upon receipt of your written request and the payment of Solid's rea-
sonable costs for providing such copy.
iii
Glossary
Index
Organization
This guide contains the following chapters:
■ Chapter 1, Getting Started with your Solid Database Engine, familiarizes you with the
underlying components of Solid Database Engine.
Glossary
The Glossary provides definitions of terms.
Audience
This guide is for users who have little or no experience with Solid products.
v
Conventions
Product Name
In this guide:
■ "Solid Database Engine", "Solid engine", or "Solid server" refers to the database server
used in Solid products, such as Solid BoostEngine, Solid FlowEngine, or Solid Embed-
ded Engine.
■ "Solid" used alone refers to all Solid data management products. In addition, "Solid" is
the short company name for Solid Information Technology.
Typographic
This manual uses the following typographic conventions.
vi
. A column of three dots indicates continua-
. tion of previous lines of code.
.
Solid Documentation
Below is a complete list of documents available for Solid Database Engine, including
options. Solid documentation is distributed in an electronic format (usually PDF files).
Solid Online Services on our Web server offer the latest product and technical information
free of charge. The service is located at:
http://www.solidtech.com/
Electronic Documentation
■ Release Notes This file contains installation instructions and the most up-to-date infor-
mation about the specific product version. This file (releasenotes.txt) is copied
onto your system when you install the software.
■ Solid Database Engine Getting Started Guide This manual gives you an introduction
to the Solid Database Engine.
■ Solid Database Engine SQL Guide This manual describes the SQL commands that
Solid Database Engine supports. This manual also describes some of the system tables,
system views, system stored procedures, etc. that the engine makes available to you.
This manual contains some basic tutorial material on SQL for those readers who are not
already familiar with SQL. Note that some specialized material is covered in other man-
uals. For example, the Solid "administrative commands" related to the High Availabil-
ity (HotStandby) Option are described in the Solid High Availability Option User
Guide, not the SQL Guide.
■ Solid Database Engine Administrator Guide This guide describes administrative pro-
cedures for Solid servers. This manual includes configuration information. Note that
some administrative commands use an SQL-like syntax and are documented in the SQL
Guide.
■ Solid Programmer Guide This guide explains in detail how to use features such as
Solid Stored Procedure Language, triggers, events, and sequences. It also describes the
vii
interfaces (APIs and drivers) available for accessing Solid Database Engines and how to
use them with a Solid database.
■ Solid In-Memory Database Guide This manual describes how to use the in-memory
feature of Solid BoostEngine.
■ Solid SmartFlow Data Synchronization Guide This describes how to use Solid’s
SmartFlow technology to synchronize data across multiple database servers.
■ Solid AcceleratorLib User Guide This guide describes how to use the AcceleratorLib
library, a database engine library that can be linked directly to the client application.
Linking directly to the server improves performance by eliminating network communi-
cation overhead.
This manual also explains how to use two proprietary Application Programming Inter-
faces (APIs). The first API is Solid’s SA interface, a low-level C-language interface
that allows you to perform simple single-table operations (such as inserting a row in a
table) quickly. The second API is SSC API, which allows your C-language program to
set priorities for some of the server’s internal operations; this allows you to tune perfor-
mance in some ways - for example, giving the "local" user higher priority (more of the
CPU time) than remote users.
This manual also explains how to set up a Solid server to run without a disk drive.
■ Solid High Availability User Guide Solid’s High Availability Option (formerly called
the HotStandby Option) allows your system to maintain an identical copy of the data-
base in a backup server or "secondary server". This secondary database server can con-
tinue working if the primary database server fails.
■ Installing Solid Database Engine On Tornado/VxWorks This guide describes how to
install Solid Database Engine on the Tornado/VxWorks environment. It also explains
how to start the engine and run a brief test to ensure that installation was correct. This
manual is included only in packages for Tornado/VxWorks.
viii
Technical Support Requests
If you are a current customer and need assistance, the most efficient way to get answers is to
use the "support request form" on the web page
http://www.solidtech.com/support/index.html
Alternatively, for quick questions you may email us at
[email protected]
You may also search our knowledge base for solutions to common issues.
To follow up on a previously submitted request, email us at [email protected].
Please include the TPR tracking number. (A TPR tracking number is given to you when you
initially report a problem.)
Evaluation Support
If you are in the process of evaluating our software and require support, please fill out the
"Evaluation Support Form", which is accessible at
http://www.solidtech.com/commit/technicalsupport
or by clicking on "support request form" on the web page
http://www.solidtech.com/support/index.html
Or you may contact us at
[email protected]
Other Support
To purchase the product, or to purchase any options or upgrades, please contact:
[email protected]
or your sales representative.
To suggest an additional feature for future versions, please contact:
[email protected]
For other questions, please email
[email protected]
or browse our web site,
www.solidtech.com
ix
The web site will also have the most up-to-date contact information if any information has
changed.
x
1
Getting Started with your Solid Database
Engine
This chapter describes the underlying components and processes that make Solid Database
Engine the solution to managing distributed data in today’s complex distributed system envi-
ronments. It provides you with the background necessary to administer and maintain Solid
Database Engine in your network environment.
Client-Server Model
Solid supports the client-server model. The database server responds to queries from one or
more clients, each of which is a separate process. Those clients may be on the same com-
puter as the Solid database engine, or they may be on separate computers. The clients and
server use a communication protocol (such as TCP/IP) to send queries and data back and
forth. The Administrator Guide has more information about which communications proto-
cols are available.
To submit a query (an SQL statement) to a database server, a client must be able to commu-
nicate with that database server. Solid, like many other database servers, uses "drivers" to
enable this communication. Client applications call functions in the driver, and the driver
then handles the communications and other details with the server. For example, you might
write a C program that calls functions in the ODBC(Open DataBase Connectivity) driver, or
you might write a Java program that calls functions in the JDBC (Java DataBase Connectiv-
ity) driver.
For more information about the ODBC and JDBC drivers, and how to use them with your
client applications, see the Solid Programmer Guide.
Submitting A Query
There are multiple possible ways to submit a query:
■ "Raw SQL"
■ A database connectivity API
■ Solid’s proprietary SA API
Raw SQL
Raw SQL can be sent to the computer by using a utility program that merely sends the SQL
and then retrieves and displays the data. Solid provides a utility called "solsql" that allows
you to interactively type in SQL commands and send them to the server. It is also possible to
run a script, which is a series of SQL commands, without human interaction. The solsql util-
ity is documented in the Administrator Guide.
Many of these samples are written in C or Java and use the ODBC or JDBC drivers. You
may want to use these programs and their "make" files as models for your own work.
Summary
You typically use raw SQL when you don’t expect to re-use the query, and when you don’t
need to do any processing other than displaying the results. You typically use a C or Java
program and a database connectivity API when you expect to re-use the query, or when you
need to do additional work with the results.
For example, if you have a report that must be run every week, you will probably write a
program to do the query and display the results. Similarly, if you have 100 customer-service
representatives who all run the same query(s), or if you have 500 network line cards that all
need to do the same type of work, then you will probably write a program. On the other
hand, if you have a one-time question that needs to be answered now, and if the format of
the output can be simple, then you may simply run a raw SQL query.
Raw SQL is also very convenient when learning SQL, because you can compose and exe-
cute a query and see the results almost immediately without going through the compile/link/
execute process.
Standards Compliance
Solid conforms to the SQL-92 Entry-Level standard, along with several Intermediate-Level
enhancements. Solid supports Unicode for international character sets.
Solid also has its own proprietary extensions, which are discussed in the SQL Guide and in
other manuals. These extensions provide higher performance, higher availability, and tools
for distributing data among multiple servers.
Solid supports multiple application programming interfaces, including ODBC and JDBC.
These allow a client program to exchange data with the server.
■ ODBC 3.51 compliant driver
■ JDBC 2.0 compliant driver, type 4, with 100% Pure Java™ certification
■ Direct C-language table access. Client programs may communicate with the Solid
server using Solid’s own prioprietary API. This allows faster access for some opera-
tions and also provides some control over the server’s own internal operations, such as
prioritizing tasks.
Special Features
Solid Database Engine has synchronization features that allow updated data in one Solid
Database Engine to be sent to one or more other Solid Database Engines.
Solid High Availability product (also called "HotStandby" or "CarrierGrade Edition") allows
you to run a pair of Solid Database Engines in a hot standby configuration
Solid’s AcceleratorLib allows you to link your client application directly to the database
server routines for higher performance and tighter control over the server.
Note that all features are compatible with each other; you may purchase any combination of
features that you want.
Higher Performance
The Solid Database Engine AcceleratorLib is designed especially for local high perfor-
mance data access. It improves performance by eliminating the overhead of the network pro-
tocol between a client and server that run on the same computer.
The AcceleratorLib is implemented as a linkable Solid Database Engine library. You write
and compile your program, then link it with the AcceleratorLib library file. The resulting
program starts execution with the main() routine of your code, which allows your applica-
tion to call one of AcceleratorLib’s own Control API functions to start the server.
In multi-threaded AcceleratorLib implementations, the server and your application operate
on different threads. The server becomes semi-autonomous, able not only to respond to input
requests from your application (via function calls) but also to remote applications that con-
nect through the usual communication protocols (such as TCP/IP). On a multi-processor sys-
tem, parts of your application and parts of the operating system may be executing (on
separate threads) simultaneously.
Tighter Control
The AcceleratorLib library includes an additional API (Solid Server Control API, or SSC
API), which allows the local client greater control over the server. This API allows you to do
things such as set the priority of the local client vs. remote clients.
Diskless Operation
The Solid Database Engine can operate without a disk drive. This is particularly useful in
some embedded systems. The AcceleratorLib library includes a function call to start a "disk-
less" server. Such a server stores all the tables, including the database server’s own system
tables, in memory. A diskless server also does not write data files, log files, or any other files
to a disk drive. Not surprisingly, if data is stored only in memory and not on disk, that data
may be lost during a power failure or other abnormal computer shutdown. If you want to use
a diskless server, you should either copy data to another server (by using Solid’s SmartFlow
(tm) option) or store only non-critical data in your diskless server.
For more information about the AcceleratorLib , read the Solid AcceleratorLib User
Guide.
SmartFlow
Solid has unique proprietary technology that allows you to synchronize data across multiple
servers. This technology is based on a master/replica relationship. One server has a "master"
copy of the data, and one or more "replica" servers may contain copies of all of that data or a
subset of that data. Solid’s synchronization capability allows large numbers of replicas to
exist and to be updated independently. Solid allows bi-directional synchronization; replicas
may send updated data to the master, and the master may send updated data to the replicas.
Either the master or the replica may initiate updates of data in the replica.
Each server (master and replica) is a complete, independent server that can operate with or
without the other server(s). Thus the synchronization feature allows you not only to make
sure that all replicas are up to date, but also to make sure that your entire system does not
depend upon a single master server. This gives your system more robustness. To make your
system even more robust, you may use Solid’s CarrierGrade option.
In-Memory Tables
Solid’s BoostEngine gives you the option of storing some or all tables in memory. This
allows you to maximize performance without being limited by the total amount of memory
in your system. In-memory tables are stored on disk when the server is shut down, so the
data will persist beyond the current session.
For more information about in-memory tables, see the Solid In-MemoryDatabase Guide.
Software
The Solid Development Kit contains a complete set of Solid Database Engine software,
including the AcceleratorLib linkable library, and various "utility" programs.
Samples
The SDK comes with several sample programs written in C, SQL, and Java to help you get
started using the features in your Solid Database Engine.
Documentation
For a description of the manuals that come with Solid, see
“Solid Documentation” on page -vii.
What Next?
If you have not already read the release notes (releasenotes.txt file) in the Solid
Development Kit, you should read that first.
If you are not already very familiar with relational databases and the SQL programming lan-
guage, we recommend that you read at least the first two chapters of the Solid Database
Engine SQL Guide. These chapters give you an overview of basic relational database con-
cepts, such as tables, and also give you an introduction to the SQL commands that do basic
operations, such as inserting data, updating data, and selecting data.
We recommend that you read the first 3-5 chapters of the Solid Database Engine Adminis-
trator’s Guide. This will help you configure, start, and maintain your database server.
We recommend that try one of the sample programs provided with the Solid Development
Kit.
After you’ve read the Administrator’s Guide, you may want to read the Guides that apply to
any specific options that you plan to use:
■ In-Memory Database Guide
■ High Availability Guide
■ AcceleratorLib Guide
■ SmartFlow Data Synchronization Guide
Most users will probably want to read the parts of the Programmer Guide that are relevant to
them. If you will be writing client programs that query the server, you will need to read at
least part of this manual.
This glossary gives you a description of the terminology used in this guide.
Client/server computing
Client/server computing divides a large piece of software into modules that need not all be
executed within the same memory space nor on the same processor. The calling module
becomes the ‘client’ that requests services, and the called module becomes the ‘server’ that
provides services. Client and server processes exchange information by sending messages
through a computer network. They may run on different hardware and software platforms as
appropriate for their special functions.
Two basic client/server architecture types are called two-tier and three-tier application archi-
tectures.
Communication protocol
A communication protocol is a set of rules and conventions used in the communication
between servers and clients. The server and client have to use the same communication pro-
tocol in order to establish a connection. TCP/IP is an example of a common communication
protocol.
Glossary-1
Database administrator
The database administrator is a person responsible for tasks such as:
■ managing users, tables, and indices
■ backing up data
■ allocating disk space for the database files
Database procedures
See stored procedures.
Index
An index of records has an entry for each key field (for example, employee name, identifica-
tion number, etc.) and the location of the record. Indexes are used to speed up access to
tables. The database engine uses indexes to access the rows in a table directly. Without
indexes, the engine would have to search the whole contents of a table to find the desired
row. A single table can have more than one index; however, adding indexes does slow down
write operations, such as inserts, deletes, and updates on that table. There are two kinds of
indexes: non unique indexes and unique indexes. A unique index is an index where all key
values are unique.
Optimizer Hints
Optimizer hints (which are an extension of SQL) are directives specified through embedded
pseudo comments within query statements. The Optimizer detects these directives or hints
and bases its query execution plan accordingly. Optimizer hints allow applications to be opti-
mized under various conditions to the data, query type, and the database. They not only pro-
vide solutions to performance problems occasionally encountered with queries, but shift
control of response times from the system to the user.
Stored procedures
Stored procedures allow programmers to split the application logic between the client and
the server. These procedures are stored in the database, and they accept parameters in the
activation call from the client application. This arrangement is used by intelligent transac-
tions that are implemented with calls to stored procedures.
Triggers
Triggers are pieces of logic that a Solid server automatically executes when a user attempts
to change the data in a table. When a user modifies data within the table, the trigger that cor-
responds to the command (such as insert, delete, or update) is activated.
Glossary-3
Glossary-4 Solid Database Engine Getting Started Guide
Index
A High Availability (HotStandby), 1-6
AcceleratorLib
described, 1-5 S
API, Glossary-1 SQL
Application Programming Interface, Glossary-1 see Structured Query Language, Glossary-3
Stored procedures, Glossary-3
C
Communication protocol, Glossary-1 T
Triggers, Glossary-3
D
Database Management System (DBMS)
defined, Glossary-2
DBMS, Glossary-2
Documentation
electronic, i-vii
H
High Availability (HotStandby) option
described, 1-6
hints
optimizer, Glossary-2
HotStandby
See High Availability, 1-6
I
Index, Glossary-2
O
ODBC, Glossary-2
Open Database Connectivity, Glossary-2
optimizer hints, Glossary-2
options
Index-1
Index-2 Solid Database Engine Getting Started Guide