Information Technology for the Specialist Officer Paper: Databases and SQL, Networks and Addressing, Operating Systems, Software Engineering and Security

The IT Officer papers of the banks set a professional-knowledge section on the core of an information-technology degree. This chapter teaches that core at exam depth: relational databases and SQL, networks with their layers and IP addressing, operating-system scheduling and memory, software engineering and information security, with worked arithmetic. It is written from standing subject matter, not from a notice, which was not read, and the figures are recomputed by the evidence script. It goes beyond the general computer-aptitude chapters of the banking course.
Overview

1. Relational databases, normal forms and SQL

1 min read · 1 part

A relational database stores data in tables of rows (tuples) and columns (attributes). A primary key uniquely identifies a row; a foreign key refers to the primary key of another table and enforces referential integrity. Normalisation removes redundancy: 1NF needs atomic values, 2NF removes partial dependence of non-key attributes on part of a composite key, 3NF removes transitive dependence on the key, and BCNF requires every determinant to be a candidate key. The ACID properties of a transaction are atomicity, consistency, isolation and durability.

SQL groupCommandsPurpose
DDLCREATE, ALTER, DROP, TRUNCATEDefine and change structure
DMLSELECT, INSERT, UPDATE, DELETEQuery and change data
DCLGRANT, REVOKEControl access
TCLCOMMIT, ROLLBACK, SAVEPOINTManage transactions
⚠️ DELETE, TRUNCATE and DROP
DELETE removes chosen rows and can be rolled back; TRUNCATE empties the table quickly and keeps its structure; DROP removes the table itself. WHERE filters rows before grouping and HAVING filters groups after GROUP BY.

A relational database stores data in tables of rows (tuples) and columns (attributes). A primary key uniquely identifies a row; a foreign key refers to the primary key of another table and…

2. Networks, layers and IP addressing

1 min read

The OSI model has seven layers: physical, data link, network, transport, session, presentation and application; the TCP/IP model compresses them into four (link, internet, transport, application). A switch works at the data-link layer on MAC addresses, a router at the network layer on IP addresses, and TCP gives reliable, ordered delivery while UDP is faster and connectionless. DNS maps names to addresses, DHCP assigns them and ARP maps an IP to a MAC address.

An IPv4 address has 32 bits. A prefix of /26 leaves 32 − 26 = 6 host bits, so a subnet has 2⁶ = 64 addresses and 62 usable hosts after the network and broadcast addresses are removed; a /24 gives 254 hosts. IPv6 uses 128 bits and removes the need for address sharing. Class A, B and C are the older classful ranges (first octet 1 to 126, 128 to 191 and 192 to 223), and CIDR notation replaced them.

The OSI model has seven layers: physical, data link, network, transport, session, presentation and application; the TCP/IP model compresses them into four (link, internet, transport…

3. Operating systems: scheduling, deadlock and memory

1 min read

Scheduling decides which ready process runs. For bursts of 24, 3 and 3 time units arriving together, first-come first-served gives waiting times 0, 24 and 27, a mean of 17; shortest-job-first (3, 3, 24) gives 0, 3 and 6, a mean of 3, the minimum possible; round robin with quantum 4 gives waits 6, 4 and 7, a mean of 5.67, and is fair to short jobs. Deadlock needs four conditions together: mutual exclusion, hold and wait, no pre-emption and circular wait; breaking any one prevents it.

In paging, memory is split into fixed-size frames. With a 32-bit address and 4 KB pages (12 offset bits) there are 32 − 12 = 20 page-number bits and 2²⁰ = 1,048,576 pages. The effective access time with a hit ratio h is h × t_cache + (1 − h) × t_memory: with a 90% hit ratio, 1 ns cache and 100 ns memory it is 0.9 + 10 = 10.9 ns. A page fault loads a missing page from disk; FIFO, LRU and optimal are replacement policies, and thrashing is excessive paging.

Scheduling decides which ready process runs. For bursts of 24, 3 and 3 time units arriving together, first-come first-served gives waiting times 0, 24 and 27, a mean of 17…

4. Software engineering and information security

1 min read · 1 part

The SDLC runs through requirements, design, coding, testing, deployment and maintenance; the waterfall model does the phases in order, iterative and agile models deliver in small cycles with feedback, and the spiral model adds risk analysis to each loop. Testing levels are unit, integration, system and acceptance; black-box testing uses inputs and outputs, white-box testing uses the code structure. Coupling should be low and cohesion high in a good design.

Information security rests on confidentiality, integrity and availability. Symmetric encryption (AES) uses one shared key and is fast; asymmetric encryption (RSA) uses a public and a private key and is used for key exchange and digital signatures, where the sender signs with the private key and anyone verifies with the public key. A hash (SHA-256) is a one-way fixed-length digest that detects change. A firewall filters traffic, phishing tricks a user into giving credentials, a man-in-the-middle attack intercepts a session, and two-factor authentication adds a second proof to a password.

ℹ️ Scope note
This chapter does not state any bank's current systems or any vendor product versions, which change. The IT papers of different banks vary in weight between networks, databases and programming; check the notice for the year.

The SDLC runs through requirements, design, coding, testing, deployment and maintenance; the waterfall model does the phases in order, iterative and agile models deliver in small cycles…

5. Data structures, algorithms and number systems

2 min read · 3 parts

A stack is last-in-first-out and a queue first-in-first-out; an array gives direct access by index but costs a shift to insert in the middle, while a linked list inserts cheaply at a known place but must be walked to be searched. In a binary tree with n nodes there are n − 1 edges, and a full binary tree with L leaves has L − 1 internal nodes, so 9 leaves mean 8 internal nodes and 17 nodes in all. A tree of height h (the root at height 0) holds at most 2^(h + 1) − 1 nodes, so height 4 allows 31. A binary search tree keeps smaller keys on the left and larger on the right, so an in-order walk lists the keys in sorted order.

Structure or algorithmTypical costRemember
Stack push and pop; queue enqueue and dequeueO(1)LIFO against FIFO
Array access by indexO(1)insertion in the middle is O(n)
Linked list searchO(n)insertion at the head is O(1)
Binary search on a sorted arrayO(log n)the list must already be sorted
Binary search tree searchO(log n) average, O(n) worsta skewed tree is a list
Hash table lookupO(1) averagecollisions need chaining or probing
Bubble sortO(n²)n(n − 1)/2 comparisons
Merge sortO(n log n)always, but needs extra space
Quick sortO(n log n) average, O(n²) worstworst case with a poor pivot

Number systems. Computers store numbers in binary. Decimal 45 is 101101 (32 + 8 + 4 + 1) and 2D in hexadecimal; decimal 2,025 is 11111101001 in binary and 7E9 in hexadecimal. In an 8-bit two's complement system the range is −128 to +127 and −45 is found by inverting 00101101 to 11010010 and adding 1, which gives 11010011. A postfix expression is evaluated with a stack: for 5 3 + 2 × the stack holds 8 after the addition and 16 after the multiplication, the same as the infix (5 + 3) × 2.

ℹ️ Scope note
Programming-language syntax and vendor tools are outside this chapter; the Specialist Officer notices for a given year say whether a language section is set.

A stack is last-in-first-out and a queue first-in-first-out; an array gives direct access by index but costs a shift to insert in the middle, while a linked list inserts cheaply at a known…

Second Pass: Subnet Hosts, Offset Bits, FCFS Order, Tree Height and Layers

1 min read · 2 parts

A /n IPv4 prefix leaves 32 − n host bits, so usable hosts are 2^(32 − n) − 2. A 4 KB page has a 12-bit offset. Under first-come first-served scheduling the order of arrival changes the mean waiting time sharply. A complete binary tree of 15 nodes has levels 1 + 2 + 4 + 8, so its height is 3 edges. HAVING filters groups after GROUP BY, while WHERE filters rows before.

Worked values
ItemWorkingAnswer
/27 subnet2⁵ − 230 hosts
4 KB page2¹²12 offset bits
FCFS bursts 3, 3, 24waits 0, 3, 6mean 3
FCFS bursts 24, 3, 3waits 0, 24, 27mean 17
⚠️ Order matters in FCFS
With bursts of 24, 3 and 3 arriving in that order the mean wait is (0 + 24 + 27)/3 = 17, but with the order 3, 3, 24 it is (0 + 3 + 6)/3 = 3. This convoy effect is why shortest-job-first reduces the average wait.

A /n IPv4 prefix leaves 32 − n host bits, so usable hosts are 2^(32 − n) − 2. A 4 KB page has a 12-bit offset. Under first-come first-served scheduling the order of arrival changes the mean…

Key takeaways

  • Primary and foreign keys give integrity; normal forms remove redundancy (2NF partial, 3NF transitive dependence); DELETE can be rolled back, TRUNCATE and DROP differ.
  • A /n IPv4 prefix leaves 32 − n host bits: 2^(32−n) addresses and two fewer usable hosts.
  • Shortest-job-first minimises mean waiting time; deadlock needs mutual exclusion, hold and wait, no pre-emption and circular wait together.
  • Symmetric encryption is fast with one key; asymmetric uses a key pair for exchange and signatures; a hash detects change.
  • A full binary tree with L leaves has L − 1 internal nodes; binary search needs at most ⌊log₂ n⌋ + 1 comparisons; bubble sort makes n(n − 1)/2 comparisons in the worst case; in 8-bit two's complement −45 is 11010011.

Practice questions (26)

Attempt each one before opening the answer. Every explanation names the tempting wrong option as well as the right one, because that is where marks are lost.

  1. A subnet uses the prefix /26 in IPv4. The number of usable host addresses is:

    1. 62
    2. 64
    3. 30
    4. 126
    Show answer

    Answer: A — 62

    The /26 prefix leaves 6 host bits, so 2⁶ = 64 addresses, of which the first (network) and last (broadcast) cannot be assigned to hosts, leaving 62. A /27 gives 30 and a /25 gives 126.
  2. Which device forwards frames using MAC addresses at the data-link layer?

    1. a switch
    2. a router
    3. a repeater
    4. a gateway
    Show answer

    Answer: A — a switch

    A switch learns which MAC address lies behind each port and forwards a frame only there. A router works at the network layer on IP addresses, and a repeater simply regenerates a signal at the physical layer.
  3. Three processes with CPU bursts of 24, 3 and 3 units arrive together. The mean waiting time under first-come first-served in that order, and under shortest-job-first, are:

    1. 17 and 3
    2. 3 and 17
    3. 9 and 9
    4. 27 and 6
    Show answer

    Answer: A — 17 and 3

    Under FCFS the waits are 0, 24 and 27, a mean of 51 ÷ 3 = 17. Running the short jobs first gives waits 0, 3 and 6, a mean of 3. SJF minimises mean waiting time, and the long job makes FCFS suffer the convoy effect.
Show the other 23 questions
  1. Which set of four conditions must all hold for a deadlock to occur?

    1. mutual exclusion, hold and wait, no pre-emption, circular wait
    2. paging, segmentation, caching, spooling
    3. atomicity, consistency, isolation, durability
    4. confidentiality, integrity, availability, authenticity
    Show answer

    Answer: A — mutual exclusion, hold and wait, no pre-emption, circular wait

    The four Coffman conditions are mutual exclusion, hold and wait, no pre-emption and circular wait. Preventing any one of them prevents deadlock. The other sets are the ACID properties and the security goals.
  2. A system has 32-bit addresses and 4 KB pages. The number of bits in the page number is:

    1. 20
    2. 12
    3. 10
    4. 32
    Show answer

    Answer: A — 20

    A 4 KB page needs 12 bits (2¹² = 4,096) for the offset, so 32 − 12 = 20 bits remain for the page number, giving 2²⁰ pages. The 12 is the offset width and not the page-number width.
  3. A cache with a 90% hit ratio has an access time of 1 ns, and main memory takes 100 ns on a miss. The effective access time, ignoring the cache check on a miss, is:

    1. 10.9 ns
    2. 90.1 ns
    3. 50.5 ns
    4. 1.1 ns
    Show answer

    Answer: A — 10.9 ns

    Effective time = 0.9 × 1 + 0.1 × 100 = 0.9 + 10 = 10.9 ns. Weighting the other way round (0.1 × 1 + 0.9 × 100) gives the wrong 90.1 ns, which is the usual slip.
  4. A relation is in third normal form (3NF) when it is in 2NF and has no:

    1. transitive dependence of a non-key attribute on the key
    2. primary key
    3. foreign key
    4. row at all
    Show answer

    Answer: A — transitive dependence of a non-key attribute on the key

    3NF removes transitive dependence, where a non-key attribute depends on another non-key attribute that depends on the key. 2NF removes partial dependence on part of a composite key. Keys are not removed by normalisation.
  5. In public-key digital signatures, the sender signs a message with the sender's:

    1. private key
    2. public key
    3. hash only
    4. receiver's password
    Show answer

    Answer: A — private key

    Only the sender holds the private key, so a signature made with it proves origin, and anyone can check it with the matching public key. Encryption for confidentiality uses the receiver's public key instead.
  6. A sorted list of 1,000 items is searched with binary search. The greatest number of comparisons needed is:

    1. 10
    2. 9
    3. 11
    4. 500
    Show answer

    Answer: A — 10

    Binary search needs at most ⌊log₂ 1000⌋ + 1 = 9 + 1 = 10 comparisons, since 2⁹ = 512 < 1000 < 1024 = 2¹⁰. Nine would be the integer part alone, and 500 is the average for a linear search.
  7. The greatest number of comparisons bubble sort makes on a list of 12 items is:

    1. 66
    2. 144
    3. 132
    4. 12
    Show answer

    Answer: A — 66

    The worst case is n(n − 1) ÷ 2 = 12 × 11 ÷ 2 = 66. The figure 132 forgets to halve, and 144 is n².
  8. A full binary tree has 9 leaves. The number of internal nodes, and of nodes in all, are:

    1. 8 and 17
    2. 9 and 18
    3. 8 and 18
    4. 7 and 16
    Show answer

    Answer: A — 8 and 17

    A full binary tree has L − 1 internal nodes, here 9 − 1 = 8, so the total is 9 + 8 = 17. The pair 9 and 18 confuses leaves with internal nodes.
  9. In an 8-bit two's complement system, the representation of −45 is:

    1. 11010011
    2. 10101101
    3. 11010010
    4. 00101101
    Show answer

    Answer: A — 11010011

    Write +45 as 00101101, invert every bit to 11010010 and add 1 to get 11010011. The option 11010010 is only the one's complement, 00101101 is +45 itself, and 10101101 is the sign-and-magnitude form of −45.
  10. A subnet is defined by the prefix /27 in IPv4. The number of usable host addresses is:

    1. 30
    2. 32
    3. 62
    4. 14
    Show answer

    Answer: A — 30

    There are 32 − 27 = 5 host bits, so 2⁵ = 32 addresses, of which the network and broadcast addresses are not usable, leaving 30.
  11. In SQL, the clause used to filter groups after a GROUP BY is applied is:

    1. HAVING
    2. WHERE
    3. ORDER BY
    4. DISTINCT
    Show answer

    Answer: A — HAVING

    HAVING applies conditions to aggregated groups, for example HAVING COUNT(*) > 5, whereas WHERE filters individual rows before grouping.
  12. A system with 4 KB pages uses byte addresses. The number of bits in the page offset is:

    1. 12
    2. 4
    3. 10
    4. 16
    Show answer

    Answer: A — 12

    A 4 KB page has 4,096 = 2¹² bytes, so 12 bits address a byte within the page. The remaining address bits form the page number.
  13. Three processes with CPU bursts of 3, 3 and 24 units arrive together in that order under first-come first-served scheduling. The mean waiting time is:

    1. 3
    2. 17
    3. 10
    4. 6
    Show answer

    Answer: A — 3

    The waits are 0, 3 and 6, so the mean is 9/3 = 3 units. In the order 24, 3, 3 the mean would be 17.
  14. A complete binary tree has 15 nodes. Its height, counted in edges from the root to the deepest leaf, is:

    1. 3
    2. 4
    3. 7
    4. 15
    Show answer

    Answer: A — 3

    The levels hold 1, 2, 4 and 8 nodes, totalling 15, so there are four levels and the height is 3 edges. Counting levels instead of edges gives 4.
  15. Consider the following statements:
    1. The ACID properties of a transaction are atomicity, consistency, isolation and durability.
    2. The OSI model has seven layers, and the transport layer is where TCP and UDP operate.
    Which is/are correct?

    1. Both 1 and 2
    2. 1 only
    3. 2 only
    4. Neither 1 nor 2
    Show answer

    Answer: A — Both 1 and 2

    Both are standard definitions: ACID names the four transaction guarantees and the transport layer is layer 4 of the seven-layer OSI model. Both statements are correct.
  16. The SQL query SELECT DISTINCT dept FROM emp returns:

    1. Only the first department
    2. Every row of the table
    3. Each department value once, with duplicates removed
    4. The count of departments
    Show answer

    Answer: C — Each department value once, with duplicates removed

    DISTINCT removes duplicate values from the result. COUNT would give the number of departments, which is the tempting confusion.
  17. A table is in first normal form (1NF) when:

    1. Every attribute holds only atomic (indivisible) values
    2. It has no partial dependency
    3. It has no transitive dependency
    4. Every determinant is a candidate key
    Show answer

    Answer: A — Every attribute holds only atomic (indivisible) values

    1NF requires atomic values with no repeating groups. Partial dependency is removed in 2NF, transitive in 3NF and determinant-key in BCNF, the tempting later forms.
  18. For the page reference string 1, 2, 3, 4, 1, 2, 5, 1, 2, 3, 4, 5 under FIFO replacement, the numbers of page faults with 3 and with 4 frames are respectively:

    1. 10 and 10
    2. 10 and 9
    3. 9 and 10
    4. 9 and 9
    Show answer

    Answer: C — 9 and 10

    Simulating FIFO gives 9 faults with 3 frames and 10 faults with 4 frames, the classic Belady's anomaly in which more frames cause more faults. 10 and 9 is the expected-but-wrong order.
  19. A /24 network is divided into 4 equal subnets. The subnet mask becomes:

    1. 255.255.255.224
    2. 255.255.255.128
    3. 255.255.255.240
    4. 255.255.255.192
    Show answer

    Answer: D — 255.255.255.192

    Four subnets need 2 more bits, giving /26, whose last octet is 11000000 = 192. The mask 128 (/25) gives only two subnets, the tempting under-division.
  20. Which transport-layer protocol is connectionless and does not guarantee delivery?

    1. FTP
    2. TCP
    3. UDP
    4. HTTP
    Show answer

    Answer: C — UDP

    UDP is connectionless and unreliable but fast. TCP gives reliable, ordered delivery. HTTP and FTP are application-layer protocols, which are the tempting wrong options.
  21. Consider the following statements:
    1. Breadth-first search uses a queue.
    2. Depth-first search uses a stack, explicit or through recursion.
    Which of the statements given above is/are correct?

    1. Both 1 and 2
    2. 1 only
    3. 2 only
    4. Neither 1 nor 2
    Show answer

    Answer: A — Both 1 and 2

    BFS visits level by level with a queue and DFS goes deep with a stack. Swapping the two structures is the tempting error.
  22. A hash table of size 7 uses h(k) = k mod 7. The key 52 is stored at index:

    1. 7
    2. 3
    3. 0
    4. 5
    Show answer

    Answer: B — 3

    52 = 7 × 7 + 3, so 52 mod 7 = 3. Check: 49 + 3 = 52. Index 7 is out of range for a table of size 7, where indices run from 0 to 6.
  23. The hexadecimal number 2F equals which decimal number?

    1. 32
    2. 15
    3. 63
    4. 47
    Show answer

    Answer: D — 47

    2F = 2 × 16 + 15 = 47. Check: 47 = 32 + 15. Reading F as 16 gives the tempting 48.