Why this topic matters · 7 min read
Database Basics appear in the General Awareness or Computer Knowledge section of SBI PO, typically 2-4 questions per attempt. Questions test terminology (DBMS, RDBMS, keys, SQL commands), relationships between tables, and basic SQL syntax. These are pure scoring questions if you memorize definitions and command categories correctly. Aspirants who mix up DDL/DML or confuse primary vs foreign key lose easy marks here.
What is a Database and DBMS
A database is an organized collection of related data stored so it can be easily accessed, managed, and updated. Think of it like a digital filing cabinet where each drawer is a table. A Database Management System (DBMS) is the software that manages this cabinet. Examples include MySQL, Oracle, MS Access. When the DBMS organizes data in the form of related tables, it is called an RDBMS (Relational DBMS). Almost all modern banking systems use RDBMS.
- Database: organized collection of structured data
- DBMS: software to create, manage, and access databases. Examples: MySQL, Oracle, MS SQL Server
- RDBMS: DBMS where data is stored in related tables. Example: MySQL, Oracle
- Table = Relation, Row = Tuple/Record, Column = Attribute/Field
- Redundancy is reduced in DBMS compared to traditional file systems
- Data integrity and security are key advantages of DBMS
Keys in a Database
Keys are used to uniquely identify records in a table and to establish relationships between tables. Think of a key as your Aadhaar number — it uniquely identifies you among all citizens. Different types of keys serve different purposes and SBI PO frequently asks you to identify the correct key type for a given scenario.
- Primary Key: uniquely identifies each row in a table. Cannot be NULL or duplicate
- Foreign Key: a field in one table that refers to the Primary Key of another table. Creates a link between tables
- Candidate Key: all columns that CAN be a primary key. Primary key is chosen from candidate keys
- Super Key: any combination of columns that can uniquely identify a row. Superset of candidate key
- Composite Key: primary key made of two or more columns together
- Unique Key: like primary key but allows one NULL value
SQL Command Categories
SQL (Structured Query Language) is the language used to interact with databases. SBI PO loves asking which command belongs to which category. The four main categories are DDL, DML, DCL, and TCL. Remember: DDL builds the structure, DML handles the data inside it, DCL controls who can access it, and TCL manages transactions.
- DDL (Data Definition Language): CREATE, ALTER, DROP, TRUNCATE — defines structure of tables
- DML (Data Manipulation Language): SELECT, INSERT, UPDATE, DELETE — manipulates data inside tables
- DCL (Data Control Language): GRANT, REVOKE — controls access permissions
- TCL (Transaction Control Language): COMMIT, ROLLBACK, SAVEPOINT — manages transactions
- SELECT is the most used command; it retrieves data from one or more tables
- TRUNCATE removes all rows but keeps the table structure (DDL), DELETE removes rows one by one (DML)
Normalization
Normalization is the process of organizing a database to reduce data redundancy and improve data integrity. Imagine you store the same customer address in 100 rows — if the address changes, you must update 100 rows. Normalization avoids this. It divides large tables into smaller related tables. SBI PO typically asks about the forms (1NF, 2NF, 3NF) at a conceptual level, not deep technical detail.
- 1NF (First Normal Form): each column must have atomic (indivisible) values. No repeating groups
- 2NF (Second Normal Form): must be in 1NF + no partial dependency (non-key column depends on part of composite key)
- 3NF (Third Normal Form): must be in 2NF + no transitive dependency (non-key column depends on another non-key column)
- BCNF (Boyce-Codd Normal Form): stricter version of 3NF
- Goal of normalization: eliminate redundancy, prevent update/delete anomalies
Basic SQL Syntax and Clauses
For SBI PO descriptive and objective sections, knowing the order and purpose of key SQL clauses is enough. You do not need to write complex queries but you should recognize correct syntax and the purpose of WHERE, GROUP BY, HAVING, and ORDER BY clauses.
- SELECT column FROM table WHERE condition — basic query structure
- WHERE filters individual rows before grouping
- GROUP BY groups rows that have the same value in a column
- HAVING filters groups after GROUP BY (WHERE works on rows, HAVING works on groups)
- ORDER BY sorts the result. ASC = ascending (default), DESC = descending
- JOIN combines rows from two or more tables: INNER JOIN, LEFT JOIN, RIGHT JOIN, FULL JOIN
Key formulas
Basic SELECT
SELECT column1, column2 FROM table_name WHERE condition;
When: Use when retrieving specific columns from a table with a filter
GROUP BY with HAVING
SELECT column, COUNT(*) FROM table GROUP BY column HAVING COUNT(*) > 1;
When: Use when aggregating data and filtering groups, not individual rows
Worked examples
Question: Which command is used to remove a table permanently from the database? Answer: DROP (DDL). TRUNCATE only removes data but keeps the table structure.
Question: A table has columns StudentID, Name, CourseID, CourseName. CourseName depends only on CourseID, not on the full primary key (StudentID + CourseID). This violates which normal form? Answer: 2NF, because there is a partial dependency.
⚠ Common mistakes to avoid
- Confusing TRUNCATE with DELETE: TRUNCATE is DDL (cannot be rolled back in most DBMS), DELETE is DML (can be rolled back). SBI PO has asked this distinction directly.
- Mixing up WHERE and HAVING: WHERE filters rows before grouping, HAVING filters after grouping. A very common trap in MCQs.
- Thinking Foreign Key must be unique: Foreign Key does NOT need to be unique. It only needs to match a Primary Key in the referenced table.
- Confusing Candidate Key and Super Key: All candidate keys are super keys but not all super keys are candidate keys. Candidate key is the minimal super key.
- Assuming NULL is zero or blank: NULL means unknown or missing. A Primary Key can never be NULL. Unique Key allows one NULL — this distinction is tested.
🧠 Memory aids
- DDL DML DCL TCL mnemonic: Dirty Dogs Drink Cold Tea — DDL, DML, DCL, TCL (the Tea part reminds you TCL is last)
- Key hierarchy: Super key is the entire family. Candidate key is the eligible child. Primary key is the chosen one.
- Normal Forms staircase: 1NF = Atomic, 2NF = No Partial dependency, 3NF = No Transitive dependency. Remember A-P-T: Atomic, Partial, Transitive going up the stairs.
- WHERE vs HAVING: WHERE works before the group party, HAVING checks the groups at the exit door.
🎯 SBI PO exam tips
- SBI PO Computer Knowledge section gives roughly 2-3 questions on databases. These are direct definition or classification questions — no deep SQL writing needed.
- Most frequently tested: SQL command categories (DDL vs DML especially TRUNCATE vs DELETE), types of keys (Primary, Foreign, Candidate), and definitions of DBMS vs RDBMS.
- In SBI PO 2023 and 2024 papers, questions on normalization were conceptual — just recognize which normal form is violated based on a simple scenario description.
- Time allocation: these are 20-second questions if you have memorized the categories. Do not spend more than 30 seconds on any database question in the objective section.
- For SBI PO descriptive paper, if asked to write a short note on DBMS, cover: definition, DBMS vs file system, types of keys, and one SQL example — this covers all examiner expectations in under 150 words.
Q1 · hard · AI-verified
Which database optimization technique involves storing frequently accessed data in faster storage media closer to the processor?
- Indexing
- Caching
- Normalization
- Partitioning
Q2 · hard · AI-verified
Which join algorithm would be most efficient for joining two large tables where one table is significantly smaller than the other and both are unsorted?
- Nested Loop Join
- Hash Join
- Sort-Merge Join
- Index Nested Loop Join
Q3 · hard · AI-verified
Which NoSQL database type is best suited for storing and querying highly connected data with complex relationships?
- Key-Value Store
- Document Database
- Column-Family Database
- Graph Database
Q4 · hard · AI-verified
Which SQL join operation returns all records from both tables, filling with NULL values where no match exists in either direction?
- LEFT OUTER JOIN
- CROSS JOIN
- FULL OUTER JOIN
- RIGHT OUTER JOIN
Q5 · hard · AI-verified
Which database isolation level prevents dirty reads and non-repeatable reads but still allows phantom reads to occur?
- Read Uncommitted
- Read Committed
- Serializable
- Repeatable Read