You are on page 1of 9

SOKOINE UNIVERSITY OF AGRICULTURE

COLLAGE OF NATURAL AND APPLIED SCIENCE (CoNAS)

DEPARTMENT OF INFORMATICS AND INFORMATION TECHNOLOGY (DIIT)

BACHELOR OF SCIENCE IN INFORMATICS

COURSE NAME: DATABASE DESIGN AND IMPLEMENTATION


COURSE CODE: INF 302
INSTRUCTOR’S NAME: Dr. MAHENGE (PhD)
STUDENTS’ DETAILS
NO STUDENT NAME REG NUMBER SIGNATURE

1 VEDASTO VICTOR INF/E/2019/0013

2 GASTON ELIYA EIM/D/2019/0032


3 SHADRACK ABELY MWANG’ONDA INF/D/2019/0008

DATE: November 2021


CROP DISEASE TRACKING DATABASE DEVELOPMENT PHASES.
The economies of many developing countries are dominated by an agricultural sector in which
small-scale and subsistence farmers are responsible for most production, utilizing relatively low
levels of agricultural technology. As a result, disease among staple crops presents a serious risk,
with the potential for devastating consequences. It is therefore critical to monitor the spread of
crop disease, allowing targeted interventions and foreknowledge of famine risk therefore
Information about crop disease is vital in developing countries, and as a result the governments
of such countries should devote scarce resources to gathering such data and storing of such data.
In this work we are going to develop and design a database which is going to store sufficient
quantities of data.

Database application development is the process of obtaining real-world requirements, analyzing


requirements, designing the data and functions of the system, and then implementing the
operations in the system.

During development of crop disease tracking database five steps were adhered I.e. The Database
Development Life Cycle (DBLC) which contains five phases, as:

❖ Planning phase
❖ Analysis phase
❖ Design phase
❖ Implementation phase
❖ Maintenance phase

Consider the diagram below showing the database development phases.


Planning phase

This was the first step that we performed while developing database for tracking crop disease as
in our group which consisted of three where by we examined the current system’s operation of
crop disease tracking and determine how to address and improve the current database system.
The overall result of the planning phase is as follows:

❖ To defining objectives of our database as through our objective we plan how to meet and
them and in our group we planned to track the crop disease with their pesticide.

❖ To define problems and constraints after setting the objective of our database the problem
defines has a lot constraint which are further discussed in the requirement and analysis
stage.

❖ To we planned the scope and boundaries of the database system.

Analysis phase

In this step we gathered and analyzed all the requirements to what data we wanted to store along
with the meaning and interpretation of the data elements. Furthermore, we analyzed issues that
comes with administrator such as legal and ethical issues which impact the data requirements.
Here describe what are the data items are, what attributes they have, what constraints apply and
the relationships that hold between the data items. And in our case of crop disease tracking the
following is the result of analysis stage which enabled us to get the required tables and their
attributes such as follows

Disease table.

The disease table is supposed to store the name of the disease its description which is referred to
other tables such as plant, pest, pesticide and symptom.
Disease (disease_id, d_name, disease_description, primary key(disease_id) )

Plant table.

The plant table is supposed to store the name of the plant its image which is linked to other tables
such as disease.

Plant (plant_id, Plant_name, plant_image, primary key(plant_id) )

Pest table.

The pest table is supposed to store the name of the pest and is linked to other tables such as
disease.

Pest (pest_id, Pest_name, primary key (pest_id))

Pesticide table.

The pesticide table is supposed to store the name of the pesticide which is going to cure the plant
disease and is linked to other tables such as disease.

Pesticide (pesticide_id, pesticide_name, primary key(pesticide_id)

Symptoms table

This table is supposed to store the symptoms of the disease of the particular plant and is linked to
other table such as disease table.

Symptoms (symptom_id, symptom, primary key(symptom_id)

Logical Design phase.

Database design starts with a conceptual data model and produces a specification of a logical
schema. The information that we developed during analysis are used to design a conceptual
schema for the database and to design application. It is an important phase of the phases in
database development process. This is arguably the most critical DBLC phase making sure that
the final product meets user and system requirements and as per figure below the logical design
of the database is as follows
Implementation and Loading:

The output of the database design phase is a series of instructions detailing the creation of tables,
attributes, domains, views, indexes, security constraints, and storage and performance guidelines.
In this phase, you actually implement all these design specifications.

a. Install the DBMS:

This is the first step that we performed under implementation when we installed the DBMS
necessary for the system. The DBMS which we installed is mysql with its utilities such ass
mysql workbench may be installed on a new server or it may be installed on existing servers.
One current trend is called virtualization. Consider the image below.
b. Create the Database

One way to achieve this is to write the appropriate SQL DDL statements into a file that can be
executed by a DBMS so that there is an independent record, a text file, of the SQL statements
defining the database. For our case we used the following SQL script as per image below.
Sql command used in creating databases and its respective tables.

The above screenshot shows some of the SQL DDL commands but full code for the creation of
database and its table is attached in the folder.

c. Populating the database.

Inserting into disease table.

INSERT INTO disease VALUES (1,'antrancose','A disease for sterm'),(2,'ahsh yellows','A


disease for leaf'),(3,'bacterial wetwood','A disease for fruits'),(4,'cane blight','A disease for
flowers'),(5,'red thread','drying of leaf');

See the result below.

Inserting into Symptom table.

INSERT INTO symptoms VALUES (1,'dryness'), (2,'cracking'), (3,'redishcolor'), (4,'rotting'),


(5,'greying');
See the result below.

All the tables were inserted using the same SQL command see the full SQL inserting code in the
folder.

Therefore, after performing all the above steps a following database schema with the following
relationship was obtained.

You might also like