Microsoft Word - DPIT115 Assignment 2 - Autumn XXXXXXXXXXFINAL.docx
DPIT115 Data Management and Security Final Assessment (Assignment 2)
Page 1 of 9
Diploma of Information Technology
DPIT115 Data Management and Security
Final Assessment (Assignment 2)
Autumn Session 2020
This exam represents 40% of the total subject marks
_______________________________________________________________________________
Due Date: 7 June 2020, 11:55 PM
________________________________________________________________________________________
DIRECTIONS TO STUDENTS
1. All questions are to be attempted
2. Total number of questions: 7 (SEVEN)
3. This is an individual assessment
4. All questions are to be answered by you without assistance from other people
5. This assessment requires you to submit only one Microsoft Word document
6. Do not include the questions in your answer
7. Your submission will be checked for uniqueness using Turnitin
8. Use your own words, provide your own examples and draw your own diagrams.
9. Show your solution as well as the steps taken to answer the questions
10. Submit your solution to Moodle by the due date.
If it is suspected that you have accessed or received additional assistance from another person, the
matter will be investigated as an alleged
each of the UOW College Academic Integrity and Student
Conduct Policy, in accordance with the Procedure for Managing Alleged Student Misconduct.
Please note, as part of this investigation, you may be required to undergo an oral examination to
verify your understanding of the assessment content.
DPIT115 Data Management and Security Final Assessment (Assignment 2)
Page 2 of 9
QUESTIONS 3, 4, 5, 6 and 7 REFER TO THE RELATIONAL TABLES
LISTED BELOW
CREATE TABLE EMPLOYEE(
ENUM DECIMAL(12) NOT NULL, /* Employee number */
FNAME VARCHAR(50) NOT NULL, /* First name */
LNAME VARCHAR(50) NOT NULL, /* Last name */
DOB DATE NULL, /* Date of birth */
CONSTRAINT EMPLOYEE_PKEY PRIMARY KEY(ENUM) );
CREATE TABLE DRIVER(
ENUM DECIMAL(12) NOT NULL, /* Employee number */
LNUM DECIMAL(8) NOT NULL, /* Driving license number */
STATUS VARCHAR(10) NOT NULL, /* Driver status */
CONSTRAINT DRIVER_PKEY PRIMARY KEY(ENUM),
CONSTRAINT DRIVER_UNIQUE UNIQUE(LNUM),
CONSTRAINT DRIVER_FKEY FOREIGN KEY(ENUM) REFERENCES EMPLOYEE(ENUM),
CONSTRAINT DRIVER_STATUS CHECK (
XXXXXXXXXXSTATUS IN ('AVAILABLE', 'BUSY', 'ON LEAVE')) );
CREATE TABLE TRUCK(
REGNUM VARCHAR(10) NOT NULL, /* Registration number */
CAPACITY DECIMAL(7) NOT NULL, /* Capacity */
WEIGHT DECIMAL(7) NOT NULL, /* Weight */
STATUS VARCHAR(10) NOT NULL, /* Present status */
CONSTRAINT TRUCK_PKEY PRIMARY KEY(REGNUM),
CONSTRAINT TRUCK_STATUS CHECK
XXXXXXXXXXSTATUS IN ('AVAILABLE', 'USED', 'MAINTAINED')),
CONSTRAINT TRUCK_WEIGHT CHECK
XXXXXXXXXXWEIGHT > 0.0 AND WEIGHT < 500 ),
CONSTRAINT TRUCK_CAPACITY CHECK
XXXXXXXXXXCAPACITY > 0.0 AND CAPACITY < 100 ) );
CREATE TABLE TRIP(
TNUM DECIMAL(10) NOT NULL, /* Trip number */
LNUM DECIMAL(8) NOT NULL, /* Driving license number */
REGNUM VARCHAR(10) NOT NULL, /* Truck registration number */
TDATE DATE NOT NULL, /* Trip date */
CONSTRAINT TRIP_PKEY PRIMARY KEY (TNUM),
CONSTRAINT TRIP_CKEY UNIQUE (LNUM, REGNUM, TDATE),
CONSTRAINT TRIP_FKEY1 FOREIGN KEY (LNUM) REFERENCES DRIVER(LNUM),
CONSTRAINT TRIP_FKEY2 FOREIGN KEY (REGNUM) REFERENCES TRUCK(REGNUM) );
CREATE TABLE TRIPLEG(
TNUM DECIMAL(10) NOT NULL, /* Trip number */
LEGNUM DECIMAL(2) NOT NULL, /* Leg number */
DEPARTURE VARCHAR(30) NOT NULL, /* Departure city */
DESTINATION VARCHAR(30) NOT NULL, /* Destination city */
CONSTRAINT TRIPLEG_PKEY PRIMARY KEY (TNUM, LEGNUM),
CONSTRAINT TRIPLEG_UNIQUE UNIQUE(TNUM, DEPARTURE, DESTINATION),
CONSTRAINT TRIPLEG_FKEY1 FOREIGN KEY (TNUM) REFERENCES TRIP(TNUM) );
DPIT115 Data Management and Security Final Assessment (Assignment 2)
Page 3 of 9
QUESTION 1 (10 marks)
Read and analyse the following specification of a sample database domain.
A University would like to create a database to record information about some of its activities.
The university offers a number of degrees to students. A degree is described by a unique name, the total
number of credit points required to complete a degree, and several requirements that must be satisfied by
the future students. The university offers three types of degrees: undergraduate degrees, postgraduate
degrees, and graduate certificate. Postgraduate degrees are available only for the students who have
already completed an undergraduate degree. A description of a postgraduate degree includes a list of
acceptable undergraduate degrees. A description of a graduate certificate includes a requirement on the
total number of years of professional experience.
Each degree consists of an ordered sequence of subjects. A description of a subject consists of its number
in a sequence and unique code, unique title, total number of credits points a subject is worth, and a list of
learning objectives.
The university employs academic staff members, tutors and support staff members. A common description
of a university employee consists of a unique employee number, first name last name and date of birth.
First name, last name and date of birth uniquely identified each employee. Additionally, academic staff
members and tutors are described by an academic degree achieved. Support staff members are described
y a list of qualifications acquired in the past together with a date when each qualification has been
acquired.
The university assigns the academic staff members and tutors to the subjects. A subject has one or two
academic members assigned and a number of tutors. Academic staff members and tutors can be assigned
to many subjects. Support staff members are assigned to the degrees. Each support staff member is
assigned to one degree, and a degree has one or more support staff members assigned.
The university is divided into faculties and faculties are divided into schools. Academic staff members and
tutors belong to one school, and each school consists of many academic staff members and tutors. The
faculties and schools are described by the unique names. The university records information when the
academic staff members and tutors first join the schools. The university also keeps the information about
the former employees who worked at the university in the past. A description of a former employee is the
same as a cu
ent employee, and additionally, it includes a hire date and end of employment date.
(1) Draw a conceptual schema for the specification of a database domain listed above. Use the
notation of UML simplified class diagrams explained to you during this subject. Note: you are not
allowed to use any artificial identifiers and any attributes that are not mentioned in the specification.
Use UMLet to draw the schema and paste images of your drawings into your Microsoft Word
document. Add your name, student number and the date to your diagram. There is NO NEED to
provide a detailed analysis of how a conceptual schema has been created. The final conceptual
schema expressed in the UML simplified notation classes is subject is sufficient.
XXXXXXXXXXmarks)
Add two (2) new object classes with at least three (3) attributes each and appropriate associations.
The choice of object classes, attributes and associations are up to you; however, these should
elate to the existing scenario.
Use UMLet to draw the changes to the schema and paste the second diagram into your Microsoft
Word document. Write a text description that explains the additional objects, attributes and
associations below the diagram XXXXXXXXXXmarks)
DPIT115 Data Management and Security Final Assessment (Assignment 2)
Page 4 of 9
QUESTION 2 (10 marks)
Consider the conceptual schema given below.
Your task is to perform the steps of logical database design, i.e. to transform a conceptual schema given
above into a collection of relational schemas.
Before transforming add the attribute ‘date-made’ to the BUS class and ‘home-city’ to the DRIVER class.
Draw the resulting conceptual schema adding your name, student number and the date to the drawing. Use
UMLet and paste images of your drawings into your Microsoft Word document.
For each relational schema clearly list the names of attributes, primary key, candidate keys (if any), and
foreign keys (if any). Assume that an association method must be used to implement the generalization.
Show your working as you step through the process of the transformation.
DPIT115 Data Management and Security Final Assessment (Assignment 2)
Page 5 of 9
QUESTION 3 (8 marks)
Write the data definition statements of SQL that modify the structures of a database listed on page 2 of this
assessment in the way described below.
Note, that some of the modification may require more than one data definition statements of SQL
statement.
(1) Modify the consistency constraint of the sample database such that after the modification, it is
possible to record in the database information about the trucks that have a capacity up to and
including 220.
(2 marks)
(2) Modify the structure and consistency constraint of the sample database such that after the
modification, it is possible