Assignment 3

Mapping XML to a Relational Database
Due Date: April 20th, 2009


There are different ways of mapping an XML document into a relational database.
We use the PRE/POST/LEVEL 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 | level | tag  |    text
------------------------------------------
 1  |   4   |   1   | "a"  |    null
 2  |   2   |   2   | "b"  |    null
 3  |   1   |   3   | null | "Hello World"
 4  |   3   |   2   | "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).
Furthermore, you may assume that the XML file has only ASCI characters and no character references.
The PRE/POST/LEVEL-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/LEVEL-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	1	book	null
2	2	2	title	null
3	1	3	null	TCP/IP Illustrated
4	7	2	author	null
5	4	3	last	null
6	3	4	null	Stevens
7	6	3	first	null
8	5	4	null	John
9	9	2	publisher	null
10	8	3	null	Addison-Wesley
11	11	2	price	null
12	10	3	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,
  level 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, level, tag, text)
VALUES (1, 12, 1, "book", null);

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

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

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

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

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

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

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

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

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

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

INSERT INTO book_tbl (pre, post, level, tag, text)
VALUES (12, 10, 3, 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       3       null    TCP/IP Illustrated
6       3       4       null    Stevens
8       5       4       null    John
10      8       3       null    Addison-Wesley
12      10      3       null    65.95
4       7       2       author  null
1       12      1       book    null
7       6       3       first   null
5       4       3       last    null
11      11      2       price   null
9       9       2       publisher       null
2       2       2       title   null
z1234567_book_attr:
11      currency        USD
1       isbn    1-2345-6789-0
1       year    1994

> cat query1.txt
SELECT pre, post FROM 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.
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. Both "stu1" and "stu2" can be used
to connect to both "studentdb1" and "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));
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!
Feel free to choose how to print the XML (one single line, one line per item, pretty print (see assignment 1), as in the original, ..)
Preferably, print it 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 table_name, table_name, ..
WHERE condition

or
SELECT pre, post FROM table_name, 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 tableName to yourStudentID_tableName.

For example:
  yourStudentID=z1234567 (preceded by 'z')
  xmlfile=book (without extensions)
  query="SELECT pre,post FROM 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"

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.

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

> XML2Rel -q cs4317.srvr student student student 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