Uploaded by Ciaran Gracie

ISYS1001 ISYS5008 2021Mid Term Test Answer Boooklet

advertisement
ISYS1001/5008 Database Systems
Mid-Term Examination 2021
Answer Booklet
CONFIDENTIALITY AGREEMENT – STUDENT
Unit Name: DATABASE SYSTEMS
Unit Number: ISYS1001/ISYS5008
Date & Time of Examination: Thursday September 16th, 2021, 10:00am – 11:30am
I Hereby undertake not to discuss or divulge the content or format of the examination paper with
any other person and declare that I have no prior knowledge of the contents of the assessment
paper.
I unconditionally accept any action that may be taken should Curtin university consider that an
infringement of the statute No. 10 of the Student Disciplinary Statute has occurred.
Student Name: Ciaran Gracie
Student Number: 20174406
Student Lab Group: Tuesday 12:00-2:00
Student Signature: CG
1 of 16
CRICOS Provider Code 00301J
ISYS1001/5008 Database Systems
Mid-Term Examination 2021
Answer Booklet
Question 1 ER Diagrams
[30 Marks]
Part 1
[6 Marks]
Complete Part 1 Answer in the table below
Entity Sets
Tour
Keys
Name
Other Attributes
Duration
Destination
Cost
Starting place
Category
Ticket price
Attraction
Name
Tourist
TouristID
Children
Name
Name
Address
DOB
Contact No.
Age
Region
Name
Name (FK) REF Tour
Category
Name
2 of 16
CRICOS Provider Code 00301J (WA), 02637B (NSW)
ISYS1001/5008 Database Systems
Mid-Term Examination 2021
Answer Booklet
Part 2
[6 Marks]
Complete Part 2 Answer in the table below.
Relationship sets
Between which entity sets
Book
Tourist, Tour
Part-Of
Tour, Region
Interest in
Tourist, Attraction
Part-Of
Attraction, Region
Accompanies
Tourist, Children
Categorised by
Attraction, Category
Attributes of relationship set if
any
Date
Time
3 of 16
CRICOS Provider Code 00301J (WA), 02637B (NSW)
ISYS1001/5008 Database Systems
Mid-Term Examination 2021
Answer Booklet
Part 3
[6 Marks]
Complete Part 3 Answer in the two tables below.
Relationship sets
Book
Cardinality Constraints
Many-Many
Part-Of
One-One
Interest in
One-Many
Part-Of
Many-One
Accompanies
One-Many
One – Many
Categorised By
Relationship sets
Book
Participation Constraints
Tourist – Total
Tour – Partial || Not necessary for each tour to be booked
Part-Of
Tour – Total
Region – Total
Interest in
Tourist – Total
Attraction – Partial
Attraction – Total
Region – Total
Part-Of
Accompanies
Tourist – Partial
Children – Total
Categorised By
Attraction – Total
Category - Partial
4 of 16
CRICOS Provider Code 00301J (WA), 02637B (NSW)
ISYS1001/5008 Database Systems
Mid-Term Examination 2021
Answer Booklet
Part 4
[12 Marks}
Please insert the diagram in the space provided below.
5 of 16
CRICOS Provider Code 00301J (WA), 02637B (NSW)
ISYS1001/5008 Database Systems
Mid-Term Examination 2021
Answer Booklet
Indicate your assumptions and any other relevant information leads to design decisions below.
6 of 16
CRICOS Provider Code 00301J (WA), 02637B (NSW)
ISYS1001/5008 Database Systems
Mid-Term Examination 2021
Answer Booklet
Question 2 ER-Relational Mapping
[20 Marks]
Please provide answer in the space provided below.
7 of 16
CRICOS Provider Code 00301J (WA), 02637B (NSW)
ISYS1001/5008 Database Systems
Mid-Term Examination 2021
Answer Booklet
Question 3 Normalisation
[15 Marks]
Part 1
[3 Marks]
Please provide answer in the space provided below
Two primary keys (pid) and (illness)
Part 2
[12 Marks]
Please provide answers in space provided below. If you create any diagrams, please insert as an
image (please ensure all diagrams are legible).
a)
Not in 1NF, if patient row is deleted, ward information and illness information could be lost.
8 of 16
CRICOS Provider Code 00301J (WA), 02637B (NSW)
ISYS1001/5008 Database Systems
Mid-Term Examination 2021
Answer Booklet
b)
Patient and Illness stay the same. Changes are:
Ward(cward, noBeds, drID)
New Entity : Doctor(drIDU, name)
c)
Relationship is in 3NF.
9 of 16
CRICOS Provider Code 00301J (WA), 02637B (NSW)
ISYS1001/5008 Database Systems
Mid-Term Examination 2021
Answer Booklet
Please add any workings of the question 3 below
10 of 16
CRICOS Provider Code 00301J (WA), 02637B (NSW)
ISYS1001/5008 Database Systems
Mid-Term Examination 2021
Answer Booklet
Question 4
[15 Marks]
Part 1
[3 Mark}
Please provide answer in the space provided below
A composite key is comprised of multiple attributes that are used to uniquely identify an entry in an
Entity, where one attribute would not be sufficient in uniquely identifying said entry.
StudentID and student EnrollNo are the two primary keys and are therefore a composite key for the table
Part 2
[3 Marks]
Please provide answer in space provided below
A superkey is a combination of attributes that are used to uniquely identify a database record. A
superkey can contain attributes that are not necessary for unique identification.
A key is either a single or combination of multiple fields with the intended function of the fields is to
access/retrieve entries from a table according to the set requirement(s).
Part 3
[3 Marks]
Please provide answer in space provided below
P and S are the two unique identifiers from relation R, and therefore they become the super key(P,S)
11 of 16
CRICOS Provider Code 00301J (WA), 02637B (NSW)
ISYS1001/5008 Database Systems
Mid-Term Examination 2021
Answer Booklet
Part 4
[6 Marks]
Please provide answer in space provided below
Please add any other workings for question 4 here
12 of 16
CRICOS Provider Code 00301J (WA), 02637B (NSW)
ISYS1001/5008 Database Systems
Mid-Term Examination 2021
Answer Booklet
[20 Marks]
Question 5
Part 1
[9 Marks]
Please provide answer in spaces provided below
a)
Find students whose course contains the phrase “Eng” and where state is not WA. Address variables are
shown under title “Address”
b)
Name
John White
Mia May
Address
22, Hay Street, Bentley.
3 Tudor Avenue, Ascot Park.
regYear
2018
2019
c)
Insert Into Students
Values(1120957, Ciaran Gracie, null, null, null, WA, Software Engineering, null);
13 of 16
CRICOS Provider Code 00301J (WA), 02637B (NSW)
ISYS1001/5008 Database Systems
Mid-Term Examination 2021
Answer Booklet
Part 2
[11 Marks]
Please provide answer in spaces provided below
a)
Different result, table name is case sensitive, therefore they are different tables.
b)
Different result. Date format is different ‘%m’ vs “%M”, moth will be full word with M but the short version
with m. Aug vs August
14 of 16
CRICOS Provider Code 00301J (WA), 02637B (NSW)
ISYS1001/5008 Database Systems
Mid-Term Examination 2021
Answer Booklet
c)
Result from query is the same, just the order in which the publisher’s appear changes.
15 of 16
CRICOS Provider Code 00301J (WA), 02637B (NSW)
ISYS1001/5008 Database Systems
Mid-Term Examination 2021
Answer Booklet
Please add any other workings here
END OF ASSESSMENT
16 of 16
CRICOS Provider Code 00301J (WA), 02637B (NSW)
Download