Chemistry Reference
In-Depth Information
computed identically for identical molecules. Putting that functionality
into the RDBMS itself and making it accessible through SQL is the best
way to do this.
Only transfer data the user needs to see. There is always a need to
transfer some data to and from the server. When a user enters data from a
file or other source, it must be transferred to the database server in order
to be inserted into the database. Similarly, when a user needs to see data
values or a structural depiction, it must be transferred to the client appli-
cation. However, if the data only needs to be processed by the client and
then transferred back to the server, be sure to transfer only required col-
umns. Also consider again writing a server function to process the data
as required.
Make good use of existing client programs and libraries. There are
many client programs that may already do what is required. Some exam-
ples of these were given in Chapter 5. There are also many client programs
or libraries that may help in developing client applications using SQL to
access the RDBMS. A discussion of these libraries for various languages
follows. There is no inherent advantage to using any particular computer
language to write a client program. If a particular project already has parts
written in one language, it is probably best to continue new code develop-
ment in that language. But if one language has features desirable for the
application, that language may be the best choice. For example, many peo-
ple prefer php for writing Web client applications that are run using CGI.
If more interaction is necessary in the Web application, consider using a
java applet. When the crucial parts (the data tables and functions) of the
system are stored in a central location (the RDBMS), it becomes less impor-
tant which language is used for client applications.
12.2 Store All Possible Data in the RDBMS
Before looking at specific examples of client programs, consider how and
where data are typically stored and processed. Most computer data are
stored in files. These are sometimes called flat files. This implies that there
is no imposed structure in the files. The programs accessing the data infer
any structure. On the other hand, data stored in an RDBMS table is highly
structured. This requires some thought before the data is inserted into
the table, but the benefit of structuring the data is great. When new data
is received, it is likely to be in the form of a file, perhaps an e-mail attach-
ment, a spreadsheet file, a CD, or download from a Web site. It is tempting
(and common) to store these file on the computer and to process data in
these files directly. It is much more advantageous if the data is put into an
RDBMS as soon as possible. Consider the following scenario.
A colleague or coworker has just sent a file of molecular structures.
They may need some feedback about which structures are desirable for
Search WWH ::




Custom Search