CS482/CS502 – Final Exam

8:00 – 10:10 am

December 7, 2006

TL-Mobile, a new phone company, would like to create a database about its (current or potential) customers by developing a web site to collect personal information (interest and habit). TL-Mobile would like to deploy the application using XML-technologies. To achieve its goal, TL-Mobile develops a front-end for displaying its products and getting customers’ inputs. The inputs from customers will be stored and used for marketing purpose. The front-end consists of two pages:

• Phones and Plans: this page displays the information related to the phones and the plans offerred by the company. In particular, it displays the following information

– for each phone: the model (alpha-numeric string, which is unique), product number, producer, and price; and

– for each plan: plan code (which is unique), minutes, cost, number of lines, special features.

• Comment: this page displays a form in which a customer would fill in the folloing information: ID (an integer, which is unique), Name (First, Last, Middle), Address (Street, City, State, Zip), Phone number, Plan of interest (or used), Phone to buy, Time stamp (Date and Time), and Question/Comment. The information will be stored as soon as the customer submits it. Note that before accessing this form, the customer will need to register and obtain an unique ID from the web site. For simplicity, let us assume that each customer already obtains her unique ID. Note also that a customer cannot submit two questions/comments at the same time.

Answer the following to help TL-Mobile.

1. Create the necessary XML-Schema for the two forms that the company develops. Use commonsense to decide about the properties of each piece of information that needs to be stored. If you need to make an assumption about something, state it clearly.

2. Assume that the information is stored in accordance with your XML schema. Write a XML queries that displays the comments/questions that customers from the city of Las Cruces have submitted during the period from September 01, 2006 to December 01, 2006. (You can assume that a Boolean comparison between the time stamp and a date, denoted by ≤, can be made and is available for use).