DBMS, RDBMS and SQL Bits
1. Which of the following is NOT a function of a DBMS?
A) Data storage B) Data retrieval C) Text formatting D) Data security
2. In DBMS, ACID properties ensure:
A) Data redundancy B) Transaction reliability C) Query optimization D) Data fragmentation
3. Which type of key uniquely identifies a record in a table with not null values?
A) Foreign key B) Primary key C) Composite key D) Candidate key
4. Which of the following is NOT a data model in DBMS?
A) Hierarchical model B) Network model C) Relational model D) Graphical user model
5. The process of converting ER diagrams into tables is called:
A) Mapping B) Normalization C) Denormalization D) Schema refinement
6. Which normal form removes partial dependency?
A) 1NF B) 2NF C) 3NF D) BCNF
7. Which of the following prevents anomalies in database design?
A) Redundancy B) Normalization C) Denormalization D) Fragmentation
8. Which type of attribute can be divided into smaller subparts?
A) Derived B) Multivalued C) Composite D) Single-valued
9. Which SQL constraint ensures that a column must have a value?
A) UNIQUE B) PRIMARY KEY C) NOT NULL D) CHECK
10. Which type of join returns all rows from both tables, matching where possible?
A) INNER JOIN B) LEFT JOIN C) RIGHT JOIN D) FULL OUTER JOIN
11. Which of these is a DDL command?
A) SELECT B) INSERT C) CREATE D) UPDATE
12. In DBMS, the view is:
A) A physical table B) A virtual table C) A stored procedure D) A synonym for schema
13. The process of combining data from multiple sources into a single table is called:
A) Joining B) Aggregation C) Projection D) Selection
14. Which DBMS language is used to define the structure of a database?
A) DML B) DCL C) DDL D) TCL
15. Which property of RDBMS ensures that each row is unique?
A) Foreign key B) Primary key C) Super key D) Candidate key
16. In RDBMS, referential integrity is maintained through:
A) Primary key B) Foreign key C) Composite key D) Unique key
17. Which normal form eliminates transitive dependency?
A) 1NF B) 2NF C) 3NF D) BCNF
18. A table having no duplicate rows and atomic values is in:
A) 1NF B) 2NF C) 3NF D) BCNF
19. In RDBMS, the number of rows in a table is called:
A) Cardinality B) Degree C) Entity count D) Schema size
20. The number of columns in a table is called:
A) Cardinality B) Degree C) Attribute count D) Tuple count
21. Which of these is NOT a relational operator in SQL?
A) SELECT B) PROJECT C) JOIN D) MERGE
22. In RDBMS, which key can be used as a primary key?
A) Candidate key B) Foreign key C) Alternate key D) Composite key
23. Which RDBMS constraint allows multiple NULL values but forces unique non-null values?
A) PRIMARY KEY B) UNIQUE C) NOT NULL D) CHECK
24. The relationship where one record in a table is related to many records in another table is:
A) 1:1 B) 1:M C) M:M D) Self-join
25. Which join returns only rows with matching values in both tables?
A) INNER JOIN B) LEFT JOIN C) RIGHT JOIN D) FULL OUTER JOIN
26. Which clause is used to filter groups in SQL?
A) WHERE B) HAVING C) GROUP BY D) ORDER BY
27. Which SQL function counts the number of rows?
A) SUM() B) COUNT() C) AVG() D) TOTAL()
28. Which constraint is used to limit the range of values in a column?
A) NOT NULL B) UNIQUE C) CHECK D) DEFAULT
29. To delete all rows from a table but keep the structure:
A) DELETE
B) DROP
C) TRUNCATE
D) REMOVE
30. Which keyword is used to sort query results in SQL?
A) ORDER BY B) SORT BY C) GROUP BY D) ARRANGE BY
31. What will SELECT COUNT(*) FROM students; return?
A) Number of students B) Sum of all values C) Average marks D) List of student names
32. Which query retrieves only unique values from a column?
A) SELECT UNIQUE column B) SELECT DISTINCT column
C) SELECT DIFFERENT column D) SELECT column UNIQUE
33. Which SQL keyword is used to update existing records?
A) CHANGE B) UPDATE C) MODIFY D) ALTER
34. Which of these is a DCL command?
A) GRANT B) DELETE C) SELECT D) CREATE
35. Which SQL function returns the largest value from a column?
A) MAX() B) BIG() C) LARGE() D) TOP()
36. Which query deletes rows where age is NULL?
A) DELETE FROM table WHERE age = NULL B) DELETE FROM table WHERE age IS NULL
C) DELETE FROM table WHERE age != NULL D) DELETE FROM table WHERE age NOT NULL
37. Which SQL clause is used to filter records before grouping?
A) WHERE B) HAVING C) ORDER BY D) GROUP BY
38. Which of the following is NOT a valid aggregate function in SQL?
A) SUM() B) AVG() C) MAX() D) ADD()
39. What will SELECT NOW(); return?
A) Current date and time B) System uptime C) Database creation date D) Server name
40. Which query will rename the table emp to employee?
A) RENAME TABLE emp TO employee B) ALTER TABLE emp RENAME TO employee;
C) CHANGE TABLE emp TO employee D) UPDATE TABLE emp TO employee
41. Which SQL command removes a table completely?
A) TRUNCATE B) DELETE C) DROP D) ERASE
42. Which function returns the average value from a numeric column?
A) SUM() B) AVG() C) MEAN() D) TOTAL()
43. Which join will return rows even if there are no matches in the right table?
A) LEFT JOIN B) RIGHT JOIN C) INNER JOIN D) FULL JOIN