Postgresql Support for DBAgent - Computer Science and Computer ...

dinnerattentionΔιαχείριση Δεδομένων

28 Νοε 2012 (πριν από 4 χρόνια και 9 μήνες)

207 εμφανίσεις


Page
1



<add date here>


University of Arkansas


CSCE Department

RFID Agent Middleware



Final

Report



Summer

2006

Postgresql support

for DBAgent

Rachil Chandran

Abstract

RFID agent middleware or the Tagcentric application is an open source project
designed and implemented in
the computer science and computer engineering
department at the University of Arkansas. Postgresql

[1]

is a very popular open source
Relational Database Management System (RDBMS). The RFID middleware employs a
database to store agent and RFIS tag informati
on. The product currently supports Derby
embedded database, Oracle, DB2 and MySQL.


Problem

The DBAgent currently supports only two open source or free databases, Derby and
MySQL. However, it can be envisioned that the users of the open source RFID
middlew
are would be users that do not expect to pay large sums for acquiring and
maintaining costly commercial databases. Open source database would nicely
complement the RFID middleware. Hence, the addition of support for popular open
source databases like Postg
resql would augment to the appeal
of the RFID middleware
application to the open source oriented users.

Objective

The
objective

of this project

is to support Postgresql
8.1.4
database in the RFID
middleware.

Design

Requirements

Support Postgresql database
through the DBAgent.

Create a Java archive for the Postgresql JDBC driver (no commercial JAR files
available).

Resolve the SAXParseException encountered wile using Postgresql and MySQL (owing
to the quotes and ampersands in their URLs).

Implementation

Title (via View/HeaderFooter)


2

Cod
e for the Postgresql support was added to the Install2.java file. The Postgresql as
added to the combo box of databases and default port and driver were also added.
The
format of the JDBC URL for Postgresql was composed and hard coded into the Install2
fil
e. Since JAR file is not provided by Postgesql for it’s JDBC driver, a custom JAR file
was implemented and placed in the lib folder of the application.

Test Plan

The unit tests included configuring and connecting to a local Postgresql database and
employin
g fake readers
to run the application. The tables and data created were
checked using pgadminIII, an administration tool provided with Postgresql 8.1 version.

Conclusions

Supporting another open source database would definitely augment to the utility of th
e
RFID middleware. Users that prefer using a Postgresql database now have the option of
using the same without considering another database in order to utilize the RFID
middleware application.

Future Work

Other popular open source database can be supported

by the application.

Deliverables



Design Document



Add new Database support in three steps: is a document
meant for database developers and serves as a guide to adding to support for a
new database. The document outlines the exact step that need to be tak
en to
accomplish the same. This reduces the time taken by a new developer to
understand the code before implementing database support.



Code



Modified Install2.java to include the Postgresql option and default JDBC
URL. Modified the DBAgent.java file to c
onnect to the Postgresql database and
escape quotes and ampersands present in URLs of Postgresql and MySQL
databases (when not escaped, these cause
a

SAXParseException).

Also, a
dded
the Postgresql.jar file to the package to provide the necessary Postgresq
l JDBC
driver.



Final Report



The term report describes the need for and implementation details
of adding Postgresql support to the RFID middleware.

Key Personnel

Rachil Chandran



Chandran is a graduate student in the Computer Science and
Computer Engine
ering Department at the University of Arkansas. He has a year’s
experience in developing core
J
ava applications for Aztec
S
oftware and
T
echnologies
Pvt. Ltd., where he served as an associate developer.

References

[1] About the Postgresql Database,
http:/
/www.postgresql.org/about/

Title (via View/HeaderFooter)


3