CMSC 508
Database Theory
Homework 8
Due: April 20
1. Refer back to homework 7. Do some research and answer question 1 for xml databases.
2. Now answer it for Network databases.
The remaining questions refer to a CODSYL Network database with the following structure:
Suppose we have the following record types:
COMPANY (CNAME, CADDR)
STOCK (SH_NO, QUANTITY)
PERSON (PNAME, PADDR)
Let there also be the following DBTG sets:
EMP, with member PERSON and owner COMPANY, indicating the employees of a company.
OWNS, with member STOCK and owner PERSON, indicating which person owns which stock certificates.
ST_CO, with member STOCK and owner COMPANY, indicating the company to which a stock certificate pertains.
Assume we can "FIND" these using keys CNAME, SH_NO, and PNAME, respectively.
1. Write the schema definition for this database.
2. Write psuedocode programs that use the query language given in class to do the following: