Implementation Of A Database To Mobile Devices Computer Science Essay

Published:

This essay has been submitted by a student. This is not an example of the work written by our professional essay writers.

For this chapter, all the implementation from the database to the mobile devices will be elaborated. All the setting up and all the steps need to do are explain briefly in this chapter. This will enable the all the development part to be clear and precise.

5-1 Implementation of the MySQL Database

In this chapter, we are implementing the whole project by setting up a MySQL database which is named phpMyAdmin (PMA). The administrator needs to register a valid free subdomain hosting on the Internet with the valid username and password. For example, the mfarm.orgfree.com was successfully activated on orgfree.com server. The address is http://mfarm.orgfree.com and we can visit or update the site. After we have hosted on orgfree.com server, Account Manager is located at http://orgfree.freewebhostingarea.com/. The database is set up by registering a free hosting on the Internet. Then, the administrator will be able to get a limited number of free databases per account registered. For a better view of the MySQL databases, the account manager must be activated by hitting a "Create DB" button. The MySQL host name is for "localhost" only and there are no external connections are allowed. The PMA is located at the URL which is registered.

In order to login to the database, login is required. A username and password are being requested by http://orgfree.freewebhostingarea.com. The site says: "phpMyAdmin localhost". The username and password for the database to login is the name of the database. For example, 378307 is the name of the database. The password is the password which is registered during the account registration. The authentication for database is shown in Figure 5-1-F1. In the database that we have created, we can add the table to store the data and let the user to retrieve. In the project, two tables are added which are node_data and users which is show in Figure 5-2-F2. After the node_data and users are created, click on the node_data or users to add in the structure. The structures are requiring the administrator input the field data which will be retrieved by the users. The Figure 5-1-F3 and Figure 5-1-F4 show the information store in database which belongs to users and node_data.

The Table 5-1-T1 and Table 5-1-T2 below are showing the structure of the database which is implemented for this project. In the Table 5-1-T1 and Table 5-1-T2, they are showing the field and the type used in developing the node_data table.

Field

Type

node_no

varchar(30)

node_date

date

node_time

time

node_light

varchar(30)

node_temperature

varchar(30)

node_water_level

varchar(30)

node_humidity

varchar(30)

node_disease

text

node_battery

float

node_status

text

node_advice

text

Table 5-1-T1: Node_data Database Structure

Field

Type

username

varchar(30)

password

varchar(30)

date

date

Table 5-1-T2: Users Database Structure

Figure 5-1-F1: The Authentication Required

Figure 5-1-F2: Database Table

Figure 5-1-F3: The Information stored in Database from Node_data

Figure 5-1-F4: The Information stored in Database from the Users

5-2 Implementation of the Web based FTP client

In the Web based FTP client, this is enable the admin to upload the file to the Internet which is located at http://orgfree.freewebhostingarea.com/ftp/. Only the admin can do the FTP login which is using to the server which is registered earlier which is called FTP server. For example, orgfree.com server is used. After enter the URL of the ftp, admin require entering the username and password which is the account that has been registered earlier. The authentication is show in Figure 5-2-F1. Once log in the FTP server, we are able to create a new directory, new file, upload file, edit file and select file. In this Web based FTP client, add in the PHP file which is login, numerical and graphical. These entire files are used to link the database and the mobile devices. The files are needed to select the database and the do the searching to match the data in the database. Login is requiring selecting from query which is from the users where name and username need to match. Numerical and graphical are requiring selecting from query which is from the node_data where node_no need to be match.

Figure 5-2-F1: Login for FTP Web Server

5-3 Implementation of the Whole M-Farm

In this part, we are implementing the whole network that we have design in the previous chapter. The system design, the functional of the system and the interface of the system will be discuss in the sub chapter as below. The purpose of the implementation if the whole network is to verify the project is fulfilling all the requirements, aims, and specification that have been mention in the previous chapter.

In order to implement M-Farm in the mobile device, we have installed a simulator which is named Wireless Toolkit 2.5.2 in the personal computer as testing for the M-Farm. The target platform used in this project will be JTWI, MIDP 2.1 and the CLDC is 1.1 and are shown in Figure 5-3-F1. Firstly, create a new project in the wireless toolkit which is name "Welcome_To_MFarm". Go to the directory where the Welcome_To_MFarm directory created, input a java file (contain the source code of the project) into the j2mewtk\2.5.2\apps\Welcome_To_MFarm\src directory. The images of the M-Farm are inserted into j2mewtk\2.5.2\apps\Welcome_To_MFarm\res. The jar files are used to test in the real mobile devices which are created in the j2mewtk\2.5.2\apps\Welcome_To_MFarm\bin directory after the admin create the package for that particular project in the Figure 5-3-F2.. M-Farm is tested in the Nokia 3120 classic V 06.20 by deploying the jar file into in the phone and it work as an application.

Figure 5-3-F1: API Selection

Figure 5-3-F2: Sun Javaâ„¢ Wireless Toolkit 2.5.2 for CLDC

5-4 System Design, Functional Testing and Evaluation

This part is displaying all the results of M-Farm with appropriate screenshots. The system interface designs are shown in the part below. The system will start from the launching to the program exit.

5-4-1 System Interface Design

The Figure 5-4-F1 shows the main program for farmer to launch.

Figure 5-4-F1: Main Program for User to Select and Launch

The Figure 5-4-2-F2 shows the main page of M-Farm system after launching.

Figure 5-4-F2: Main Page of the System (M-Farm)

The Figure 5-4-F3 shows the farmers login using the network username and password and the "Login" button is clicked.

Figure 5-4-F3: Main Page of the System for Farmers to Login

The Figure 5-4-F4 shows the farmers login network username and password incorrect.

Figure 5-4-F4: Page Prompt Out when Login Incorrect

The Figure 5-4-F5 shows the farmers need to login to airtime for connecting to the database for information and the "Yes" button is clicked.

Figure 5-4-F5: Connect to the Internet

The Figure 5-4-F6 shows the page to select the option for farm accessing either Numerical M-Farm, Graphical M-Farm, about and credits after the button "Yes" is clicked.

Figure 5-4-F6: Options Selection

The Figure 5-4-F7 shows the developer of the system and information after the button "Credits" is clicked.

Figure 5-4-F7: Developer Information

The Figure 5-4-F8 shows brief description and introduction to the system after the button "About" is clicked.

Figure 5-4-F8: Brief Introduction about M-Farm

The Figure 5-4-F9 shows enter the node number to the system after the button "Graphical M-Farm" is clicked.

Figure 5-4-F9: Graphical M-Farm Enter Node

The Figure 5-4-F10 shows the node number after enter to the system; the button "Submit" is clicked.

Figure 5-4-F10: Graphical M-Farm Node Entered

The Figure 5-4-F11 shows the result of Graphical M-Farm by the system after the button "Submit" is clicked.

Figure 5-4-F11: Result for Graphical M-Farm

The Figure 5-4-F12 shows enter the node number to the system after the button "Numerical M-Farm" is clicked.

Figure 5-4-F12: Numerical M-Farm Enter Node

The Figure 5-4-F13 shows the node number after enter to the system; the button "Submit" is clicked.

Figure 5-4-F13: Numerical M-Farm Node Entered

The Figure 5-4-F14 shows the result of Numerical M-Farm by the system after the button "Submit" is clicked.

Figure 5-4-F14: Result for Numerical M-Farm

5-5 System Implementation

5-5-1 Ways to use the "M-Farm"

M-Farm can have the network login for username and password and the options to select either Numerical M-Farm or the Graphical M-Farm. Then, the user is able to enter the node number to find out the farm condition.

5-5-2 Description of the System Process

The M-Farm has the options to select Numerical and Graphical in Table 5-2-T1 and Table 5-2-T2. The system needs the user to select on the given options in order to view the farm condition. The farm condition information can be view after the user input the node number for the node number. The information given as followed.

Numerical M-Farm Information Guidelines

Node: Node number of the sensor node deployed

Date: Current date of the farm when database is updated

Time: Current time of the farm when database is updated

Light: The brightness of the farm in lux

Temperature: The temperature of the farm in Celsius

Water Level: The water level of the farm in centimetre

Humidity: The current humidity percentage in the farm

Battery: The battery voltage level

Status: The farm condition

Advice: Action to take

Table 5-2-T1: Numerical M-Farm Information Guidelines

Graphical M-Farm Information Guidelines

Node: Node number of the sensor node deployed

Date: Current date of the farm when database is updated

Time: Current time of the farm when database is updated

Temperature: The temperature of the farm in Celsius

Water Level: The water level of the farm in centimetre

Status: The farm condition

Advice: Action to take

Image: The image of the farm by the camera

Battery Image: The image is showing the battery level

Table 5-2-T2: Graphical M-Farm Information Guidelines

5-6 Problems Encountered

During the implementation of the system, some problems were encountered. The following session outlines the issue encountered. They differ in degree of difficulty and significance.

5-6-1 M-Farm Design Issues

The first problem was due to the use of a few types of class combine together so that the program is not in independent part. Due to the complexity of the combination, the design needs to call the numerical class and graphical class into the main function. The program is link using the MIDlets main. The main program will control the other two classes. The layout is design according to the sequence of the output.

The issue was a challenge rather than a problem because it was overcome and moreover it had its benefits:

The layout will be arrange in sequence and in neat manner

It will give a better program connection for overall system

The design issue knowledge greatly helped to improve code generation of the java in mobile application and give a much better understanding about the control of the whole application.

5-6-2 Select the information from Database

Another problem encountered is the selection information from the database using the mobile program in java. The main program should enable user to retrieve the information. The data which retrieved from the database are call inside the mobile device using the PHP server. The data should split according to the space so that the information can arrange in sequence.

5-6-3 Refresh the Information after the Database Changes without Logout

The next problem encountered is the refresh of the information after the administrator make changes in the database. This can avoid the user to exit and log in again the system in order to get the latest information regarding the farm condition and the action to take.

5-6-4 Enable the Users to Enter Node

In order to enable the users to enter node number, the GUI for the enter node should be create after the Options Numerical and Graphical. This will enable the user to enter node to retrieve the information that user want to access.

5-7 Summary

The whole system network from the database to the mobile device is listed as above. All the details are mention in order to have a good testing about this project. The testing of system is needed to ensure the system properly functioning as per the screenshots demonstrated. There are some bugs in the program. For further use of the system, the program should have the administrator password for admin purpose. Username: admin and Password: admin.

Writing Services

Essay Writing
Service

Find out how the very best essay writing service can help you accomplish more and achieve higher marks today.

Assignment Writing Service

From complicated assignments to tricky tasks, our experts can tackle virtually any question thrown at them.

Dissertation Writing Service

A dissertation (also known as a thesis or research project) is probably the most important piece of work for any student! From full dissertations to individual chapters, we’re on hand to support you.

Coursework Writing Service

Our expert qualified writers can help you get your coursework right first time, every time.

Dissertation Proposal Service

The first step to completing a dissertation is to create a proposal that talks about what you wish to do. Our experts can design suitable methodologies - perfect to help you get started with a dissertation.

Report Writing
Service

Reports for any audience. Perfectly structured, professionally written, and tailored to suit your exact requirements.

Essay Skeleton Answer Service

If you’re just looking for some help to get started on an essay, our outline service provides you with a perfect essay plan.

Marking & Proofreading Service

Not sure if your work is hitting the mark? Struggling to get feedback from your lecturer? Our premium marking service was created just for you - get the feedback you deserve now.

Exam Revision
Service

Exams can be one of the most stressful experiences you’ll ever have! Revision is key, and we’re here to help. With custom created revision notes and exam answers, you’ll never feel underprepared again.