Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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

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. Division (DID, DNAME, LOCATION) The company has several divisions identified by DID. Each division has a name (DNAME) and a location (LOCATION) Project (PID, PNAME, BUDGET, DID) Each project has an identifier PID, a name (PNAME), a budget (BUDGET) and belongs to a division which is in the Division table. Employee (EID, ENAME, OFFICE, BIRTHDATE, SALARY, DID) Each employee has an identifier EID, a name (ENAME), an office room (OFFICE), a birth date (BIRTHDATE), a salary (SALARY) and belongs to a division which is in the Division table. Assign (PID, EID, HOURS) Each employee may be assigned to one or more projects that belong to the same division as the employee. Each project has one or more employees. The number of hours is recorded. The domains for each of the attributes are: Division DID 3 character string Unique identifier for the division. DNAME Up to 20 characters Unique name of the division. LOCATION Up to 30 characters Location of the division. Project PID 4 character string Unique identifier for the project. PNAME Up to 40 characters Name of the project. BUDGET 8 digit number Budget of the project. DID 3 character string Identifies the division which the project belongs to. Employee EID 6 character string Unique identifier for the employee. ENAME Up to 30 characters Name for the employee. OFFICE Up to 6 characters Office room number. BIRTHDATE Date Birth date of the employee. SALARY 6 digit number Salary of the employee. DID 3 character string Identifies the division which the employee belongs to. Assign PID 4 character string Identifies the project. EID 6 character string Identifies the employee. HOURS 4 digit number Hours the employee has worked for the project. You are required 2.1 Design a proper DTD called company.dtd for the information given by 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. 2.2 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.

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Managerial Accounting Tools for Business Decision Making

Authors: Jerry J. Weygandt, Paul D. Kimmel, Donald E. Kieso, Ibrahim M. Aly

4th Canadian edition

1118856996, 978-1118856994

More Books

Students also viewed these Databases questions

Question

When do you think a hiring decision will be made?

Answered: 1 week ago