The document contains multiple choice questions about database management systems and SQL. It covers topics like DBMS components, data models, database design concepts like normalization and keys, SQL commands, aggregate functions, and more.
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0 ratings0% found this document useful (0 votes)
20 views
MCQ1
The document contains multiple choice questions about database management systems and SQL. It covers topics like DBMS components, data models, database design concepts like normalization and keys, SQL commands, aggregate functions, and more.
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 5
1. Which of the following is not a type of DBMS?
a) Hierarchical b) Relational c) Sequential
d) Object-oriented Answer: c) Sequential 2. What does DBMS stand for? a) Data Building Management System b) Data Business Management System c) Database Management System d) Data Buffer Management System Answer: c) Database Management System 3. Which component of DBMS stores metadata about the database? a) Database Application b) Query Processor c) Data Dictionary d) Database Administrator Answer: c) Data Dictionary 4. Which normal form ensures that there are no multivalued dependencies? a) First Normal Form (1NF) b) Second Normal Form (2NF) c) Third Normal Form (3NF) d) Fourth Normal Form (4NF) Answer: c) Third Normal Form (3NF) 5. Which of the following is not a property of ACID in database transactions? a) Atomicity b) Consistency c) Isolation d) Durability e) Integrity Answer: e) Integrity 6. Which type of join returns all rows when there is a match in one of the tables? a) Inner Join b) Outer Join c) Self Join d) Cross Join Answer: b) Outer Join 7. What is the purpose of the SQL command "GROUP BY"? a) To delete a group of records b) To update a group of records c) To retrieve data grouped by specified columns d) To insert a group of records Answer: c) To retrieve data grouped by specified columns 8. Which SQL command is used to remove a table from the database? a) DELETE TABLE b) REMOVE TABLE c) DROP TABLE d) ERASE TABLE Answer: c) DROP TABLE 9. Which type of index uses a tree-like structure for fast data retrieval? a) Hash Index b) B- Tree Index c) Bitmap Index d) Clustered Index Answer: b) B-Tree Index 10. Which SQL command is used to add new rows to a table? a) INSERT INTO b) ADD ROW c) UPDATE d) CREATE ROW Answer: a) INSERT INTO 11. What is a primary key in a relational database? a) A key used for authentication b) A unique identifier for a record in a table c) A key used for encryption d) A key used for sorting records Answer: b) A unique identifier for a record in a table 12. Which of the following statements about triggers in a DBMS is true? a) Triggers cannot be used to enforce integrity constraints b) Triggers execute only before an operation c) Triggers execute only after an operation d) Triggers can execute both before and after an operation Answer: d) Triggers can execute both before and after an operation 13. Which type of database model organizes data into a tree-like structure? a) Hierarchical b) Relational c) Object-oriented d) Network Answer: a) Hierarchical 14. What does DDL stand for in the context of databases? a) Data Definition Language b) Data Display Language c) Database Description Language d) Dynamic Data Linking Answer: a) Data Definition Language 15. Which SQL command is used to modify existing data in a table? a) UPDATE b) MODIFY c) ALTER d) CHANGE Answer: a) UPDATE 16. Which type of constraint ensures that the value in a column is unique across the table? a) PRIMARY KEY b) FOREIGN KEY c) UNIQUE d) CHECK Answer: c) UNIQUE 17. What does CRUD stand for in database operations? a) Create, Review, Update, Delete b) Create, Retrieve, Update, Display c) Change, Report, Update, Delete d) Create, Read, Update, Delete Answer: d) Create, Read, Update, Delete 18. Which SQL command is used to retrieve data from a database? a) FETCH b) GET c) SELECT d) SEARCH Answer: c) SELECT 19. In a relational database, what is a foreign key? a) A key that uniquely identifies a record in a table b) A key that references the primary key in another table c) A key used for encryption d) A key that is automatically generated by the DBMS Answer: b) A key that references the primary key in another table 20. Which of the following is not a type of database architecture? a) Client-Server b) Peer- to-Peer c) Hierarchical d) Hybrid Answer: d) Hybrid 21. What is the purpose of the SQL command "JOIN"? a) To combine rows from two or more tables based on a related column between them b) To delete rows from a table c) To update rows in a table d) To retrieve data from a single table Answer: a) To combine rows from two or more tables based on a related column between them 22. Which of the following is not a valid data type in SQL? a) Text b) Integer c) Decimal d) Boolean Answer: d) Boolean 23. Which normal form eliminates transitive dependencies? a) First Normal Form (1NF) b) Second Normal Form (2NF) c) Third Normal Form (3NF) d) Fourth Normal Form (4NF) Answer: b) Second Normal Form (2NF) 24. Which SQL command is used to delete data from a database table? a) DELETE b) REMOVE c) ERASE d) DROP Answer: a) DELETE 25. Which type of database model allows objects to be defined with properties and methods? a) Hierarchical b) Relational c) Object-oriented d) Network Answer: c) Object- oriented 26. What is the purpose of the SQL command "HAVING"? a) To filter records based on a specified condition b) To sort records in ascending or descending order c) To perform aggregate functions on grouped data d) To limit the number of records returned by a query Answer: c) To perform aggregate functions on grouped data 27. Which SQL command is used to create a new database? a) CREATE DATABASE b) ADD DATABASE c) MAKE DATABASE d) NEW DATABASE Answer: a) CREATE DATABASE 28. Which type of index uses a list of pointers to rows in a table? a) Hash Index b) B-Tree Index c) Bitmap Index d) Clustered Index Answer: d) Clustered Index 29. In a relational database, what is a tuple? a) A group of related attributes b) A row in a table representing a single record c) A column in a table d) A subset of a table's data Answer: b) A row in a table representing a single record 30. Which SQL command is used to rename a table? a) ALTER TABLE b) RENAME TABLE c) MODIFY TABLE d) CHANGE TABLE Answer: a) ALTER TABLE 31. What is the purpose of the SQL command "UNION"? a) To combine the results of two or more SELECT statements into a single result set b) To filter duplicate rows from a result set c) To sort the result set in ascending order d) To perform a join operation between tables Answer: a) To combine the results of two or more SELECT statements into a single result set 32. Which of the following is not a valid SQL aggregate function? a) SUM b) AVG c) MAXIMUM d) COUNT Answer: c) MAXIMUM 33. What is a view in a relational database? a) A virtual table based on the result of a SELECT query b) A physical table containing data c) A table used for storing temporary data d) A table that cannot be modified Answer: a) A virtual table based on the result of a SELECT query 34. Which SQL command is used to add a new column to an existing table? a) ADD COLUMN b) INSERT COLUMN c) CREATE COLUMN d) ALTER TABLE Answer: d) ALTER TABLE 35. Which type of relationship exists between tables when a record in one table can have multiple related records in another table? a) One-to-One b) One-to-Many c) Many-to- One d) Many-to-Many Answer: b) One-to-Many 36. What is the purpose of the SQL command "ALTER"? a) To delete a table from the database b) To modify the structure of an existing table c) To insert new rows into a table d) To retrieve data from a table Answer: b) To modify the structure of an existing table 37. Which SQL command is used to enforce referential integrity between tables? a) SET CONSTRAINT b) ADD CONSTRAINT c) CHECK CONSTRAINT d) FOREIGN KEY Answer: b) ADD CONSTRAINT 38. Which of the following is not a valid SQL data type for storing date and time values? a) DATE b) TIME c) TIMESTAMP d) DATETIME Answer: d) DATETIME 39. What is a trigger in a DBMS? a) A statement that performs an action automatically when a specified event occurs b) A key used for encryption c) A key that uniquely identifies a record in a table d) A key that references the primary key in another table Answer: a) A statement that performs an action automatically when a specified event occurs 40. Which SQL command is used to revoke privileges from a user in a database? a) REVOKE b) DENY c) REMOVE d) DISALLOW Answer: a) REVOKE 41. What is the purpose of normalization in database design? a) To reduce redundancy and dependency in data b) To increase redundancy and dependency in data c) To make data retrieval slower d) To make data retrieval faster Answer: a) To reduce redundancy and dependency in data 42. Which of the following is not a valid SQL comparison operator? a) != b) <> c) >< d) = Answer: c) >< 43. What is the purpose of the SQL command "ROLLBACK"? a) To permanently save changes made by a transaction b) To undo changes made by a transaction c) To commit changes made by a transaction d) To begin a new transaction Answer: b) To undo changes made by a transaction 44. Which type of database model allows records to have multiple parent and child records? a) Hierarchical b) Relational c) Object-oriented d) Network Answer: d) Network 45. What does DML stand for in the context of databases? a) Data Management Language b) Database Modeling Language c) Data Manipulation Language d) Database Migration Language Answer: c) Data Manipulation Language 46. Which SQL command is used to grant privileges to a user in a database? a) GRANT b) ALLOW c) PROVIDE Answer -: Grant