Wednesday, April 28, 2010

Solutions to Exam #2 problems

http://www.cse.buffalo.edu/~chomicki/462/t2-sols.pdf

Monday, April 26, 2010

Project #2 deadline

The deadline is Tuesday, April 27, 8:00am.

Friday, April 23, 2010

Recitation #13 Slides

The slides for the thirteenth (rD) recitation are available through the link below.

http://www-student.cse.buffalo.edu/~dlessa/cse462-SP10/rD.pdf

Monday, April 19, 2010

Project #2 Extra Credit: Relational Schema

If you are providing a solution for the extra credit problem, use this script to create your schema in Oracle. Note: since we are providing the schema creation script, you no longer need to include it in your submission!


CREATE TABLE ROOT(
id INT NOT NULL PRIMARY KEY
);

CREATE TABLE NODE(
id INT NOT NULL PRIMARY KEY,
label VARCHAR(200) NOT NULL,
left INT NOT NULL,
right INT NOT NULL,
CONSTRAINT ck_left_right CHECK (left <= right)
);

CREATE TABLE TEXT(
id INT NOT NULL PRIMARY KEY REFERENCES NODE(id),
textValue VARCHAR(2000)
);

CREATE TABLE ATTRIBUTE(
id INT NOT NULL REFERENCES NODE(id),
attribute VARCHAR(200) NOT NULL,
textValue VARCHAR(2000),
CONSTRAINT pk_attribute PRIMARY KEY(id, attribute)
);

Sunday, April 18, 2010

Project #2 Submission Instructions

You should submit a single file named project2.zip using the submit_cse462 command. The structure of the compressed file should be as follows:
1) problem1 subfolder for Problem 1 containing:
  • XQuery files: Q1.xq, Q2.x1, Q3.xq, and Q4.xq
  • XML result files: Q1.xml, Q2.xml, Q3.xml, and Q4.xml
  • EITHER phd.xml file with embedded DTD
  • OR phd.xml and phd.dtd
2) optional problem2 subfolder for Problem 2 containing:
  • Java file: XMLToRelational.java
  • Inserts file: insert.sql
  • SQL files: Q1.sql, Q2.sql, Q3.sql, and Q4.sql
  • Result files: Q1.txt, Q2.txt, Q3.txt, and Q4.txt
A sample zip file with this structure is available at:

http://www-student.cse.buffalo.edu/~dlessa/cse462-SP10/project2.zip

Friday, April 16, 2010

Recitation #12 Slides

The slides for the twelfth (rC) recitation are available through the link below.

http://www-student.cse.buffalo.edu/~dlessa/cse462-SP10/rC.pdf

Wednesday, April 14, 2010

PhD dissertation defence

 If you are interested in database research in our department, you may want to attend the following:

PhD Dissertation Defense

Xi Zhang

224 Bell Hall
Friday, April 16, 2010, 10am

Committee
Professor Jan Chomicki (Chair)
Professor Hung Q. Ngo
Professor Michalis Petropoulos


Title: Probabilities and Sets in Preference Querying

Abstract:

User preferences in databases are attracting increasing
interests with the boom of information systems and the trend of
personalization. In the literature, there are two different frameworks
dealing with this topic, namely quantitative approaches and qualitative
approaches. The former assume the availability of a scoring function,
while the latter do not. Instead, in qualitative approaches,
preferences are expressed using preference formulas. We investigate
three advanced topics on preferences stemming from those frameworks.

First, we study top-k queries over uncertain data in the quantitative
framework. We formulate three intuitive semantic properties for top-k
queries in probabilistic databases, and propose Global-Topk query
semantics which satisfies them to a great degree. We also design
efficient dynamic programming algorithms for query evaluation.

Second, we observe that so far all work on top-k queries in
probabilistic database focus on ordinal scores, while there are
applications where cardinal scores are more appropriate. This
motivates our work on preference strength, where we consider the
magnitude of score in addition to the order it establishes over
tuples.

Finally, as a counterpart to the top-k query in the quantitative
framework, we explore the set preference problem in the qualitative
framework. Observing the fact that preferences can also be collective
in this case, our goal is to tackle this second-order problem with
first-order tools. We propose a logical framework for set
preferences. Candidate sets are represented using profiles consisting
of scalar features. This reduces set preferences to tuple preferences
over set profiles.  We also propose algorithms to compute the "best"
sets effectively.

New handout: Integrity and Security

http://www.cse.buffalo.edu/~chomicki/462/handout-constraints.pdf

Monday, April 12, 2010

Saxon on nickelback/timberlake

The Saxon library is now available from the CSE systems:

/util/saxonhe/saxon9he.jar

In the examples given below, just change the -cp parameter in the call to Java to reflect the location of the library.

Project #2: changes

The relational representation of XML documents has been modified by introducing separate
relations for text and attribute values.
Please see the updated project description:

http://www.cse.buffalo.edu/~chomicki/462/proj2.pdf

Saturday, April 10, 2010

Project #2 Extra Credit: DOM API

For the extra credit problem in project #2, you MUST use the Apache Xerces2 library. The pages of interest are:

Home Page: http://xerces.apache.org/xerces2-j/
Java Docs: http://xerces.apache.org/xerces2-j/javadocs/api/
Download: http://archive.apache.org/dist/xml/xerces-j/

Make sure you download the 2.9.0 binary version of Xerces2 for Java: Xerces-J-bin.2.9.0.zip (or tar.gz). The library comes with a samples folder containing a number of examples for using DOM. I strongly suggest that you look at the code under both samples/dom and samples/ui. The distribution also includes a copy of the java docs.

I'm also linking to an example showing you how to traverse and print a DOM tree:

http://idevelopment.info/data/Programming/java/xml/XercesXmlDomExample.java

If you want to use the original DatabaseInventory.xml file, you can download it from here:

http://www.idevelopment.info/data/Programming/java/xml/ExampleXMLandDTDFile.html

Project #2 XML File

The phd.xml file for project #2 is available for download:

http://www-student.cse.buffalo.edu/~dlessa/cse462-SP10/phd.xml

Friday, April 9, 2010

Recitation #11 Slides

The slides for the eleventh (rB) recitation are available through the link below.

http://www-student.cse.buffalo.edu/~dlessa/cse462-SP10/rB.pdf

The files used in the recitation are also available for download:

http://www-student.cse.buffalo.edu/~dlessa/cse462-SP10/xquery-files.zip

The Saxon library used in the recitation is available for download from:

http://saxon.sourceforge.net/#F9.2HE

Make sure you chose the Download for Java link. All you need from the download is the saxon9he.jar file. To run an XQuery file named Q1.xq using Saxon, use the following command:

> java -cp ./saxon9he.jar net.sf.saxon.Query Q1.xq

This assumes that the saxon9he.jar file is in the current directory. If the library is in a folder called /some/folder, then you would use:

> java -cp /some/folder/saxon9he.jar net.sf.saxon.Query Q1.xq

This works under Unix/Linux. For other systems, it's a simple matter of adapting the cp parameter.

Thursday, April 8, 2010

Recitation #9 and #10 Slides

The slides for the ninth (r9) and tenth (rA) recitations are finally available through the links below. Sorry for the delay.

http://www-student.cse.buffalo.edu/~dlessa/cse462-SP10/r9.pdf
http://www-student.cse.buffalo.edu/~dlessa/cse462-SP10/rA.pdf

Monday, April 5, 2010

Project #2 (due April 26, 2010)

http://www.cse.buffalo.edu/~chomicki/462/proj2.pdf

No deadline extensions.