CSE 532 Theory of Database System
Spring 2005 Project Page



Announcements:

 

 

 

 

 

 

 

  1. A detailed project document (including the Entity-Relationship (ER) design and the diagram, a clear description of the database scheme, description of integrity constraints, XQuery statements for each query listed and the executed results in eXist DBMS, and your group work load partition).
  2. XML Schema file and XML file.
  3. Queries code in an editable format (.txt or .doc).

 

 

 

 

 

 

All groups are reqired to submit the following document before March, 20th.

1. A detailed project document. The document should include:

2. XML Schema file and XML file

3. Queries code in an editable format (txt or doc, no pdf!)


1. First based on project-data, design schema carefully with constraints. You MUST include ALL information in your database system. You can write it in a simple editor, or you can use XMLSpy. Then put all data into an XML file.

2. Now try to use XMLSpy to validate that your XML file conform to your schema.

3. Write queries required in the project, and queries for constraints that cannot be included in XML schema file. Try these queries in eXist DBMS to get correct results.

 

 

 

 



XMLSpy -- an XML development environment:

    XMLSpy can be downloaded from http://www.altova.com/. You can choose to download a Professional-Edition, Home-Edition or even Enterprise-Edition. Home Edition is FREE, and it is enough for our project. For other editions, new customers can request a free 30-day evaluation key-code from within the application.

    In this project, you can use XMLSpy to:

  1. Write XML schema:  There are very convenient graphic tool in XMLSpy.
  2.  Write XML file.
  3. Validate XML file according to schema.

       Please read XMLSpy Tutorial (pdf, chm) and XMLSpy User-Reference during this weekend. They will help you get familiar with the software as quickly as possible.



eXist -- an XML database that supports XQuery and other things:

    Information for eXist can be found here: http://exist.sourceforge.net . And there is a Quick Start Guide. 

1.        Download and install: If you want to download it and install it on your own computer, stable version of installer eXist-1.0b2.jar is recommended. After you download it, simply click on the jar file icon, or run it with java –jar eXist-1.0b2.jar. After installation, you can easily access help documentations on your computer. In graduate lab, eXist can also be installed in your H drive. Remember to make sure that you have enough space left before installation.

2.        Load XML files and execute Xqueries: have a look at Quick Start Guide and XQuery Docs.Notice that eXist doesn’t support query on document fragments constructed within the XQuery, i.e. a query like the following will fail:

                               let $x := <test>Test</test> return $x/test.

You have to store the fragment into the database first. Look at Manipulating Database Contents for example. You can use the provided xmldb extension functions for that.



Frequently Asked Questions:

 

1) For query 2, what is the definition of "largest audience"?

Highest box-office.

 

2) When you mention "actor", such as query 3,do you mean male actors or both male and female actors? same question for directors, do you mean both male and female directors, unless otherwise specified?

Actor ONLY means male performer here while actress only means female performer. However, director has no specific meaning of male or female and should include both.

 

3) When you mention "box office", such as query 6, do you mean combined box office for the same movie?

Yes.

 

4) Should we assume that the names of actors and directors is always CAPITALIZED and is a single string? Same question for the company name FOX.

I won't be strict at whether you use capital or not. Both are okey once you return the correct result of your queries. But do NOT use "actor1", "director2" and "company3", etc. I want the names. Whether or not to use a single string is decided all by yourself in the schema design.

 

5) Does awards have a special designation, such as best actor/director, or each person affiliated with an award winning movie is given that award? For example if movie M wins an award A, does each actor and director affiliated with M get A?

No. Movie wins award for itself. Actor/Director wins award for themselves. They do not have to be affiliated with each other. A movie can win award even only for its music or costume while the director or actor(s) is/are not good at all.

 

6) Should we assume that no two movies can have the same name?

Sure no two movies have the same name in this project. totally 12 movies in our project.

 

7) In Homework#2 question 3, for EDB GraphEdges, if theres an edge between nodes n1 & n2 in a graph G1, then does it mean that both entries (G1, n1, n2) AND (G1, n2, n1) are present ?

NO. Because here assume that the given graphs are DAG, all edges are DIRECTED.

 

8) How to Create a Zip File

zip cse532yourSBID.zip file1 file2 file3 ..etc.

To create the zip file containing the files to submit:

  1. Make sure you have WinZIP installed.
  2. Locate the files you want to submit using Windows Explorer.
  3. Select the files using Ctrl+left mouse button.
  4. With the mouse over one of the selected files, from the popup menu select the WinZIP -> Add files to zip... option.
  5. Enter an appropriate name for the zip file in the requester that pops up. Try to use "cse532your SBID" as your zip file name.
  6. Okay the requester, this should start the packing process.
  7. Submit the zip file this operation creates.

 


Useful links:


Last updated on May 15, 2005 by Zhiquan Gao