Optional Extra Core CS

tags: - cocubes - technical - optional - dbms


Optional Extra Core CS: Only After the Listed Syllabus

Your supplied syllabus does not explicitly list DBMS, data communication theory or digital logic. Do not study this note before the P0 topics. Use it only if:

  • your invitation/placement cell mentions DBMS or computer fundamentals; or
  • you finish all core notes and still have time.

DBMS essentials

Keys

  • Primary key: uniquely identifies a row; cannot be null.
  • Candidate key: minimal attribute set that can uniquely identify a row.
  • Foreign key: refers to a key in another table; supports referential integrity.

SQL joins

Join Returns
INNER JOIN matching rows in both tables
LEFT JOIN all left rows plus matched right rows
RIGHT JOIN all right rows plus matched left rows
FULL OUTER JOIN all rows from both sides, matched where possible

ACID transactions

  • Atomicity: all or nothing.
  • Consistency: valid state to valid state.
  • Isolation: concurrent transactions do not improperly interfere.
  • Durability: committed data survives failure.

Conflict serializability

Build a precedence graph: add edge T1 → T2 when a conflicting operation of T1 occurs before one of T2 on same data item. A schedule is conflict serializable if the graph has no cycle.

Data communication extras

Hamming distance

Number of bit positions where two strings differ.

Example: 10110 and 11100 differ at two positions, so distance is 2.

Shannon capacity

The theoretical maximum data rate of a noisy channel:

C = B log2(1 + S/N)

where B is bandwidth in hertz and S/N is linear signal-to-noise ratio. If SNR is given in dB:

SNR(dB) = 10 log10(S/N).

Digital logic extras

  • AND outputs 1 only for 1 AND 1.
  • OR outputs 1 if either input is 1.
  • XOR outputs 1 if inputs differ.
  • NOT inverts.
  • A multiplexer selects one of many inputs to one output.
  • A flip-flop stores one bit of state.

[[03_Technical/Technical_Overview|Technical overview]]