📑 Topics on this page (Jump to Topic):
📌 1. Database & DBMS
- A database = an organised collection of related data. A DBMS = software to create, manage and query databases — MySQL, Oracle, MS Access, PostgreSQL.
- An RDBMS stores data in tables (relations); the relational model was given by E. F. Codd (1970).
- Benefits of a DBMS: less redundancy, data consistency, security, sharing and backup.
| Term | Meaning |
|---|---|
| Table / Relation | Data in rows and columns |
| Record / Tuple / Row | Complete information about one entity (one row) |
| Field / Attribute / Column | One kind of information (one column) |
| Degree | Number of columns (attributes) |
| Cardinality | Number of rows (tuples) |
| Schema | Structure/design of the database |
⚠️ Exam Traps:
- Degree = columns; cardinality = rows.
📌 2. Keys
| Key | Meaning |
|---|---|
| Primary Key | Uniquely identifies each record; no NULL and no duplicates — e.g. Roll No. |
| Candidate Key | All columns that could become the primary key |
| Alternate Key | Candidate keys not chosen as primary |
| Foreign Key | Refers to another table's primary key; links tables |
| Composite Key | Two or more columns together |
| Super Key | Any set of columns that gives unique identification |
⚠️ Exam Traps:
- A primary key cannot be NULL; a foreign key links two tables.
📌 3. SQL & MS Access
| Category | Commands |
|---|---|
| DDL (Data Definition Language) | CREATE, ALTER, DROP, TRUNCATE, RENAME |
| DML (Data Manipulation Language) | SELECT, INSERT, UPDATE, DELETE |
| DCL (Data Control Language) | GRANT, REVOKE |
| TCL (Transaction Control Language) | COMMIT, ROLLBACK, SAVEPOINT |
- Example: SELECT name FROM students WHERE marks > 60;
- DELETE removes rows (table remains); DROP removes the whole table; TRUNCATE removes all rows at once.
- ACID properties: Atomicity, Consistency, Isolation, Durability.
- MS Access objects: table, query, form, report, macro, module; file .accdb.
- Data warehouse = large historical data for analysis; data mining = finding patterns in it.
⚠️ Exam Traps:
- SELECT belongs to DML (not DDL).
- DROP removes the table; DELETE removes only rows.
📌 4. Practice MCQs
📝 Practice MCQs (prepared by SF Prep — not PYQs)
Q1. The full form of DBMS is: Practice
Correct answer: (B)
A DBMS is software to create and manage databases.
A DBMS is software to create and manage databases.
Q2. A row in a table is called a: Practice
Correct answer: (C)
Row = record = tuple; column = field = attribute.
Row = record = tuple; column = field = attribute.
Q3. A column in a table is called a: Practice
Correct answer: (D)
A column holds one kind of information, e.g. "Name".
A column holds one kind of information, e.g. "Name".
Q4. Who proposed the relational database model? Practice
Correct answer: (A)
E. F. Codd (IBM) proposed the relational model in 1970.
E. F. Codd (IBM) proposed the relational model in 1970.
Q5. The key that uniquely identifies each record is the: Practice
Correct answer: (B)
A primary key is unique and cannot be NULL.
A primary key is unique and cannot be NULL.
Q6. The key that links two tables is a: Practice
Correct answer: (C)
A foreign key refers to the primary key of another table.
A foreign key refers to the primary key of another table.
Q7. Which statement is true for a primary key? Practice
Correct answer: (D)
A table has one primary key (of one or more columns).
A table has one primary key (of one or more columns).
Q8. The number of attributes (columns) in a relation is its: Practice
Correct answer: (A)
Degree = columns; cardinality = rows.
Degree = columns; cardinality = rows.
Q9. The number of tuples (rows) in a relation is its: Practice
Correct answer: (B)
Cardinality = number of tuples.
Cardinality = number of tuples.
Q10. Which of these is a DDL command? Practice
Correct answer: (C)
DDL: CREATE, ALTER, DROP, TRUNCATE. SELECT/INSERT/UPDATE are DML.
DDL: CREATE, ALTER, DROP, TRUNCATE. SELECT/INSERT/UPDATE are DML.
Q11. The SQL command to retrieve data from a database is: Practice
Correct answer: (D)
SELECT ... FROM ... WHERE ...
SELECT ... FROM ... WHERE ...
Q12. The SQL command that removes an entire table including its structure is: Practice
Correct answer: (A)
DROP TABLE removes the structure too; DELETE removes only rows.
DROP TABLE removes the structure too; DELETE removes only rows.
Q13. GRANT and REVOKE belong to which category of SQL commands? Practice
Correct answer: (B)
DCL = Data Control Language (permissions).
DCL = Data Control Language (permissions).
Q14. COMMIT and ROLLBACK are which type of commands? Practice
Correct answer: (C)
TCL = Transaction Control Language.
TCL = Transaction Control Language.
Q15. In ACID properties, "A" stands for: Practice
Correct answer: (D)
Atomicity = a transaction happens completely or not at all.
Atomicity = a transaction happens completely or not at all.
Q16. The default extension of an MS Access file (2007 and later) is: Practice
Correct answer: (A)
.accdb since Access 2007; earlier .mdb.
.accdb since Access 2007; earlier .mdb.
Q17. The MS Access object that creates a user-friendly screen for data entry is a: Practice
Correct answer: (B)
Form = data entry; report = printable summary; query = question.
Form = data entry; report = printable summary; query = question.
Q18. Which of these is NOT DBMS software? Practice
Correct answer: (C)
Photoshop is image-editing software.
Photoshop is image-editing software.
Q19. Unnecessary duplication of data is called: Practice
Correct answer: (D)
A DBMS reduces redundancy.
A DBMS reduces redundancy.
Q20. The process of finding hidden patterns in large data is called: Practice
Correct answer: (A)
Data mining is usually done on a data warehouse.
Data mining is usually done on a data warehouse.