Reference no: EM132422219
COS60009 - Data Management for the Big Data Age - Swinburne University of Technology
Assignment Description
This is an individual assignment. Students are referred to the Faculty's policy on plagiarism. The aim of this assignment is to develop skills to use XML (and JSON) to design and query semi-structured data, and to evaluate the difference between document- based NoSQL databases and SQL databases.
Task 1: XML and DTD
A simple database for a company is described below:
The database is part of a company information system, and contains four tables; Division describing the divisions of the company, Project describing the projects within the divisions, Employee containing information about employees within the divisions, and Assign describing employees' involvement in projects. The schema for each of the tables is shown below, with the primary key attributes underlined, the foreign key attributes in italic font, and some more information about each table.
You are required
Design a proper DTD called company.dtd for the above relational database schema. The valid XML documents under this DTD must have a tree structure with as much nesting as possible. The DTD must also capture all the primary key and foreign key constraints.
Populate an XML document called company.xml by referring company.dtd. It has at least 2 divisions. Each division has at least 2 projects and 3 employees. Each project has at least 2 employees in the same division working on it, and each employee works for at least 1 project. You are required to use company.dtd to validate company.xml externally. The domains for all attributes described above can be used to input values of attributes.
Task 2: XPath and JSON
For the XML document classes.xml shown below, write the XPath expressions for the following queries.
a) Find titles of all classes.
b) Find the classID of all classes with "Doug" as an instructor.
c) Find titles for those classes with "yes" in attribute req of credits.
d) Find titles for those classes with more than one instructor.
Convert the XML document classes.xml to its JSON format.
Attachment:- Data Management for the Big Data Age.rar