Online exam

profileZakir
EX03170_HIT326_1F_18.pdf

WARNING

This material has been reproduced and communicated to you by or on behalf of Charles Darwin University in accordance with section 113P of the Copyright Act 1968 (Act).

The material in this communication may be subject to copyright under the Act. Any further reproduction or communication of this material by you may be the subject of copyright

protection under the Act.

Do not remove this notice

Semester 1, 2018 FINAL EXAMINATION Page 1 of 6 HIT326 – Database-Driven Web Applications

THIS EXAMINATION PAPER AND SUPPLIED MATERIALS ARE NOT PERMITTED TO BE REMOVED FROM ANY EXAMINATION VENUE IN ANY CIRCUMSTANCE. THIS EXAMINATION IS PRINTED DOUBLE-SIDED.

Charles Darwin University Final Examination

HIT326 – Database-Driven Web Applications

DURATION

Reading Time: 10 minutes

Writing Time: 120 minutes

INSTRUCTIONS TO CANDIDATES

The examination has one section. ALL questions must be answered on the Answer Booklet provided. Please ensure that your name and student number are clearly indicated on your Answer Sheet and at the top of this examination paper.

 Read ALL questions carefully.

 Do not commence writing until instructed to do so.

 Total marks - 100 marks.

EXAM CONDITIONS

You may begin writing from the commencement of the examination session. The reading time indicated above is provided as a guide only.

This is a RESTRICTED OPEN BOOK examination

No calculators are permitted

One A4 sheet of handwritten single-sided notes permitted

Hard copy, unannotated English translation dictionary only

ADDITIONAL AUTHORISED MATERIALS EXAMINATION MATERIALS TO BE SUPPLIED

No additional printed material is permitted

1 x 20 Page Book 1 x Scrap Paper

Family Name

Given Name/s

Student Number

Teaching Period Semester 1, 2018

Semester 1, 2018 FINAL EXAMINATION Page 2 of 6 HIT326 – Database-Driven Web Applications

THIS EXAMINATION PAPER AND SUPPLIED MATERIALS ARE NOT PERMITTED TO BE REMOVED FROM ANY EXAMINATION VENUE IN ANY CIRCUMSTANCE. THIS EXAMINATION IS PRINTED DOUBLE-SIDED.

THIS EXAMINATION IS PRINTED

DOUBLE-SIDED.

THIS PAGE HAS BEEN INTENTIONALLY

LEFT BLANK.

Semester 1, 2018 FINAL EXAMINATION Page 3 of 6 HIT326 – Database-Driven Web Applications

THIS EXAMINATION PAPER AND SUPPLIED MATERIALS ARE NOT PERMITTED TO BE REMOVED FROM ANY EXAMINATION VENUE IN ANY CIRCUMSTANCE. THIS EXAMINATION IS PRINTED DOUBLE-SIDED.

Question 1

Explain the purpose of database transactions in the context of ACID-compliance.

Marks: 12

Question 2

Answer both parts of this question.

Part A

1) Write three separate lines of PHP code to complete the following tasks in sequence:

a) Declare the variable mynum and assign the number 628 to it.

b) Declare a second variable called noname and assign the contents of the variable mynum to it.

c) Assign the text 'twopi' to the variable mynum.

Marks: 8

Semester 1, 2018 FINAL EXAMINATION Page 4 of 6 HIT326 – Database-Driven Web Applications

THIS EXAMINATION PAPER AND SUPPLIED MATERIALS ARE NOT PERMITTED TO BE REMOVED FROM ANY EXAMINATION VENUE IN ANY CIRCUMSTANCE. THIS EXAMINATION IS PRINTED DOUBLE-SIDED.

Part B

Consider the following PHP code.

$messages = array();

$messages['errcode'] = "E2134";

$messages['error'] = "Database problem";

$messages['desc'] = "Error database login failed.";

foreach($messages As $key => $value){

/* ADD CODE HERE */

}

echo "<p>{$errcode}</p>";

echo "<p>{$desc}</p>";

Write one line of code that code be placed in the above code in the area marked

/*ADD CODE HERE*/ so that the echo code fragment prints

<p>E2134</p><p>Error database login failed.</p>

Marks: 8

Semester 1, 2018 FINAL EXAMINATION Page 5 of 6 HIT326 – Database-Driven Web Applications

THIS EXAMINATION PAPER AND SUPPLIED MATERIALS ARE NOT PERMITTED TO BE REMOVED FROM ANY EXAMINATION VENUE IN ANY CIRCUMSTANCE. THIS EXAMINATION IS PRINTED DOUBLE-SIDED.

Question 3

Explain what “SQL Injection attacks” are and how can you defend an application against them

Marks: 12

Question 4

Cookies are inappropriate for storing large amounts of data, what is a solution to this limitation?

Marks: 12

Question 5

Are regular expressions case sensitive?

Marks: 12

Question 6

a) Relative to MySQL, discuss some of the issues with databases that need to remain

online 24x7?

b) In what way is MySQL more suitable to SQLite for a 24x7 MVC web site?

Marks: 12

Semester 1, 2018 FINAL EXAMINATION Page 6 of 6 HIT326 – Database-Driven Web Applications

THIS EXAMINATION PAPER AND SUPPLIED MATERIALS ARE NOT PERMITTED TO BE REMOVED FROM ANY EXAMINATION VENUE IN ANY CIRCUMSTANCE. THIS EXAMINATION IS PRINTED DOUBLE-SIDED.

Question 7

How do you retrieve parameters from a POST request in PHP?

Marks: 12

Question 8

Discuss the HTTPS protocol and when it should be implemented in web applications.

Marks: 12