Programming Assignment #9
Storing XML in a Relational Database

Due on Tuesday May 3 before midnight.


This project must be done individually. No copying is permitted. The purpose of this project is to learn how to store XML data in a relational database.


You will do this project on your PC using NetBeans. You can find information about JDBC in the class slides (Web Programming with Servlets). On Netbeans, select "New Project" from the File menu, then select "Java" and "Java Application". Push "Next >". Put Project9 for Project Name and push Finish. Replace the program with this On the upper left window, choose Services, expand Databases and on Java DB do "Create Database...". Create a database with name "db". Don't put user name/password. Right-click on this database and select "Connect...". Then expand your new database connection (for NetBeans 6.8 you also need to expand APP). Then create tables by right-clicking on Tables and choose "Create Table...". Go back to Projects (in the upper-left window) and for project9, right-click on libraries and "Add Library..." the "Java DB Driver". Now you may change your to work with your tables (using JDBC).

Project Requirements

You will use the XML file cs.xml with the DTD department.dtd. You need to parse this file and store it into a relational database and then convert the relational data back to XML.

What to Submit

Use the form below to submit your java file and your relational schema:

Submit Project #9:

Last modified: 04/21/11 by Leonidas Fegaras