Chemistry Reference
In-Depth Information
A client program communicates with the RDBMS server using a TCP
port. The details of that communication are not important for the pur-
poses of this topic. Various client program libraries handle those details.
The advantage of using a client program is that any number of client
computers can be used to spread the workload. The disadvantage is that
data from the server must be delivered to and from the client computers,
resulting in some inefficiency.
As with any client/server architecture, the efficiency concerns are not
easy to accurately predict. Consider a simple example where one wishes
to find all data values less than 1.0. A simple SQL command would accom-
plish this, but would run on the server. Only the resulting subset of data
would be delivered to the client. Using an extreme approach, a client
would require the entire data set and then select the values less than 1.0.
Which approach is more efficient depends on many things: the size of
the data set, the size of the subset less than 1.0, the relative efficiencies
and loads of the server and client, and the speed and latency of the data
channel linking the server and client. For another operation that is more
complex than selecting values less that 1.0, the degree of complexity is an
important consideration. Clearly, there is no simple “one size fits all” solu-
tion to deciding whether to use a server or client program.
The standard way of sharing data between a client and an RDBMS
server is to use the SQL language. Many computer languages, such as
perl, python, java, and C have standard libraries or methods that use SQL
to read and write data to and from their internal data types and data struc-
tures. Many other computer programs, such as Excel, OpenOffice, and R
have SQL “hooks” to allow transfer of data to and from an RDBMS server.
This can be a great advantage when the computer client program already
provides most of what is required. For example, if the goal of a project
is to provide users with an Excel spreadsheet of data, why not use Excel
directly? If a project already uses a number of numerical analysis pro-
grams written in R, why not use R's ability to interface with the RDBMS?
If most of the programmers on a particular project are fluent in java, why
not use jdbc (a standard javan RDBMS interface)? Later chapters of this
topic present speciic examples of client programs that use SQL.
There is a smaller set of tools that are typically run on the server. Any
SQL commands and any procedural language functions are run on the
server. In principle, there is complete flexibility of the server side tools,
since in principle any computer program can be written in any computer
language. Later chapters of this topic show how the RDBMS server itself
can be extended using server side programming to handle chemical
information. These extensions may directly solve the needs of a particular
project, but more importantly they increase the flexibility of the RDBMS
to handle chemical information. Client programs can use the results of
chemical searches and other computations as well.
Search WWH ::




Custom Search