Documenti di Didattica
Documenti di Professioni
Documenti di Cultura
ABSTRACT
Some countries use agricultural information systems to assist different users such
as planters, researchers, prospective investors, importers and exporters. Sri Lanka
despite having an agricultural based economy does not have an information system of
this nature. This paper describes the design and development of a web based agricultural
information system for the main crops of Sri Lanka.
The front-end of this system use Java applets for its graphical user interfaces,
while the back-end uses an Oracle database to manage its data. The front-end and back-
end of this system is connected using an Oracle thin driver. The data retrieval and update
of this system is done using embedded SQL queries.
1. INTRODUCTION
Sri Lanka is an agricultural country and its main exports include tea, rubber and
coconut [CEN96]. Rice is also an important crop in Sri Lanka because it is the main food
consumed by Sri Lankans [AGR96]. However, Sri Lanka does not have an accessible
agricultural information system on its main crops for the potential users. As a result, the
scope of promoting agricultural activities is limited.
The four main research institutes of Sri Lanka, namely: Rubber Research Institute,
Agalawatta; Tea Research Institute, Thalawakale; Coconut Research Institute, Lunuwila;
and Rice Research Institute, Gannoruwa maintains various forms of agricultural
information and make them accessible to potential users in the forms of periodical reports
and books. This information usually contains standard summarised data of the recent past
but fails to cater special interest groups and other research institutes seeking for current
data. For instance, researches in this field find it difficult to identify the on going research
programmes for crops, as such data is not documented. An information system of this
type will help to resolve these problems and make whatever information maintained more
valuable.
In Sri Lanka there are several companies which manufacture several products from
tea, rubber, coconut and rice. Several web sites in the Internet [LSP] provides information
about these companies. However, agricultural information on crops and inter-crops, their
production and export details, crop and inter-crop diseases, land availability, soil
suitability, fertiliser, research institutes and researches are not yet available on the
Internet. Our web based agricultural information system is an attempt to address this
issue.
1.2 Objectives
2. METHOD
The software for the development of this agricultural information system was
decided based on the above objectives. As a result, Java [DEI97, JEP97, LAU96] was
chosen to create the front-end for the system and Oracle [BUR96, TOM96] for the back-
end database. The graphical user interfaces of the front-end to use Java applets [JTHP]
and accesses the back-end Oracle database using embedded SQL queries [BUR96,
EME89] for retrieval and update. The front-end and back-end to be connected using an
Oracle thin driver [JDBC97, ORA]. The information of the system is viewed using a web
browser [TUR95]. This information is to be presented as hypertext documents [HES95,
MAT98] containing Java applets.
The World Wide Web (WWW) [BAR95, KRO95, TUR95] is a huge collection of
interconnected hypertext documents on the Internet. A hypertext document contains hot
links to other documents. Hypertext links are usually visible as highlighted words in the
text. Graphics, video clips, sound can also be part of these documents. Clicking on them
with a mouse activates links. There are many thousands of hypertext authors on the
Internet and anyone can connect to them. There is no beginning or end when connecting
to web documents. However, groups of associated pages are usually structured
hierarchically.
The WWW is based on two standards: The HyperText Transport Protocol (HTTP)
and the HyperText Mark-up Language (HTML). HTTP describes the way that hyper text
documents are fetched over the Internet. HTML specifies the layout and linking
commands present in the hypertext documents. Resources on the web are specified with a
Uniform Resource Locator (URL). A URL specifies the protocol used to fetch a
document as well as its location.
2.2 HTML
2.3 Java
Java applets are programs written in Java and included in HTML pages. An applet
is automatically downloaded from a web site and run within the web browser when an
instruction to do so is contained within the web page you are viewing. Applets on a web
page are modelled in the way as images (e.g. GIF) are displayed on a web page [LAU96].
There are few browsers that support Java applets (e.g. HotJava, Netscape 2.0, and
Internet Explorer 3.0). When an applet is placed on a web page, it is given a display area
on the page. This display area belongs to the applet, and the content of it is controlled by
the applet. Some applets use this area to present animation while others use it to display
information taken from a database or to allow the user to select items from a list.
The thin driver does not require Oracle software for the client side. It connects to
any Oracle database of version 7.2 and higher. The client needs only a Java enables
browser. The driver requires a TCP/IP listener on the server side.
Prior to accessing the data from the database, each Java applet import the JDBC
classes, register the JDBC driver and establish the connectivity with the database.
3. DESIGN
Entity Characteristics
Crops Specialisation Name of the crop (Crop_Name)
(Crops_Specialisation) Unique code of the crop (Crop_No)
Product Specialisation Code of the crop (Crop_No)
(Product_Specialisation) Name of the product (Product_Name)
Unique code given to a product (Product_No)
Production Code of a product (Product_No)
(Production) Quantity produced (Quantity)
Year of production (Year)
Unit cost of the Production (Cost_of_Production)
Institute Description Unique code given to a crop (Crop_No)
(Institute_Description) Unique code given to a institute (Institute_No)
Name of institute (Name_of_Institute)
Location of the institute (Location)
Research Type Description Unique code given to a institute (Institute_No)
(Research_Type_Description) Description of research type (Research_Type)
Unique code given to a research type
(Research_Type_No)
Research Description Unique code given to a research type
(Research_Description) (Research_Type_No)
Description of research (Research_Des)
Achievements of research (Achievements)
Annual output of the research (Output)
Year of the research (Year)
Table 1: Selected Entity / Characteristics of an Agricultural Information System
4. IMPLEMENTATION
The set of tables is created using the relational database for the identified entities
at the design stage. The uniqueness of the data fields in these tables are established using
primary keys, while the relationships are maintained using foreign keys [ELM94,
FER98].
The web pages of this information system will guide the use and operation of this
system. Figure 1 illustrates the home page for our agricultural information system.
Respective crop information is chosen through a hyperlink of this page. For instance
information on research done on rubber by institutes can be viewed through respective
the hyperlinks for Rubber and Rubber Institutes (cf. figures 1 and 2).
Making queries for information retrieval can be done in different ways. These are
specified using appropriate dialog and list boxes (cf. figure 3). Required query statements
are constructed by the Java applets and the users need not be aware of them. Figure 4
describe an information retrieval statement issued for the query of figure 3. Here list
options chosen are passed to the query statement using variables of the Java applets.
These variables are shown in italic font style and are always enclosed using +, " and '
symbols (see figure 4).
Authorise persons can update the database by specifying the username and
password (cf. figure 5) through the web browser. As in the data retrieval case, the update
statements are included in the Java applets and the authorised person does not need to
know how such a query (e.g. figure 6) is made using SQL.
4.3 Current Status
Graphical summaries in the form of bar charts, histograms and line graphs needs
to be added to compare the numerical data. Such graphical representation can be
dynamically produced in a similar manner to presenting data in tables [LAU96, TUR95].
Java applets (e.g. BarChart) is available to do such tasks.
Actual operations of the system cannot be pursued until a server is set-up and
maintained by appropriate institutes. All the major research institutes should be provided
with Internet access to make this project a reality.
5. CONCLUSION
This work is an initial step to show that the creation this kind of information
system is feasible. The real benefits of this type of information system to agricultural
based country such as Sri Lanka can be seen when it become operational, as planters,
importers, exporters and researchers will have access to up-to-date information.
6. ACKNOWLEDGMENT
7. REFERENCES
[BAR95] Barron B., Ellsworth J.H. and Saretz K.M., "Internet", Sams. Net Publishing,
1995.
[DEI97] Deitel H.M. and Deitel P.J, “Java How to Program”, Prentice-Hall, 1997.
[EME89] Emerson S.L., Darnovsky M. and Bowman J.S., "The Practical SQL",
Addison-Wesley, 1989.
[FER98] Fernando O.N.N., “Agricultural Information system for the World Wide
Web”, B.Sc. dissertation, University of Colombo, Colombo, Sri Lanka, 1998.
[HES95] Heslop B. and Budnick L., "HTML Publishing on the Internet", Ventana,
1995.
[JEP97] Jepson B., "JAVA database programming", John Wiley & Sons, 1997.
[JETC97] Jet Connect JDBC-ODBC driver Documentation, XDB Systems Inc., 1997
[KRO95] Krol E.D. and Ferguson P., "The Whole Internet", O'Reilly & Associates,
1995.
[LAU96] Vanhelsuwe L., Phillips I., Hsu G.T., Sanker K., Ries E., Rohaly T. and
Zukowski J., “Mastering Java”, BPB Publications, 1996.
[MAT98] Matthews M.S. and Poulsen E.B., "Frontpage 98: The Complete Reference",
Osborne McGraw-Hill, 1998.
[TUR95] Turligton S.R., "Walking the World Wide Web", Ventana, 1995.