Web Based Agriculture Information System


Published on

O N N Fernando, G N Wikramanayake (1998) "Web Based Agriculture Information System" In: Conference, Exhibition and Business Directory of 1st International Information Technology Conference, p. 36. Infotel Lanka Society, Colombo, Sri Lanka: IITC Oct 7-8

Published in: Education
  • Be the first to comment

No Downloads
Total views
On SlideShare
From Embeds
Number of Embeds
Embeds 0
No embeds

No notes for slide

Web Based Agriculture Information System

  1. 1. Web Based Agriculture Information System O.N.N. Fernando and G.N. Wikramanayake Department of Statistics and Computer Science, University of Colombo. E-mail: f.owen@mailexcite.com and gihanw@cmb.ac.lk 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 main feature of this information system is the availability of agricultural information on Sri Lanka to various users through the Internet. The information that can be made available through such an information system includes the crops and inter- crops, their production and export details, crop and inter-crop diseases, land availability, soil suitability, fertiliser, research institutes and researches. Most of this information is in the form of statistical data and facts about these crops and products made out of them. These information will be made available to this information system through respective institutes in Sri Lanka, namely: Rubber Research Institute, Agalawatta; Tea Research Institute, Thalawakale; Coconut Research Institute, Lunuwila; and Rice Research Institute, Gannoruwa. Currently, this system is a prototype at the University of Colombo, which will eventually be maintained by authorised users of these institutes. 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.
  2. 2. 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. Nowadays, the information technology on the Internet performs commanding roles [BAR95] and hence, people do not have to rely on books and reports, which are usually hard to find and access. Also published information in books and reports often fail to reflect the current status, which is essential in a competitive world. This situation can be addressed by maintaining an agricultural information system and making that information available on the Internet [KRO95]. This will help researchers, investors, planters, importers and exporters. Such systems are already used in some countries [CGIAR, RWa, RWb]. This paper describes the design and development of an agricultural information system for the four main crops in Sri Lanka, namely: tea, rubber, coconut and rice. Access to this system is provided through the Internet. The users will be able to view the required information as tables or graphs. 1.1 Benefits of the System 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.
  3. 3. 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 Our objective is to introduce an agricultural information system on the Internet so that it will eventually allow potential users to query and obtain the desired information. The data of this system is to be stored using a central database and maintained by the main research institutes. System is to be portable as the computer system that maintains this data may change from time to time. 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. Since the database will require updating by non-computing proficient personals at respective research institutes, the system provides easy access to the database for all types of data manipulation. Security of the database is ensured by the use of a password for updating purposes, which will be given to the main research institutes. The Information System provides the external user the ability to obtain summarised information in a preferred format. This can be production for certain crop types for any given years or achievements by researchers during resent past with their results.
  4. 4. 2.1 World Wide Web 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 HTML is a document layout and hyperlink specification language. It defines the syntax and placement of special, embedded directions that aren’t displayed by the browser, but tell it how to display the contents of the document, including text, graphics, and other support media. The language also specifies how to make a document interactive through special hypertext links. 2.3 Java Java [DEI97, JEP97, LAU96] is an object-oriented language. It allows the user to write robust and reliable programs, build applications that will run on any platform without recompiling your code and distribute applications over a network in a secure fashion. 2.4 Java Applets 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
  5. 5. 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. 2.5 Oracle Database Oracle is the most widely used Relational Database Management System (RDBMS) [ELM94] in the world. Oracle Corporation [ORA] offers Oracle RDBMS as its core product in its product line, which also includes a forth-generation application development tool set, reporting tools and utilities. A relational database is simply defined as a data model that is strictly viewed by its users as tables. A table is a two dimensional matrix composed of rows and columns. At any time when the data is changed in the Oracle database, it is the table or the data therein that is changed. Finally, the result of a query is presented to the user in the table format. The Structure Query Languages (SQL) [EME89] is the query language of this database. The Oracle database will be run on the server side. 2.6 JDBC Thin Driver Traditional application programs connect to a database using an Open DataBase Connectivity (ODBC) driver [JETC97, MSHP]. Java application programs use Java DataBase Connectivity (JDBC) drivers for this purpose [JTHP]. Oracle thin driver is a Type 4 driver that uses Java sockets to connect directly to Oracle [ORA]. It provides its own implementation of a TCP/IP version of Oracle’s SQL*Net. This driver is platform- independent as it is written entirely in Java. 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.
  6. 6. 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 Identifying the main entities, their attributes, relationships and constraints, commences the design of a database application. The entities of an agricultural information system represent different information on crops. This include crops and inter- crops, production and export, crop and inter-crop diseases, land availability, soil suitability, fertiliser, research institutes and researches [CEN96, TIL96]. These entities are inter-related by crop, product or institute. The full details are available in [FER98]. Characteristics of some of the entities are given in table 1. The table and attribute names used for these entities and their characteristics are given within brackets in italics font style. 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
  7. 7. 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). Figure 1: Home Page of the Agricultural Information System Figure 2: Information Page on Rubber
  8. 8. 4.1 Information Retrieval 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). Figure 3: Retrieval Information on Rubber Research Query = "SELECT Research_Des, Achievements, Output, Year FROM Institute_Description i, Research_Type_Description r, Research_Description d WHERE i.Institute_No = r.Institute_No and r.Research_Type_No = d.Research_Type_No and i.Location = '"+location+"' and r.Research_Type = '"+research_type+"' and Year = '"+year+"' "; Figure 4: An SQL Information Retrieval Query Statement of the System 4.2 Information Updating 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.
  9. 9. 4.3 Current Status Currently, this system is a prototype located at the University of Colombo as it was developed as a part fulfilment of a degree program. This prototype runs its web server the database on Windows NT. Some database maintenance tasks (e.g. deleting data) of the system are done at the server machine and not through a web browser. Ultimate objective is to allow such tasks to be performed remotely by authorised personnel of the research institutes. Figure 5: Username and Password Access for Authorised Updates Query = "INSERT INTO Research_Description (Research_Type_No, Research_Des, Achivements, Output, Year) VALUES(?,?,?,?,?)"; Figure 6: An Update SQL Query Statement of the System 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.
  10. 10. 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 We acknowledge the support and information provided to us by the four institutes. Special references to Dr. Janakee Eswara of Rice Research Institute and Dr. Karnika De Silva of Rubber Research Institute. 7. REFERENCES [AGR96] Agrotechnical Information, "Crop Specialization for Sri Lanka: 1997-2000", Department of Agriculture, Ministry of Agriculture, Lands and Forestry, 1996. [BAR95] Barron B., Ellsworth J.H. and Saretz K.M., "Internet", Sams. Net Publishing, 1995. [BUR96] Burleson D.K., "Oracle Database Applications", Coriolis Groups, 1996. [CEN96] Central Bank of Sri Lanka, "Annual Report", 1996. [CGIAR] Consultative Group on International Agricultural Research (CGIAR) Home Page, http://www.irri.org. [DEI97] Deitel H.M. and Deitel P.J, “Java How to Program”, Prentice-Hall, 1997. [ELM94] Elmasri R. and Navathe S.B., “Fundamentals of Database Systems”, 2nd edition, Benjamin/Cummings, 1994. [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. [JDBC97] JDBC Documentation, Oracle Corporation, 1997 in [ORA]. [JEP97] Jepson B., "JAVA database programming", John Wiley & Sons, 1997.
  11. 11. [JETC97] Jet Connect JDBC-ODBC driver Documentation, XDB Systems Inc., 1997 [JTHP] Java Technology Home Page, http://www.javasoft.com. [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. [LSP] Lanka Super Pages - The Ultimate Business Connection, http://www.lsplk.com. [MAT98] Matthews M.S. and Poulsen E.B., "Frontpage 98: The Complete Reference", Osborne McGraw-Hill, 1998. [MSHP] Microsoft Home Page, http://www.microsoft.com. [ORA] Oracle Home Page, http://www.oracle.com, Oracle Corporation. [RWa] Rice Web Home Page - World’s longest running cereals, http://www.riceweb.org, International Rice Research Institute, Philippians. [RWb] Rice World Home Page - Museum dedicated to rice, http://www.riceworld.org, International Rice Research Institute, Philippians. [TIL96] Tillekeratne L.M.K. and Yogaratnam N. (editors), "Annual Review", Rubber Research Institute of Sri Lanka, 1996. [TOM96] Tommie L., “Essential Oracle 7”, Prentice-Hall, 1996. [TUR95] Turligton S.R., "Walking the World Wide Web", Ventana, 1995.