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" form the File menu, then select "Java" and "Java Application". Push "Next >". Put Project8 for Project Name and push Finish. Replace the Main.java program with this Main.java. 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 project8, right-click on libraries and "Add Library..." the "Java DB Driver". Now you may change your Main.java to work with your tables (using JDBC).
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.
Use the form below to submit your java file and your relational schema:
Last modified: 04/13/10 by Leonidas Fegaras