Kerala Plus Two Computer Applications (DHSE) study materials
Kerala Plus Two Computer Applications (DHSE) study resources

Kerala Plus Two Computer Applications (DHSE): Database Management Systems and SQL

Kerala Plus Two Computer Applications (DHSE) · Work through your exam, one topic at a time.

All guide sections

Database Management Systems and SQL

Database Management Systems and SQL

This domain tests data organisation and querying: keys, relationships, normalization ideas, and SQL for defining and manipulating tables. Expect short queries and questions on constraints and NULL behaviour.

Core rules

  • A primary key uniquely identifies each row and cannot be NULL. A foreign key references a primary key in another table.
  • SQL categories: DDL (CREATE, ALTER, DROP), DML (INSERT, UPDATE, DELETE), DQL (SELECT), DCL (GRANT, REVOKE).
  • SELECT chooses columns; WHERE filters rows; ORDER BY sorts; GROUP BY groups for aggregates.
  • DISTINCT removes duplicate result rows. NULL is unknown, so test it with IS NULL, not = NULL.
  • Normalization reduces redundancy and update anomalies by organising attributes into related tables.

Worked example

Table Student(roll, name, mark). Query: SELECT name FROM Student WHERE mark >= 60 ORDER BY name;. The reasoning: SELECT name limits output to one column; WHERE mark >= 60 keeps qualifying rows; ORDER BY name sorts alphabetically. If duplicates were possible in a different query, SELECT DISTINCT would remove them.

Traps

DELETE removes rows but keeps the table; DROP removes the table structure. String literals need single quotes. WHERE mark = NULL returns no rows; use IS NULL. Aggregate functions ignore NULLs in many systems. A foreign key must match an existing referenced value unless NULL is allowed. Do not confuse a candidate key with the chosen primary key.