9608_s17_qp_11
A paper of Computer Science, 9608
Questions:
7
Year:
2017
Paper:
1
Variant:
1

Login to start this paper & get access to powerful tools

1
A hospital is divided into two areas, Area A and Area B. Each area has several wards. All the ward names are different. A number of nurses are based in Area A. These nurses always work on the same ward. Each nurse has a unique Nurse ID of STRING data type. A-NURSE A-WARD Describe the relationship shown above. A relational database is created to store the ward and nurse data. The two table designs for Area A are: A-WARD(WardName, NumberOfBeds) A-NURSE(NurseID, FirstName, FamilyName, ) Complete the design for the A-NURSE table. Explain how the relationship in part is implemented. In Area B of the hospital, there are a number of wards and a number of nurses. Each Area B ward has a specialism. Each Area B nurse has a specialism. A nurse can be asked to work in any of the Area B wards where their specialism matches with the ward specialism. The relationship for Area B of the hospital is: B-NURSE B-WARD Explain what the degree of relationship is between the entities B-NURSE and B-WARD. The design for the Area B data is as follows: B-NURSE(NurseID, FirstName, FamilyName, Specialism) B-WARD(WardName, NumberOfBeds, Specialism) B-WARD-NURSE( ) Complete the attributes for the third table. Underline its primary key. Draw the relationships on the entity-relationship (E-R) diagram. B-NURSE B-WARD B-WARD-NURSE Use the table designs in part . Write an SQL query to display the Nurse ID and family name for all Area B nurses with a specialism of ‘THEATRE’. Fatima Woo is an Area B nurse with the nurse ID of 076. She has recently married, and her new family name is Chi. Write an SQL command to update her record. UPDATE SET WHERE
2
3
4
The following table shows part of the instruction set for a processor. The processor has one general purpose register, the Accumulator (ACC) and an Index Register (. Instruction Explanation Op code Operand Op code LDM #n 0000 0001 Immediate addressing. Load the denary number n to ACC. LDD 0000 0010 Direct addressing. Load the contents of the location at the given address to ACC. LDI 0000 0101 Indirect addressing. At the given address is the address to be used. Load the contents of this second address to ACC. LDX 0000 0110 Indexed addressing. Form the address from + the contents of the Index Register (. Copy the contents of this calculated address to ACC. LDR #n 0000 0111 Immediate addressing. Load number n to IX. STO 0000 1111 Store the contents of ACC at the given address. The following diagram shows the contents of a section of main memory and the Index Register (. Show the contents of the Accumulator (ACC) after each instruction is executed. IX LDM #500 ACC LDD 500 ACC LDX 500 ACC LDI 500 ACC Address Main Memory contents Each machine code instruction is encoded as 16-bits (8-bit op code followed by an 8-bit operand). Write the machine code for the following instructions: LDM #17 LDX #97 Using an 8-bit operand, state the maximum number of memory locations, in denary, that can be directly addressed. Computer scientists often write binary representations in hexadecimal. Write the hexadecimal representation for this instruction: A second instruction has been written in hexadecimal as: 05 3F Write the equivalent assembly language instruction, with the operand in denary.
5
6
7
The design of a web-based application can require the use of client-side scripting. Describe what is meant by client-side scripting. A user requests a web page by keying the Uniform Resource Locator (URL) into the address bar of their web browser. The requested page contains a client-side script. Describe the sequence of steps leading to the display of the web page on the computer screen. A web page used for data capture consists of: • two text boxes for the entry of: • a product code • the number of items to be purchased. • a button which is clicked when the user wants to submit this order. Study the following web page. Untitled Document function myButton_onmousedown() { var Message1 = "ERROR – Order refused"; var Message2 = "Product code OK"; var x = document.forms["form1"]["txtProductCode"].value; if (x == "") { alert(Message1) } else { alert(Message2) } } Product code: Number: Submit order: The developer has used three variables in the JavaScript code. State the identifiers used. The button has an event whose identifier is onMouseDown. When the submit button is clicked, some code is executed. State the line numbers that contain this code. From line to line The JavaScript code uses a selection statement. State the line number that contains the condition. Line number: Describe the purpose of the validation check that the code performs. Name and describe two other types of validation check that could be appropriate for this data capture form. Validation check: Description Validation check: Description