Advanced Database Systems
“GGLE PROJECT”
Part 1
Felix Hageloh ID: 0425257
Roberto Valenti ID:
0493198
Instructions:
To construct our Database four files are required:
- schema.sql: contains the SQL code to construct the database schema
- XMLparser.java: source code for the xml parser
- LoadGGLE.java: source code for the program
- Output.xml: xml file containing 7000 entries, 1700700 links
First the database schema needs to be created by loading the file schema.sql or by copying and pasting the CREATE TABLE statements from the file into the sql client. For our database we create an extra schema and user (both called ggle). The code is also inside schema.sql, but is commented out, so to recreate the exact same setting as on our platform you can copy and paste the sql code to create the user plus schema, logon as this new user and then run the script to create the tables.
The next step is to modify the JDBC connection string inside LoadGGLE.java in accordance to your database and user. The string is a variable and it is commented in the code where to set it.
Afterwards you need to compile both XMLparser.java and LoadGGLE.java and then run LoadGGLE. Make sure that the xml file with the links is in the current directory and that the JDBC driver is included in your classpath. The program will then read all entries from output.xml, insert them into to the db and add foreign key constraints.
On our platform (Windows XP running on 850MHZ Pentium III, 512RAM) loading the db took about 2 hours.
We couldn’t make a valid comparison to MySQL since turning off the auto commit mode via the JDBC driver doesn’t work on MonetDB. So, naturally MySQL took less than half the time to load the database.