Reduce the class diagram to those classes and attributes


From UML to XML and JSON

Scenario

The following class diagram represents part of the data model of a service for supporting placements of students with companies, including students' and companies' addresses and the contact details of their supervisors.

1012_Design and validate a JSON data.png

In order to support students in finding a placement we would like provide students with information on suitable companies. For this purpose, we ask the service for a list of all students, in which each student is related to all companies based in their city of residence. This information will be sent by the service in a single text file.

Since the overall numbers of both students and companies may be large, we would like to minimise redundancy and keep file size as small as possible. You are requested to design XML and JSON data formats to support such a download.

Assignment

XML Data Format: Derive and test a DTD following these steps.

1. Reduce the class diagram to those classes and attributes, associations and cardinalities required by the scenario. Justify for every element of the class diagram your decision to keep or drop it, always referring to the requirements of the scenario.

2. Create an XML­ specific class diagram and justify the chosen document structure using the requirements from the scenario.

3. Derive the DTD and justify the style of mapping for the attributes you have chosen. Is the mapping from the class diagram in 2 to the DTD data preserving? Please justify your answer, and if the mapping is not data preserving, provide a valid object diagram or XML instance as a counterexample.

146_Design and validate a JSON data1.png

As an alternative to the use of XML, design and validate a JSON data.

4. From the object diagram above create a JSON representation with the relevant data content as required by the scenario. What is the structure of this mapping? Does it avoid redundancy or lead to small files?

5. Validate your JSON at https://som­research.uoc.edu/tools/jsonDiscoverer/#/simple using the online tool to create a class diagram. Copy the generated class diagram into your submission document and compare it to the given class diagram above, justifying any differences based on the requirements from the scenario.

6. Following the examples and instructions at https://json­schema.org/examples.html

Create a JSON schema such that the JSON you produced in 4 becomes a valid instance.

Submit the JSON schema as part of your CW document and validate the conformance of your JSON to this scheme at  https://jsonschemalint.com/draft4/.1

Copy a screenshot of the validation report as confirmation.

Solution Preview :

Prepared by a verified Expert
Computer Engineering: Reduce the class diagram to those classes and attributes
Reference No:- TGS01285169

Now Priced at $120 (50% Discount)

Recommended (97%)

Rated (4.9/5)