Assignment 3

Mapping XML to a Relational Database
Due Date: April 19th, 2010

UPDATED: 13-April The following typos have been fixed:

There are different ways of mapping an XML document into a relational database.
We use the PRE/POST/PARENT encoding: each element/text node is identified by five entries: Note that other encodings also store for each node the pre-value of the parent node, or the size of the subtree rooted at the node.
Consider the following tiny.xml document:


<a>
  <b>Hello World</b>
  <c></c>
</a>

The corresponding PRE/POST/LEVEL-table "tiny_tbl" for this document is


pre |  post | parent | tag  |    text
------------------------------------------
 1  |   4   |  null  | "a"  |    null
 2  |   2   |   1    | "b"  |    null
 3  |   1   |   2    | null | "Hello World"
 4  |   3   |   1    | "c"  |    null

In this assignment we are only concerned with element nodes, text nodes, and attribute/value pairs of an element node.
That is, we do not care about comments, namespace, processing instructions, etc.
We only store non-empty text nodes and ignore empty ones (in the sense of Assignment 1: a text node which only contains ' ', '\t' or '\n' characters is empty).
Furthermore, you may assume that the XML file has only ASCII characters, no character references and no comments.
The PRE/POST/PARENT-table contains the pre/post value of all element and text nodes together with their tag or text value.
For attributes we construct a new table; it contains three entries for each attribute/value pair of an element node: For instance, if we add the an attribute "a1" with value "123" to the c-node of the above document, i.e., if we consider this document


<a>
  <b>Hello World</b>
  <c a1="123"></c>
</a>

Then the corresponding attribute-table "tiny_attr" looks as follows


pre | attr | value
------------------
 4  |  a1  | "123"

Your program should read an XML document "file.xml" and generate the PRE/POST/PARENT-table "file_tbl" and the attribute-table "file_attr" for the document.
Your program should: As an example, consider the small "book.xml" document from assignment 1:

<book isbn="1-2345-6789-0" year="1994">
<title>TCP/IP Illustrated</title>
<author><last>Stevens</last><first>John</first></author>
<publisher>Addison-Wesley</publisher>
<price currency="USD">65.95</price>
</book>

Your program should behave as follows (assuming the executable is named "XML2Rel"):

> XML2Rel -t book.xml
book_tbl:
1       12      null    book    null
2       2       1       title   null
3       1       2       null    TCP/IP Illustrated
4       7       1       author  null
5       4       4       last    null
6       3       5       null    Stevens
7       6       4       first   null
8       5       7       null    John
9       9       1       publisher       null
10      8       9       null    Addison-Wesley
11      11      1       price   null
12      10      11      null    65.95
book_attr:
1       isbn    1-2345-6789-0
1       year    1994
11      currency        USD

> XML2Rel -p book.xml
CREATE TABLE book_tbl (
  pre INTEGER PRIMARY KEY,
  post INTEGER,
  parent INTEGER,
  tag VARCHAR(256),
  text VARCHAR(1000)
);

CREATE TABLE book_attr (
  pre INTEGER REFERENCES book_tbl (pre),
  attr VARCHAR(256),
  value VARCHAR(1000)
);

INSERT INTO book_tbl (pre, post, parent, tag, text)
VALUES (1, 12, null, "book", null);

INSERT INTO book_tbl (pre, post, parent, tag, text)
VALUES (2, 2, 1, "title", null);

INSERT INTO book_tbl (pre, post, parent, tag, text)
VALUES (3, 1, 2, null, "TCP/IP Illustrated");

INSERT INTO book_tbl (pre, post, parent, tag, text)
VALUES (4, 7, 1, "author", null);

INSERT INTO book_tbl (pre, post, parent, tag, text)
VALUES (5, 4, 4, "last", null);

INSERT INTO book_tbl (pre, post, parent, tag, text)
VALUES (6, 3, 5, null, "Stevens");

INSERT INTO book_tbl (pre, post, parent, tag, text)
VALUES (7, 6, 4, "first", null);

INSERT INTO book_tbl (pre, post, parent, tag, text)
VALUES (8, 5, 7, null, "John");

INSERT INTO book_tbl (pre, post, parent, tag, text)
VALUES (9, 9, 1, "publisher", null);

INSERT INTO book_tbl (pre, post, parent, tag, text)
VALUES (10, 8, 9, null, "Addison-Wesley");

INSERT INTO book_tbl (pre, post, parent, tag, text)
VALUES (11, 11, 1, "price", null);

INSERT INTO book_tbl (pre, post, parent, tag, text)
VALUES (12, 10, 11, null, "65.95");

INSERT INTO book_attr (pre, attr, value)
VALUES (1, "isbn", "1-2345-6789-0");

INSERT INTO book_attr (pre, attr, value)
VALUES (1, "year", "1994");

INSERT INTO book_attr (pre, attr, value)
VALUES (11, "currency", "USD");

> XML2Rel -d book.xml cs4317.srvr studentdb1 stu1 stu1pass
z1234567_book_tbl:
3       1       2       null    TCP/IP Illustrated
6       3       5       null    Stevens
8       5       7       null    John
10      8       9       null    Addison-Wesley
12      10      11      null    65.95
4       7       1       author  null
1       12      null    book    null
7       6       4       first   null
5       4       4       last    null
11      11      1       price   null
9       9       1       publisher       null
2       2       1       title   null
z1234567_book_attr:
11      currency        USD
1       isbn    1-2345-6789-0
1       year    1994

> cat query1.txt
SELECT pre, post FROM STUDENTID_book_tbl WHERE pre = 4

> XML2Rel -q cs4317.srvr studentdb1 stu1 stu1pass query1.txt
<author>
<last>
Stevens
</last>
<first>
John
</first>
</author>

Interfacing with a Database ([-d|-q|-c] Options)

For the "-d" option, the full call to your program will be of the form
XML2Rel -d xmlFile.xml server database user password
For the "-q" option, you receive additionally the name of a file which contains one single SQL query.
The query is of the form SELECT pre, post FROM book_tbl .. Thus, your table names are
z1234567_book_tbl and z1234567_book_attr. You have to perform a replacement in the original query:
any occurence of foo_tbl must be replaced and foo_attr must be replaced by z1234567_foo_tbl and
z1234567_foo_attr.
The full call of the program is of the form
XML2Rel -q server database user password queryFile.txt
The call for the "-c" option is as follows:
XML2Rel -c server database user password
For "-d" and "-q", do not drop but leave your tables in the db. Only "-c" drops all your tables.

We have setup for you on the CSE machines a database server (Mysql) with name "cs4317.srvr".
The names of the database are "studentdb1" and "studentdb2", and users are "stu1" and "stu2".
The passwords are "stu1pass" and "stu2pass", respectively. You must use
"stu1" to connect to "studentdb1" and "stu2"

to connect to "studentdb2".
Thus, on any CSE machine you may type
> mysql -h cs4317.srvr -u stu1 -pstu1pass studentdb1
in order to connect to the database. For Java, the connection string is
jdbc:mysql://cs4317.srvr/studentdb1
or
jdbc:mysql://cs4317.srvr/studentdb2
from C++, you can use the following command:
if (!mysql_real_connect(&mysql, "cs4317.srvr", "studentdb1", "stu1", "stu1pass", 0, NULL, 0))
printf("Failed to connect to database: Error: %s\n", mysql_error(&mysql));
If you use Java for this assignment you need to be sure that both /usr/share/java/xercesImpl.jar
and /usr/share/java/mysql-connector-java.jar are in your classpath when you run the program.
For instance you can use the following command-line on a CSE machine:
java -cp /usr/share/java/xercesImpl.jar:/usr/share/java/mysql-connector-java.jar:. XML2Rel ... other options ...
You do not need to put mysql-connector-java.jar in the classpath to compile.

The SQL query in queryFile.txt will select exactly one node of the document, i.e., one row in the table xmlFile_tbl.
Your program should print out, in XML, the subtree rooted at that node. Note that for the "-q" option you
do NOT get the xml file as argument; hence, you will have to retrieve the subtree (including its attributes) from the database!
This can be tested by changing the table in the db, prior to running your program with the "-q" option!
We ask you to print the document line per line, as option -p2 of Assignment 1. (but only the subtree rooted at the node returned by the SQL query).
If the selected node is a text node, then you should print the string stored in the text column of the corresponding row.
Note that the query in queryFile.txt is always of the form
SELECT pre, post
FROM STUDENTID_table_name, STUDENTID_table_name, ..
WHERE condition

or
SELECT pre, post FROM STUDENTID_table_name, STUDENTID_table_name, .. WHERE condition

in which the condition may contains a subquery.

IMPORTANT

When interfacing with the DB, do not use the table names as before, but use:
yourStudentID_xmlFile_tbl
and
yourStudentID_xmlFile_attr
Correspondingly, you should change the table name of the query in queryFile.txt from STUDENTID_tableName to yourStudentID_tableName.

For example:
  yourStudentID=z1234567 (preceded by 'z')
  xmlfile=book (without extensions)
  query="SELECT pre,post FROM STUDENTID_book_tbl WHERE pre=1"

Then your tablenames are: 
  z1234567_book_tbl and 
  z1234567_book_attr
and the query you should use is 
"SELECT pre,post FROM z1234567_book_tbl WHERE pre=1"

Assuming the java string q contains the text of the query, you can create
the correct one by doing q.replaceAll("STUDENTID","z123456") To see the names of tables that you generated, use SHOW TABLES LIKE 'z1234567%'.
To delete a table you can use DROP TABLE [IF EXISTS] table_name.

If you want to test your program, be sure to always drop the table you created during
your tests afterwards, (E.g., by using your program with "-c")

More Example Runs

Here are some runs on arizona.xml.

> XML2Rel -t arizona.xml
arizona_tbl:
1	262	null	arizona	null
2	9	1	Course	null
3	2	2	Time	null
4	1	3	null	3:00-3:50
5	4	2	Day	null
6	3	5	null	MWF
7	6	2	Place	null
8	5	7	null	M LNG 350
9	8	2	Instructor	null
10	7	9	null	Mercer
11	18	1	Course	null
12	11	11	Time	null
13	10	12	null	1:00-1:50
14	13	11	Day	null
15	12	14	null	MWF
16	15	11	Place	null
17	14	16	null	ECON 110
18	17	11	Instructor	null
19	16	18	null	Jacobson
20	27	1	Course	null
21	20	20	Time	null
22	19	21	null	10:00-10:50
23	22	20	Day	null
24	21	23	null	MWF
25	24	20	Place	null
26	23	25	null	BIO E 100
27	26	20	Instructor	null
28	25	27	null	Mercer
29	36	1	Course	null
30	29	29	Time	null
31	28	30	null	1:00-1:50
32	31	29	Day	null
33	30	32	null	MWF
34	33	29	Place	null
35	32	34	null	BIO W 301
36	35	29	Instructor	null
37	34	36	null	Reges
38	45	1	Course	null
39	38	38	Time	null
40	37	39	null	9:30-10:45
41	40	38	Day	null
42	39	41	null	TR
43	42	38	Place	null
44	41	43	null	KOFFL 218
45	44	38	Instructor	null
46	43	45	null	Homer
47	54	1	Course	null
48	47	47	Time	null
49	46	48	null	9:30-10:30
50	49	47	Day	null
51	48	50	null	R
52	51	47	Place	null
53	50	52	null	GLD-S 701
54	53	47	Instructor	null
55	52	54	null	Westbrook
56	63	1	Course	null
57	56	56	Time	null
58	55	57	null	9:00-9:50
59	58	56	Day	null
60	57	59	null	F
61	60	56	Place	null
62	59	61	null	GLD-S 701
63	62	56	Instructor	null
64	61	63	null	Mitchell
65	72	1	Course	null
66	65	65	Time	null
67	64	66	null	2:00-3:15
68	67	65	Day	null
69	66	68	null	TR
70	69	65	Place	null
71	68	70	null	KOFFL 218
72	71	65	Instructor	null
73	70	72	null	Reges
74	81	1	Course	null
75	74	74	Time	null
76	73	75	null	2:00-2:50
77	76	74	Day	null
78	75	77	null	MWF
79	78	74	Place	null
80	77	79	null	CHEM111
81	80	74	Instructor	null
82	79	81	null	Westbrook
83	90	1	Course	null
84	83	83	Time	null
85	82	84	null	2:00-2:50
86	85	83	Day	null
87	84	86	null	MWF
88	87	83	Place	null
89	86	88	null	CHEM111
90	89	83	Instructor	null
91	88	90	null	Westbrook
92	99	1	Course	null
93	92	92	Time	null
94	91	93	null	3:30-4:45
95	94	92	Day	null
96	93	95	null	TR
97	96	92	Place	null
98	95	97	null	ILC 130
99	98	92	Instructor	null
100	97	99	null	Efrat
101	108	1	Course	null
102	101	101	Time	null
103	100	102	null	12:30-1:45
104	103	101	Day	null
105	102	104	null	TR
106	105	101	Place	null
107	104	106	null	EDUC 353
108	107	101	Instructor	null
109	106	108	null	Lenards
110	117	1	Course	null
111	110	110	Time	null
112	109	111	null	11:00-12:15
113	112	110	Day	null
114	111	113	null	TR
115	114	110	Place	null
116	113	115	null	ILC 119
117	116	110	Instructor	null
118	115	117	null	Lenards
119	126	1	Course	null
120	119	119	Time	null
121	118	120	null	12:30-1:45
122	121	119	Day	null
123	120	122	null	TR
124	123	119	Place	null
125	122	124	null	ILC 137
126	125	119	Instructor	null
127	124	126	null	Homer
128	135	1	Course	null
129	128	128	Time	null
130	127	129	null	2:00-2:50
131	130	128	Day	null
132	129	131	null	MWF
133	132	128	Place	null
134	131	133	null	M LNG 311
135	134	128	Instructor	null
136	133	135	null	Degermark
137	144	1	Course	null
138	137	137	Time	null
139	136	138	null	2:00-3:15
140	139	137	Day	null
141	138	140	null	TR
142	141	137	Place	null
143	140	142	null	GLD-S 701
144	143	137	Instructor	null
145	142	144	null	N. Gupta
146	153	1	Course	null
147	146	146	Time	null
148	145	147	null	9:30-10:45
149	148	146	Day	null
150	147	149	null	TR
151	150	146	Place	null
152	149	151	null	BIOW301
153	152	146	Instructor	null
154	151	153	null	Kobourov
155	162	1	Course	null
156	155	155	Time	null
157	154	156	null	4:00-4:50
158	157	155	Day	null
159	156	158	null	MTWF
160	159	155	Place	null
161	158	160	null	M LNG 311
162	161	155	Instructor	null
163	160	162	null	Degermark
164	171	1	Course	null
165	164	164	Time	null
166	163	165	null	3:30-4:45
167	166	164	Day	null
168	165	167	null	TR
169	168	164	Place	null
170	167	169	null	GLD-S 701
171	170	164	Instructor	null
172	169	171	null	Barnard
173	180	1	Course	null
174	173	173	Time	null
175	172	174	null	3:00-3:50
176	175	173	Day	null
177	174	176	null	MF
178	177	173	Place	null
179	176	178	null	GLS-S 805
180	179	173	Instructor	null
181	178	180	null	Homer
182	189	1	Course	null
183	182	182	Time	null
184	181	183	null	10:30-11:45
185	184	182	Day	null
186	183	185	null	MW
187	186	182	Place	null
188	185	187	null	GLD-S 701
189	188	182	Instructor	null
190	187	189	null	Collberg
191	198	1	Course	null
192	191	191	Time	null
193	190	192	null	2:00-3:15
194	193	191	Day	null
195	192	194	null	TR
196	195	191	Place	null
197	194	196	null	GLD-S 701
198	197	191	Instructor	null
199	196	198	null	Gupta, N.
200	207	1	Course	null
201	200	200	Time	null
202	199	201	null	9:00-10:15
203	202	200	Day	null
204	201	203	null	MW
205	204	200	Place	null
206	203	205	null	GLD-S 701
207	206	200	Instructor	null
208	205	207	null	Debray
209	216	1	Course	null
210	209	209	Time	null
211	208	210	null	1:30-2:45
212	211	209	Day	null
213	210	212	null	MW
214	213	209	Place	null
215	212	214	null	GLD-S 701
216	215	209	Instructor	null
217	214	216	null	Moon
218	225	1	Course	null
219	218	218	Time	null
220	217	219	null	12:00-1:15
221	220	218	Day	null
222	219	221	null	MW
223	222	218	Place	null
224	221	223	null	GLD-S 701
225	224	218	Instructor	null
226	223	225	null	Downey
227	234	1	Course	null
228	227	227	Time	null
229	226	228	null	3:30-4:45
230	229	227	Day	null
231	228	230	null	TR
232	231	227	Place	null
233	230	232	null	GLD-S 701
234	233	227	Instructor	null
235	232	234	null	Barnard
236	243	1	Course	null
237	236	236	Time	null
238	235	237	null	12:30-1:45
239	238	236	Day	null
240	237	239	null	TR
241	240	236	Place	null
242	239	241	null	GLD-S 701
243	242	236	Instructor	null
244	241	243	null	Fong
245	252	1	Course	null
246	245	245	Time	null
247	244	246	null	3:00-4:15
248	247	245	Day	null
249	246	248	null	MW
250	249	245	Place	null
251	248	250	null	GLD-S 701
252	251	245	Instructor	null
253	250	252	null	Kececioglu
254	261	1	Course	null
255	254	254	Time	null
256	253	255	null	11:00-12:15
257	256	254	Day	null
258	255	257	null	TR
259	258	254	Place	null
260	257	259	null	GLD-S 701
261	260	254	Instructor	null
262	259	261	null	Downey
arizona_attr:
2	Code	127A
11	Code	127B
20	Code	227
29	Code	245
38	Code	252
47	Code	296H
56	Code	328
65	Code	335
74	Code	345
83	Code	346
92	Code	352
101	Code	386
110	Code	387
119	Code	422
128	Code	425
137	Code	436
146	Code	445
155	Code	452
164	Code	477
173	Code	492
182	Code	520
191	Code	536
200	Code	553
209	Code	560
218	Code	573
227	Code	577
236	Code	620
245	Code	650
254	Code	695A

> XML2Rel -p arizona.xml
CREATE TABLE arizona_tbl (
  pre INTEGER PRIMARY KEY,
  post INTEGER,
  parent INTEGER,
  tag VARCHAR(256),
  text VARCHAR(1000)
);

CREATE TABLE arizona_attr (
  pre INTEGER REFERENCES arizona_tbl (pre),
  attr VARCHAR(256),
  value VARCHAR(1000)
);

INSERT INTO arizona_tbl (pre, post, parent, tag, text)
VALUES (1, 262, null, "arizona", null);

INSERT INTO arizona_tbl (pre, post, parent, tag, text)
VALUES (2, 9, 1, "Course", null);

INSERT INTO arizona_tbl (pre, post, parent, tag, text)
VALUES (3, 2, 2, "Time", null);

INSERT INTO arizona_tbl (pre, post, parent, tag, text)
VALUES (4, 1, 3, null, "3:00-3:50");

INSERT INTO arizona_tbl (pre, post, parent, tag, text)
VALUES (5, 4, 2, "Day", null);

INSERT INTO arizona_tbl (pre, post, parent, tag, text)
VALUES (6, 3, 5, null, "MWF");

INSERT INTO arizona_tbl (pre, post, parent, tag, text)
VALUES (7, 6, 2, "Place", null);

INSERT INTO arizona_tbl (pre, post, parent, tag, text)
VALUES (8, 5, 7, null, "M LNG 350");

INSERT INTO arizona_tbl (pre, post, parent, tag, text)
VALUES (9, 8, 2, "Instructor", null);

INSERT INTO arizona_tbl (pre, post, parent, tag, text)
VALUES (10, 7, 9, null, "Mercer");

INSERT INTO arizona_tbl (pre, post, parent, tag, text)
VALUES (11, 18, 1, "Course", null);

INSERT INTO arizona_tbl (pre, post, parent, tag, text)
VALUES (12, 11, 11, "Time", null);

INSERT INTO arizona_tbl (pre, post, parent, tag, text)
VALUES (13, 10, 12, null, "1:00-1:50");

INSERT INTO arizona_tbl (pre, post, parent, tag, text)
VALUES (14, 13, 11, "Day", null);

INSERT INTO arizona_tbl (pre, post, parent, tag, text)
VALUES (15, 12, 14, null, "MWF");

INSERT INTO arizona_tbl (pre, post, parent, tag, text)
VALUES (16, 15, 11, "Place", null);

INSERT INTO arizona_tbl (pre, post, parent, tag, text)
VALUES (17, 14, 16, null, "ECON 110");

INSERT INTO arizona_tbl (pre, post, parent, tag, text)
VALUES (18, 17, 11, "Instructor", null);

INSERT INTO arizona_tbl (pre, post, parent, tag, text)
VALUES (19, 16, 18, null, "Jacobson");

INSERT INTO arizona_tbl (pre, post, parent, tag, text)
VALUES (20, 27, 1, "Course", null);

INSERT INTO arizona_tbl (pre, post, parent, tag, text)
VALUES (21, 20, 20, "Time", null);

INSERT INTO arizona_tbl (pre, post, parent, tag, text)
VALUES (22, 19, 21, null, "10:00-10:50");

INSERT INTO arizona_tbl (pre, post, parent, tag, text)
VALUES (23, 22, 20, "Day", null);

INSERT INTO arizona_tbl (pre, post, parent, tag, text)
VALUES (24, 21, 23, null, "MWF");

INSERT INTO arizona_tbl (pre, post, parent, tag, text)
VALUES (25, 24, 20, "Place", null);

INSERT INTO arizona_tbl (pre, post, parent, tag, text)
VALUES (26, 23, 25, null, "BIO E 100");

INSERT INTO arizona_tbl (pre, post, parent, tag, text)
VALUES (27, 26, 20, "Instructor", null);

INSERT INTO arizona_tbl (pre, post, parent, tag, text)
VALUES (28, 25, 27, null, "Mercer");

INSERT INTO arizona_tbl (pre, post, parent, tag, text)
VALUES (29, 36, 1, "Course", null);

INSERT INTO arizona_tbl (pre, post, parent, tag, text)
VALUES (30, 29, 29, "Time", null);

INSERT INTO arizona_tbl (pre, post, parent, tag, text)
VALUES (31, 28, 30, null, "1:00-1:50");

INSERT INTO arizona_tbl (pre, post, parent, tag, text)
VALUES (32, 31, 29, "Day", null);

INSERT INTO arizona_tbl (pre, post, parent, tag, text)
VALUES (33, 30, 32, null, "MWF");

INSERT INTO arizona_tbl (pre, post, parent, tag, text)
VALUES (34, 33, 29, "Place", null);

INSERT INTO arizona_tbl (pre, post, parent, tag, text)
VALUES (35, 32, 34, null, "BIO W 301");

INSERT INTO arizona_tbl (pre, post, parent, tag, text)
VALUES (36, 35, 29, "Instructor", null);

INSERT INTO arizona_tbl (pre, post, parent, tag, text)
VALUES (37, 34, 36, null, "Reges");

INSERT INTO arizona_tbl (pre, post, parent, tag, text)
VALUES (38, 45, 1, "Course", null);

INSERT INTO arizona_tbl (pre, post, parent, tag, text)
VALUES (39, 38, 38, "Time", null);

INSERT INTO arizona_tbl (pre, post, parent, tag, text)
VALUES (40, 37, 39, null, "9:30-10:45");

INSERT INTO arizona_tbl (pre, post, parent, tag, text)
VALUES (41, 40, 38, "Day", null);

INSERT INTO arizona_tbl (pre, post, parent, tag, text)
VALUES (42, 39, 41, null, "TR");

INSERT INTO arizona_tbl (pre, post, parent, tag, text)
VALUES (43, 42, 38, "Place", null);

INSERT INTO arizona_tbl (pre, post, parent, tag, text)
VALUES (44, 41, 43, null, "KOFFL 218");

INSERT INTO arizona_tbl (pre, post, parent, tag, text)
VALUES (45, 44, 38, "Instructor", null);

INSERT INTO arizona_tbl (pre, post, parent, tag, text)
VALUES (46, 43, 45, null, "Homer");

INSERT INTO arizona_tbl (pre, post, parent, tag, text)
VALUES (47, 54, 1, "Course", null);

INSERT INTO arizona_tbl (pre, post, parent, tag, text)
VALUES (48, 47, 47, "Time", null);

INSERT INTO arizona_tbl (pre, post, parent, tag, text)
VALUES (49, 46, 48, null, "9:30-10:30");

INSERT INTO arizona_tbl (pre, post, parent, tag, text)
VALUES (50, 49, 47, "Day", null);

INSERT INTO arizona_tbl (pre, post, parent, tag, text)
VALUES (51, 48, 50, null, "R");

INSERT INTO arizona_tbl (pre, post, parent, tag, text)
VALUES (52, 51, 47, "Place", null);

INSERT INTO arizona_tbl (pre, post, parent, tag, text)
VALUES (53, 50, 52, null, "GLD-S 701");

INSERT INTO arizona_tbl (pre, post, parent, tag, text)
VALUES (54, 53, 47, "Instructor", null);

INSERT INTO arizona_tbl (pre, post, parent, tag, text)
VALUES (55, 52, 54, null, "Westbrook");

INSERT INTO arizona_tbl (pre, post, parent, tag, text)
VALUES (56, 63, 1, "Course", null);

INSERT INTO arizona_tbl (pre, post, parent, tag, text)
VALUES (57, 56, 56, "Time", null);

INSERT INTO arizona_tbl (pre, post, parent, tag, text)
VALUES (58, 55, 57, null, "9:00-9:50");

INSERT INTO arizona_tbl (pre, post, parent, tag, text)
VALUES (59, 58, 56, "Day", null);

INSERT INTO arizona_tbl (pre, post, parent, tag, text)
VALUES (60, 57, 59, null, "F");

INSERT INTO arizona_tbl (pre, post, parent, tag, text)
VALUES (61, 60, 56, "Place", null);

INSERT INTO arizona_tbl (pre, post, parent, tag, text)
VALUES (62, 59, 61, null, "GLD-S 701");

INSERT INTO arizona_tbl (pre, post, parent, tag, text)
VALUES (63, 62, 56, "Instructor", null);

INSERT INTO arizona_tbl (pre, post, parent, tag, text)
VALUES (64, 61, 63, null, "Mitchell");

INSERT INTO arizona_tbl (pre, post, parent, tag, text)
VALUES (65, 72, 1, "Course", null);

INSERT INTO arizona_tbl (pre, post, parent, tag, text)
VALUES (66, 65, 65, "Time", null);

INSERT INTO arizona_tbl (pre, post, parent, tag, text)
VALUES (67, 64, 66, null, "2:00-3:15");

INSERT INTO arizona_tbl (pre, post, parent, tag, text)
VALUES (68, 67, 65, "Day", null);

INSERT INTO arizona_tbl (pre, post, parent, tag, text)
VALUES (69, 66, 68, null, "TR");

INSERT INTO arizona_tbl (pre, post, parent, tag, text)
VALUES (70, 69, 65, "Place", null);

INSERT INTO arizona_tbl (pre, post, parent, tag, text)
VALUES (71, 68, 70, null, "KOFFL 218");

INSERT INTO arizona_tbl (pre, post, parent, tag, text)
VALUES (72, 71, 65, "Instructor", null);

INSERT INTO arizona_tbl (pre, post, parent, tag, text)
VALUES (73, 70, 72, null, "Reges");

INSERT INTO arizona_tbl (pre, post, parent, tag, text)
VALUES (74, 81, 1, "Course", null);

INSERT INTO arizona_tbl (pre, post, parent, tag, text)
VALUES (75, 74, 74, "Time", null);

INSERT INTO arizona_tbl (pre, post, parent, tag, text)
VALUES (76, 73, 75, null, "2:00-2:50");

INSERT INTO arizona_tbl (pre, post, parent, tag, text)
VALUES (77, 76, 74, "Day", null);

INSERT INTO arizona_tbl (pre, post, parent, tag, text)
VALUES (78, 75, 77, null, "MWF");

INSERT INTO arizona_tbl (pre, post, parent, tag, text)
VALUES (79, 78, 74, "Place", null);

INSERT INTO arizona_tbl (pre, post, parent, tag, text)
VALUES (80, 77, 79, null, "CHEM111");

INSERT INTO arizona_tbl (pre, post, parent, tag, text)
VALUES (81, 80, 74, "Instructor", null);

INSERT INTO arizona_tbl (pre, post, parent, tag, text)
VALUES (82, 79, 81, null, "Westbrook");

INSERT INTO arizona_tbl (pre, post, parent, tag, text)
VALUES (83, 90, 1, "Course", null);

INSERT INTO arizona_tbl (pre, post, parent, tag, text)
VALUES (84, 83, 83, "Time", null);

INSERT INTO arizona_tbl (pre, post, parent, tag, text)
VALUES (85, 82, 84, null, "2:00-2:50");

INSERT INTO arizona_tbl (pre, post, parent, tag, text)
VALUES (86, 85, 83, "Day", null);

INSERT INTO arizona_tbl (pre, post, parent, tag, text)
VALUES (87, 84, 86, null, "MWF");

INSERT INTO arizona_tbl (pre, post, parent, tag, text)
VALUES (88, 87, 83, "Place", null);

INSERT INTO arizona_tbl (pre, post, parent, tag, text)
VALUES (89, 86, 88, null, "CHEM111");

INSERT INTO arizona_tbl (pre, post, parent, tag, text)
VALUES (90, 89, 83, "Instructor", null);

INSERT INTO arizona_tbl (pre, post, parent, tag, text)
VALUES (91, 88, 90, null, "Westbrook");

INSERT INTO arizona_tbl (pre, post, parent, tag, text)
VALUES (92, 99, 1, "Course", null);

INSERT INTO arizona_tbl (pre, post, parent, tag, text)
VALUES (93, 92, 92, "Time", null);

INSERT INTO arizona_tbl (pre, post, parent, tag, text)
VALUES (94, 91, 93, null, "3:30-4:45");

INSERT INTO arizona_tbl (pre, post, parent, tag, text)
VALUES (95, 94, 92, "Day", null);

INSERT INTO arizona_tbl (pre, post, parent, tag, text)
VALUES (96, 93, 95, null, "TR");

INSERT INTO arizona_tbl (pre, post, parent, tag, text)
VALUES (97, 96, 92, "Place", null);

INSERT INTO arizona_tbl (pre, post, parent, tag, text)
VALUES (98, 95, 97, null, "ILC 130");

INSERT INTO arizona_tbl (pre, post, parent, tag, text)
VALUES (99, 98, 92, "Instructor", null);

INSERT INTO arizona_tbl (pre, post, parent, tag, text)
VALUES (100, 97, 99, null, "Efrat");

INSERT INTO arizona_tbl (pre, post, parent, tag, text)
VALUES (101, 108, 1, "Course", null);

INSERT INTO arizona_tbl (pre, post, parent, tag, text)
VALUES (102, 101, 101, "Time", null);

INSERT INTO arizona_tbl (pre, post, parent, tag, text)
VALUES (103, 100, 102, null, "12:30-1:45");

INSERT INTO arizona_tbl (pre, post, parent, tag, text)
VALUES (104, 103, 101, "Day", null);

INSERT INTO arizona_tbl (pre, post, parent, tag, text)
VALUES (105, 102, 104, null, "TR");

INSERT INTO arizona_tbl (pre, post, parent, tag, text)
VALUES (106, 105, 101, "Place", null);

INSERT INTO arizona_tbl (pre, post, parent, tag, text)
VALUES (107, 104, 106, null, "EDUC 353");

INSERT INTO arizona_tbl (pre, post, parent, tag, text)
VALUES (108, 107, 101, "Instructor", null);

INSERT INTO arizona_tbl (pre, post, parent, tag, text)
VALUES (109, 106, 108, null, "Lenards");

INSERT INTO arizona_tbl (pre, post, parent, tag, text)
VALUES (110, 117, 1, "Course", null);

INSERT INTO arizona_tbl (pre, post, parent, tag, text)
VALUES (111, 110, 110, "Time", null);

INSERT INTO arizona_tbl (pre, post, parent, tag, text)
VALUES (112, 109, 111, null, "11:00-12:15");

INSERT INTO arizona_tbl (pre, post, parent, tag, text)
VALUES (113, 112, 110, "Day", null);

INSERT INTO arizona_tbl (pre, post, parent, tag, text)
VALUES (114, 111, 113, null, "TR");

INSERT INTO arizona_tbl (pre, post, parent, tag, text)
VALUES (115, 114, 110, "Place", null);

INSERT INTO arizona_tbl (pre, post, parent, tag, text)
VALUES (116, 113, 115, null, "ILC 119");

INSERT INTO arizona_tbl (pre, post, parent, tag, text)
VALUES (117, 116, 110, "Instructor", null);

INSERT INTO arizona_tbl (pre, post, parent, tag, text)
VALUES (118, 115, 117, null, "Lenards");

INSERT INTO arizona_tbl (pre, post, parent, tag, text)
VALUES (119, 126, 1, "Course", null);

INSERT INTO arizona_tbl (pre, post, parent, tag, text)
VALUES (120, 119, 119, "Time", null);

INSERT INTO arizona_tbl (pre, post, parent, tag, text)
VALUES (121, 118, 120, null, "12:30-1:45");

INSERT INTO arizona_tbl (pre, post, parent, tag, text)
VALUES (122, 121, 119, "Day", null);

INSERT INTO arizona_tbl (pre, post, parent, tag, text)
VALUES (123, 120, 122, null, "TR");

INSERT INTO arizona_tbl (pre, post, parent, tag, text)
VALUES (124, 123, 119, "Place", null);

INSERT INTO arizona_tbl (pre, post, parent, tag, text)
VALUES (125, 122, 124, null, "ILC 137");

INSERT INTO arizona_tbl (pre, post, parent, tag, text)
VALUES (126, 125, 119, "Instructor", null);

INSERT INTO arizona_tbl (pre, post, parent, tag, text)
VALUES (127, 124, 126, null, "Homer");

INSERT INTO arizona_tbl (pre, post, parent, tag, text)
VALUES (128, 135, 1, "Course", null);

INSERT INTO arizona_tbl (pre, post, parent, tag, text)
VALUES (129, 128, 128, "Time", null);

INSERT INTO arizona_tbl (pre, post, parent, tag, text)
VALUES (130, 127, 129, null, "2:00-2:50");

INSERT INTO arizona_tbl (pre, post, parent, tag, text)
VALUES (131, 130, 128, "Day", null);

INSERT INTO arizona_tbl (pre, post, parent, tag, text)
VALUES (132, 129, 131, null, "MWF");

INSERT INTO arizona_tbl (pre, post, parent, tag, text)
VALUES (133, 132, 128, "Place", null);

INSERT INTO arizona_tbl (pre, post, parent, tag, text)
VALUES (134, 131, 133, null, "M LNG 311");

INSERT INTO arizona_tbl (pre, post, parent, tag, text)
VALUES (135, 134, 128, "Instructor", null);

INSERT INTO arizona_tbl (pre, post, parent, tag, text)
VALUES (136, 133, 135, null, "Degermark");

INSERT INTO arizona_tbl (pre, post, parent, tag, text)
VALUES (137, 144, 1, "Course", null);

INSERT INTO arizona_tbl (pre, post, parent, tag, text)
VALUES (138, 137, 137, "Time", null);

INSERT INTO arizona_tbl (pre, post, parent, tag, text)
VALUES (139, 136, 138, null, "2:00-3:15");

INSERT INTO arizona_tbl (pre, post, parent, tag, text)
VALUES (140, 139, 137, "Day", null);

INSERT INTO arizona_tbl (pre, post, parent, tag, text)
VALUES (141, 138, 140, null, "TR");

INSERT INTO arizona_tbl (pre, post, parent, tag, text)
VALUES (142, 141, 137, "Place", null);

INSERT INTO arizona_tbl (pre, post, parent, tag, text)
VALUES (143, 140, 142, null, "GLD-S 701");

INSERT INTO arizona_tbl (pre, post, parent, tag, text)
VALUES (144, 143, 137, "Instructor", null);

INSERT INTO arizona_tbl (pre, post, parent, tag, text)
VALUES (145, 142, 144, null, "N. Gupta");

INSERT INTO arizona_tbl (pre, post, parent, tag, text)
VALUES (146, 153, 1, "Course", null);

INSERT INTO arizona_tbl (pre, post, parent, tag, text)
VALUES (147, 146, 146, "Time", null);

INSERT INTO arizona_tbl (pre, post, parent, tag, text)
VALUES (148, 145, 147, null, "9:30-10:45");

INSERT INTO arizona_tbl (pre, post, parent, tag, text)
VALUES (149, 148, 146, "Day", null);

INSERT INTO arizona_tbl (pre, post, parent, tag, text)
VALUES (150, 147, 149, null, "TR");

INSERT INTO arizona_tbl (pre, post, parent, tag, text)
VALUES (151, 150, 146, "Place", null);

INSERT INTO arizona_tbl (pre, post, parent, tag, text)
VALUES (152, 149, 151, null, "BIOW301");

INSERT INTO arizona_tbl (pre, post, parent, tag, text)
VALUES (153, 152, 146, "Instructor", null);

INSERT INTO arizona_tbl (pre, post, parent, tag, text)
VALUES (154, 151, 153, null, "Kobourov");

INSERT INTO arizona_tbl (pre, post, parent, tag, text)
VALUES (155, 162, 1, "Course", null);

INSERT INTO arizona_tbl (pre, post, parent, tag, text)
VALUES (156, 155, 155, "Time", null);

INSERT INTO arizona_tbl (pre, post, parent, tag, text)
VALUES (157, 154, 156, null, "4:00-4:50");

INSERT INTO arizona_tbl (pre, post, parent, tag, text)
VALUES (158, 157, 155, "Day", null);

INSERT INTO arizona_tbl (pre, post, parent, tag, text)
VALUES (159, 156, 158, null, "MTWF");

INSERT INTO arizona_tbl (pre, post, parent, tag, text)
VALUES (160, 159, 155, "Place", null);

INSERT INTO arizona_tbl (pre, post, parent, tag, text)
VALUES (161, 158, 160, null, "M LNG 311");

INSERT INTO arizona_tbl (pre, post, parent, tag, text)
VALUES (162, 161, 155, "Instructor", null);

INSERT INTO arizona_tbl (pre, post, parent, tag, text)
VALUES (163, 160, 162, null, "Degermark");

INSERT INTO arizona_tbl (pre, post, parent, tag, text)
VALUES (164, 171, 1, "Course", null);

INSERT INTO arizona_tbl (pre, post, parent, tag, text)
VALUES (165, 164, 164, "Time", null);

INSERT INTO arizona_tbl (pre, post, parent, tag, text)
VALUES (166, 163, 165, null, "3:30-4:45");

INSERT INTO arizona_tbl (pre, post, parent, tag, text)
VALUES (167, 166, 164, "Day", null);

INSERT INTO arizona_tbl (pre, post, parent, tag, text)
VALUES (168, 165, 167, null, "TR");

INSERT INTO arizona_tbl (pre, post, parent, tag, text)
VALUES (169, 168, 164, "Place", null);

INSERT INTO arizona_tbl (pre, post, parent, tag, text)
VALUES (170, 167, 169, null, "GLD-S 701");

INSERT INTO arizona_tbl (pre, post, parent, tag, text)
VALUES (171, 170, 164, "Instructor", null);

INSERT INTO arizona_tbl (pre, post, parent, tag, text)
VALUES (172, 169, 171, null, "Barnard");

INSERT INTO arizona_tbl (pre, post, parent, tag, text)
VALUES (173, 180, 1, "Course", null);

INSERT INTO arizona_tbl (pre, post, parent, tag, text)
VALUES (174, 173, 173, "Time", null);

INSERT INTO arizona_tbl (pre, post, parent, tag, text)
VALUES (175, 172, 174, null, "3:00-3:50");

INSERT INTO arizona_tbl (pre, post, parent, tag, text)
VALUES (176, 175, 173, "Day", null);

INSERT INTO arizona_tbl (pre, post, parent, tag, text)
VALUES (177, 174, 176, null, "MF");

INSERT INTO arizona_tbl (pre, post, parent, tag, text)
VALUES (178, 177, 173, "Place", null);

INSERT INTO arizona_tbl (pre, post, parent, tag, text)
VALUES (179, 176, 178, null, "GLS-S 805");

INSERT INTO arizona_tbl (pre, post, parent, tag, text)
VALUES (180, 179, 173, "Instructor", null);

INSERT INTO arizona_tbl (pre, post, parent, tag, text)
VALUES (181, 178, 180, null, "Homer");

INSERT INTO arizona_tbl (pre, post, parent, tag, text)
VALUES (182, 189, 1, "Course", null);

INSERT INTO arizona_tbl (pre, post, parent, tag, text)
VALUES (183, 182, 182, "Time", null);

INSERT INTO arizona_tbl (pre, post, parent, tag, text)
VALUES (184, 181, 183, null, "10:30-11:45");

INSERT INTO arizona_tbl (pre, post, parent, tag, text)
VALUES (185, 184, 182, "Day", null);

INSERT INTO arizona_tbl (pre, post, parent, tag, text)
VALUES (186, 183, 185, null, "MW");

INSERT INTO arizona_tbl (pre, post, parent, tag, text)
VALUES (187, 186, 182, "Place", null);

INSERT INTO arizona_tbl (pre, post, parent, tag, text)
VALUES (188, 185, 187, null, "GLD-S 701");

INSERT INTO arizona_tbl (pre, post, parent, tag, text)
VALUES (189, 188, 182, "Instructor", null);

INSERT INTO arizona_tbl (pre, post, parent, tag, text)
VALUES (190, 187, 189, null, "Collberg");

INSERT INTO arizona_tbl (pre, post, parent, tag, text)
VALUES (191, 198, 1, "Course", null);

INSERT INTO arizona_tbl (pre, post, parent, tag, text)
VALUES (192, 191, 191, "Time", null);

INSERT INTO arizona_tbl (pre, post, parent, tag, text)
VALUES (193, 190, 192, null, "2:00-3:15");

INSERT INTO arizona_tbl (pre, post, parent, tag, text)
VALUES (194, 193, 191, "Day", null);

INSERT INTO arizona_tbl (pre, post, parent, tag, text)
VALUES (195, 192, 194, null, "TR");

INSERT INTO arizona_tbl (pre, post, parent, tag, text)
VALUES (196, 195, 191, "Place", null);

INSERT INTO arizona_tbl (pre, post, parent, tag, text)
VALUES (197, 194, 196, null, "GLD-S 701");

INSERT INTO arizona_tbl (pre, post, parent, tag, text)
VALUES (198, 197, 191, "Instructor", null);

INSERT INTO arizona_tbl (pre, post, parent, tag, text)
VALUES (199, 196, 198, null, "Gupta, N.");

INSERT INTO arizona_tbl (pre, post, parent, tag, text)
VALUES (200, 207, 1, "Course", null);

INSERT INTO arizona_tbl (pre, post, parent, tag, text)
VALUES (201, 200, 200, "Time", null);

INSERT INTO arizona_tbl (pre, post, parent, tag, text)
VALUES (202, 199, 201, null, "9:00-10:15");

INSERT INTO arizona_tbl (pre, post, parent, tag, text)
VALUES (203, 202, 200, "Day", null);

INSERT INTO arizona_tbl (pre, post, parent, tag, text)
VALUES (204, 201, 203, null, "MW");

INSERT INTO arizona_tbl (pre, post, parent, tag, text)
VALUES (205, 204, 200, "Place", null);

INSERT INTO arizona_tbl (pre, post, parent, tag, text)
VALUES (206, 203, 205, null, "GLD-S 701");

INSERT INTO arizona_tbl (pre, post, parent, tag, text)
VALUES (207, 206, 200, "Instructor", null);

INSERT INTO arizona_tbl (pre, post, parent, tag, text)
VALUES (208, 205, 207, null, "Debray");

INSERT INTO arizona_tbl (pre, post, parent, tag, text)
VALUES (209, 216, 1, "Course", null);

INSERT INTO arizona_tbl (pre, post, parent, tag, text)
VALUES (210, 209, 209, "Time", null);

INSERT INTO arizona_tbl (pre, post, parent, tag, text)
VALUES (211, 208, 210, null, "1:30-2:45");

INSERT INTO arizona_tbl (pre, post, parent, tag, text)
VALUES (212, 211, 209, "Day", null);

INSERT INTO arizona_tbl (pre, post, parent, tag, text)
VALUES (213, 210, 212, null, "MW");

INSERT INTO arizona_tbl (pre, post, parent, tag, text)
VALUES (214, 213, 209, "Place", null);

INSERT INTO arizona_tbl (pre, post, parent, tag, text)
VALUES (215, 212, 214, null, "GLD-S 701");

INSERT INTO arizona_tbl (pre, post, parent, tag, text)
VALUES (216, 215, 209, "Instructor", null);

INSERT INTO arizona_tbl (pre, post, parent, tag, text)
VALUES (217, 214, 216, null, "Moon");

INSERT INTO arizona_tbl (pre, post, parent, tag, text)
VALUES (218, 225, 1, "Course", null);

INSERT INTO arizona_tbl (pre, post, parent, tag, text)
VALUES (219, 218, 218, "Time", null);

INSERT INTO arizona_tbl (pre, post, parent, tag, text)
VALUES (220, 217, 219, null, "12:00-1:15");

INSERT INTO arizona_tbl (pre, post, parent, tag, text)
VALUES (221, 220, 218, "Day", null);

INSERT INTO arizona_tbl (pre, post, parent, tag, text)
VALUES (222, 219, 221, null, "MW");

INSERT INTO arizona_tbl (pre, post, parent, tag, text)
VALUES (223, 222, 218, "Place", null);

INSERT INTO arizona_tbl (pre, post, parent, tag, text)
VALUES (224, 221, 223, null, "GLD-S 701");

INSERT INTO arizona_tbl (pre, post, parent, tag, text)
VALUES (225, 224, 218, "Instructor", null);

INSERT INTO arizona_tbl (pre, post, parent, tag, text)
VALUES (226, 223, 225, null, "Downey");

INSERT INTO arizona_tbl (pre, post, parent, tag, text)
VALUES (227, 234, 1, "Course", null);

INSERT INTO arizona_tbl (pre, post, parent, tag, text)
VALUES (228, 227, 227, "Time", null);

INSERT INTO arizona_tbl (pre, post, parent, tag, text)
VALUES (229, 226, 228, null, "3:30-4:45");

INSERT INTO arizona_tbl (pre, post, parent, tag, text)
VALUES (230, 229, 227, "Day", null);

INSERT INTO arizona_tbl (pre, post, parent, tag, text)
VALUES (231, 228, 230, null, "TR");

INSERT INTO arizona_tbl (pre, post, parent, tag, text)
VALUES (232, 231, 227, "Place", null);

INSERT INTO arizona_tbl (pre, post, parent, tag, text)
VALUES (233, 230, 232, null, "GLD-S 701");

INSERT INTO arizona_tbl (pre, post, parent, tag, text)
VALUES (234, 233, 227, "Instructor", null);

INSERT INTO arizona_tbl (pre, post, parent, tag, text)
VALUES (235, 232, 234, null, "Barnard");

INSERT INTO arizona_tbl (pre, post, parent, tag, text)
VALUES (236, 243, 1, "Course", null);

INSERT INTO arizona_tbl (pre, post, parent, tag, text)
VALUES (237, 236, 236, "Time", null);

INSERT INTO arizona_tbl (pre, post, parent, tag, text)
VALUES (238, 235, 237, null, "12:30-1:45");

INSERT INTO arizona_tbl (pre, post, parent, tag, text)
VALUES (239, 238, 236, "Day", null);

INSERT INTO arizona_tbl (pre, post, parent, tag, text)
VALUES (240, 237, 239, null, "TR");

INSERT INTO arizona_tbl (pre, post, parent, tag, text)
VALUES (241, 240, 236, "Place", null);

INSERT INTO arizona_tbl (pre, post, parent, tag, text)
VALUES (242, 239, 241, null, "GLD-S 701");

INSERT INTO arizona_tbl (pre, post, parent, tag, text)
VALUES (243, 242, 236, "Instructor", null);

INSERT INTO arizona_tbl (pre, post, parent, tag, text)
VALUES (244, 241, 243, null, "Fong");

INSERT INTO arizona_tbl (pre, post, parent, tag, text)
VALUES (245, 252, 1, "Course", null);

INSERT INTO arizona_tbl (pre, post, parent, tag, text)
VALUES (246, 245, 245, "Time", null);

INSERT INTO arizona_tbl (pre, post, parent, tag, text)
VALUES (247, 244, 246, null, "3:00-4:15");

INSERT INTO arizona_tbl (pre, post, parent, tag, text)
VALUES (248, 247, 245, "Day", null);

INSERT INTO arizona_tbl (pre, post, parent, tag, text)
VALUES (249, 246, 248, null, "MW");

INSERT INTO arizona_tbl (pre, post, parent, tag, text)
VALUES (250, 249, 245, "Place", null);

INSERT INTO arizona_tbl (pre, post, parent, tag, text)
VALUES (251, 248, 250, null, "GLD-S 701");

INSERT INTO arizona_tbl (pre, post, parent, tag, text)
VALUES (252, 251, 245, "Instructor", null);

INSERT INTO arizona_tbl (pre, post, parent, tag, text)
VALUES (253, 250, 252, null, "Kececioglu");

INSERT INTO arizona_tbl (pre, post, parent, tag, text)
VALUES (254, 261, 1, "Course", null);

INSERT INTO arizona_tbl (pre, post, parent, tag, text)
VALUES (255, 254, 254, "Time", null);

INSERT INTO arizona_tbl (pre, post, parent, tag, text)
VALUES (256, 253, 255, null, "11:00-12:15");

INSERT INTO arizona_tbl (pre, post, parent, tag, text)
VALUES (257, 256, 254, "Day", null);

INSERT INTO arizona_tbl (pre, post, parent, tag, text)
VALUES (258, 255, 257, null, "TR");

INSERT INTO arizona_tbl (pre, post, parent, tag, text)
VALUES (259, 258, 254, "Place", null);

INSERT INTO arizona_tbl (pre, post, parent, tag, text)
VALUES (260, 257, 259, null, "GLD-S 701");

INSERT INTO arizona_tbl (pre, post, parent, tag, text)
VALUES (261, 260, 254, "Instructor", null);

INSERT INTO arizona_tbl (pre, post, parent, tag, text)
VALUES (262, 259, 261, null, "Downey");

INSERT INTO arizona_attr (pre, attr, value)
VALUES (2, "Code", "127A");

INSERT INTO arizona_attr (pre, attr, value)
VALUES (11, "Code", "127B");

INSERT INTO arizona_attr (pre, attr, value)
VALUES (20, "Code", "227");

INSERT INTO arizona_attr (pre, attr, value)
VALUES (29, "Code", "245");

INSERT INTO arizona_attr (pre, attr, value)
VALUES (38, "Code", "252");

INSERT INTO arizona_attr (pre, attr, value)
VALUES (47, "Code", "296H");

INSERT INTO arizona_attr (pre, attr, value)
VALUES (56, "Code", "328");

INSERT INTO arizona_attr (pre, attr, value)
VALUES (65, "Code", "335");

INSERT INTO arizona_attr (pre, attr, value)
VALUES (74, "Code", "345");

INSERT INTO arizona_attr (pre, attr, value)
VALUES (83, "Code", "346");

INSERT INTO arizona_attr (pre, attr, value)
VALUES (92, "Code", "352");

INSERT INTO arizona_attr (pre, attr, value)
VALUES (101, "Code", "386");

INSERT INTO arizona_attr (pre, attr, value)
VALUES (110, "Code", "387");

INSERT INTO arizona_attr (pre, attr, value)
VALUES (119, "Code", "422");

INSERT INTO arizona_attr (pre, attr, value)
VALUES (128, "Code", "425");

INSERT INTO arizona_attr (pre, attr, value)
VALUES (137, "Code", "436");

INSERT INTO arizona_attr (pre, attr, value)
VALUES (146, "Code", "445");

INSERT INTO arizona_attr (pre, attr, value)
VALUES (155, "Code", "452");

INSERT INTO arizona_attr (pre, attr, value)
VALUES (164, "Code", "477");

INSERT INTO arizona_attr (pre, attr, value)
VALUES (173, "Code", "492");

INSERT INTO arizona_attr (pre, attr, value)
VALUES (182, "Code", "520");

INSERT INTO arizona_attr (pre, attr, value)
VALUES (191, "Code", "536");

INSERT INTO arizona_attr (pre, attr, value)
VALUES (200, "Code", "553");

INSERT INTO arizona_attr (pre, attr, value)
VALUES (209, "Code", "560");

INSERT INTO arizona_attr (pre, attr, value)
VALUES (218, "Code", "573");

INSERT INTO arizona_attr (pre, attr, value)
VALUES (227, "Code", "577");

INSERT INTO arizona_attr (pre, attr, value)
VALUES (236, "Code", "620");

INSERT INTO arizona_attr (pre, attr, value)
VALUES (245, "Code", "650");

INSERT INTO arizona_attr (pre, attr, value)
VALUES (254, "Code", "695A");


> XML2Rel -d arizona.xml cs4317.srvr studentdb1 stu1 stu1pass
z1234567_arizona_tbl:
4	1	3	null	3:00-3:50
6	3	5	null	MWF
8	5	7	null	M LNG 350
10	7	9	null	Mercer
13	10	12	null	1:00-1:50
15	12	14	null	MWF
17	14	16	null	ECON 110
19	16	18	null	Jacobson
22	19	21	null	10:00-10:50
24	21	23	null	MWF
26	23	25	null	BIO E 100
28	25	27	null	Mercer
31	28	30	null	1:00-1:50
33	30	32	null	MWF
35	32	34	null	BIO W 301
37	34	36	null	Reges
40	37	39	null	9:30-10:45
42	39	41	null	TR
44	41	43	null	KOFFL 218
46	43	45	null	Homer
49	46	48	null	9:30-10:30
51	48	50	null	R
53	50	52	null	GLD-S 701
55	52	54	null	Westbrook
58	55	57	null	9:00-9:50
60	57	59	null	F
62	59	61	null	GLD-S 701
64	61	63	null	Mitchell
67	64	66	null	2:00-3:15
69	66	68	null	TR
71	68	70	null	KOFFL 218
73	70	72	null	Reges
76	73	75	null	2:00-2:50
78	75	77	null	MWF
80	77	79	null	CHEM111
82	79	81	null	Westbrook
85	82	84	null	2:00-2:50
87	84	86	null	MWF
89	86	88	null	CHEM111
91	88	90	null	Westbrook
94	91	93	null	3:30-4:45
96	93	95	null	TR
98	95	97	null	ILC 130
100	97	99	null	Efrat
103	100	102	null	12:30-1:45
105	102	104	null	TR
107	104	106	null	EDUC 353
109	106	108	null	Lenards
112	109	111	null	11:00-12:15
114	111	113	null	TR
116	113	115	null	ILC 119
118	115	117	null	Lenards
121	118	120	null	12:30-1:45
123	120	122	null	TR
125	122	124	null	ILC 137
127	124	126	null	Homer
130	127	129	null	2:00-2:50
132	129	131	null	MWF
134	131	133	null	M LNG 311
136	133	135	null	Degermark
139	136	138	null	2:00-3:15
141	138	140	null	TR
143	140	142	null	GLD-S 701
145	142	144	null	N. Gupta
148	145	147	null	9:30-10:45
150	147	149	null	TR
152	149	151	null	BIOW301
154	151	153	null	Kobourov
157	154	156	null	4:00-4:50
159	156	158	null	MTWF
161	158	160	null	M LNG 311
163	160	162	null	Degermark
166	163	165	null	3:30-4:45
168	165	167	null	TR
170	167	169	null	GLD-S 701
172	169	171	null	Barnard
175	172	174	null	3:00-3:50
177	174	176	null	MF
179	176	178	null	GLS-S 805
181	178	180	null	Homer
184	181	183	null	10:30-11:45
186	183	185	null	MW
188	185	187	null	GLD-S 701
190	187	189	null	Collberg
193	190	192	null	2:00-3:15
195	192	194	null	TR
197	194	196	null	GLD-S 701
199	196	198	null	Gupta, N.
202	199	201	null	9:00-10:15
204	201	203	null	MW
206	203	205	null	GLD-S 701
208	205	207	null	Debray
211	208	210	null	1:30-2:45
213	210	212	null	MW
215	212	214	null	GLD-S 701
217	214	216	null	Moon
220	217	219	null	12:00-1:15
222	219	221	null	MW
224	221	223	null	GLD-S 701
226	223	225	null	Downey
229	226	228	null	3:30-4:45
231	228	230	null	TR
233	230	232	null	GLD-S 701
235	232	234	null	Barnard
238	235	237	null	12:30-1:45
240	237	239	null	TR
242	239	241	null	GLD-S 701
244	241	243	null	Fong
247	244	246	null	3:00-4:15
249	246	248	null	MW
251	248	250	null	GLD-S 701
253	250	252	null	Kececioglu
256	253	255	null	11:00-12:15
258	255	257	null	TR
260	257	259	null	GLD-S 701
262	259	261	null	Downey
1	262	null	arizona	null
2	9	1	Course	null
11	18	1	Course	null
20	27	1	Course	null
29	36	1	Course	null
38	45	1	Course	null
47	54	1	Course	null
56	63	1	Course	null
65	72	1	Course	null
74	81	1	Course	null
83	90	1	Course	null
92	99	1	Course	null
101	108	1	Course	null
110	117	1	Course	null
119	126	1	Course	null
128	135	1	Course	null
137	144	1	Course	null
146	153	1	Course	null
155	162	1	Course	null
164	171	1	Course	null
173	180	1	Course	null
182	189	1	Course	null
191	198	1	Course	null
200	207	1	Course	null
209	216	1	Course	null
218	225	1	Course	null
227	234	1	Course	null
236	243	1	Course	null
245	252	1	Course	null
254	261	1	Course	null
5	4	2	Day	null
14	13	11	Day	null
23	22	20	Day	null
32	31	29	Day	null
41	40	38	Day	null
50	49	47	Day	null
59	58	56	Day	null
68	67	65	Day	null
77	76	74	Day	null
86	85	83	Day	null
95	94	92	Day	null
104	103	101	Day	null
113	112	110	Day	null
122	121	119	Day	null
131	130	128	Day	null
140	139	137	Day	null
149	148	146	Day	null
158	157	155	Day	null
167	166	164	Day	null
176	175	173	Day	null
185	184	182	Day	null
194	193	191	Day	null
203	202	200	Day	null
212	211	209	Day	null
221	220	218	Day	null
230	229	227	Day	null
239	238	236	Day	null
248	247	245	Day	null
257	256	254	Day	null
9	8	2	Instructor	null
18	17	11	Instructor	null
27	26	20	Instructor	null
36	35	29	Instructor	null
45	44	38	Instructor	null
54	53	47	Instructor	null
63	62	56	Instructor	null
72	71	65	Instructor	null
81	80	74	Instructor	null
90	89	83	Instructor	null
99	98	92	Instructor	null
108	107	101	Instructor	null
117	116	110	Instructor	null
126	125	119	Instructor	null
135	134	128	Instructor	null
144	143	137	Instructor	null
153	152	146	Instructor	null
162	161	155	Instructor	null
171	170	164	Instructor	null
180	179	173	Instructor	null
189	188	182	Instructor	null
198	197	191	Instructor	null
207	206	200	Instructor	null
216	215	209	Instructor	null
225	224	218	Instructor	null
234	233	227	Instructor	null
243	242	236	Instructor	null
252	251	245	Instructor	null
261	260	254	Instructor	null
7	6	2	Place	null
16	15	11	Place	null
25	24	20	Place	null
34	33	29	Place	null
43	42	38	Place	null
52	51	47	Place	null
61	60	56	Place	null
70	69	65	Place	null
79	78	74	Place	null
88	87	83	Place	null
97	96	92	Place	null
106	105	101	Place	null
115	114	110	Place	null
124	123	119	Place	null
133	132	128	Place	null
142	141	137	Place	null
151	150	146	Place	null
160	159	155	Place	null
169	168	164	Place	null
178	177	173	Place	null
187	186	182	Place	null
196	195	191	Place	null
205	204	200	Place	null
214	213	209	Place	null
223	222	218	Place	null
232	231	227	Place	null
241	240	236	Place	null
250	249	245	Place	null
259	258	254	Place	null
3	2	2	Time	null
12	11	11	Time	null
21	20	20	Time	null
30	29	29	Time	null
39	38	38	Time	null
48	47	47	Time	null
57	56	56	Time	null
66	65	65	Time	null
75	74	74	Time	null
84	83	83	Time	null
93	92	92	Time	null
102	101	101	Time	null
111	110	110	Time	null
120	119	119	Time	null
129	128	128	Time	null
138	137	137	Time	null
147	146	146	Time	null
156	155	155	Time	null
165	164	164	Time	null
174	173	173	Time	null
183	182	182	Time	null
192	191	191	Time	null
201	200	200	Time	null
210	209	209	Time	null
219	218	218	Time	null
228	227	227	Time	null
237	236	236	Time	null
246	245	245	Time	null
255	254	254	Time	null
z1234567_arizona_attr:
2	Code	127A
11	Code	127B
20	Code	227
29	Code	245
38	Code	252
47	Code	296H
56	Code	328
65	Code	335
74	Code	345
83	Code	346
92	Code	352
101	Code	386
110	Code	387
119	Code	422
128	Code	425
137	Code	436
146	Code	445
155	Code	452
164	Code	477
173	Code	492
182	Code	520
191	Code	536
200	Code	553
209	Code	560
218	Code	573
227	Code	577
236	Code	620
245	Code	650
254	Code	695A

> cat query2.txt
SELECT a.pre, a.post FROM STUDENTID_arizona_tbl a, STUDENTID_arizona_attr b WHERE a.pre 
   IN 
   (SELECT pre FROM STUDENTID_arizona_attr WHERE attr='Code' AND value='227') AND a.pre = b.pre

> XML2Rel -q cs4317.srvr studentdb1 stu1 stu1pass query2.txt
<Course Code="227">
<Time>
10:00-10:50
</Time>
<Day>
MWF
</Day>
<Place>
BIO E 100
</Place>
<Instructor>
Mercer
</Instructor>
</Course>


CRICOS Provider Number: 00098G