[go: up one dir, main page]

0% found this document useful (0 votes)
20 views6 pages

New Microsoft Word Document

Uploaded by

Likith SR
Copyright
© © All Rights Reserved
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% found this document useful (0 votes)
20 views6 pages

New Microsoft Word Document

Uploaded by

Likith SR
Copyright
© © All Rights Reserved
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/ 6

Sure, here are 20 multiple-choice questions along with their answers:

1. Which of the following is not a type of database model?

a) Hierarchical

b) Relational

c) Sequential

d) NoSQL

Answer: c) Sequential

2. In a relational database, what is a primary key used for?

a) To uniquely identify each record in a table

b) To establish relationships between tables

c) To enforce referential integrity

d) To perform complex calculations

Answer: a) To uniquely identify each record in a table

3. Which of the following is an example of a NoSQL database?

a) MySQL

b) MongoDB

c) Oracle

d) SQL Server

Answer: b) MongoDB

4. What does ACID stand for in database management?

a) Atomicity, Consistency, Integrity, Durability

b) Association, Connectivity, Integrity, Dependency

c) Attribute, Constraint, Inheritance, Design

d) Automated, Controlled, Inclusive, Durable

Answer: a) Atomicity, Consistency, Integrity, Durability

5. Which SQL keyword is used to retrieve data from a database?


a) FETCH

b) SELECT

c) RETRIEVE

d) QUERY

Answer: b) SELECT

6. What does SQL stand for?

a) Standard Query Language

b) Structured Query Language

c) Simple Query Language

d) Sequential Query Language

Answer: b) Structured Query Language

7. Which of the following is a data manipulation command in SQL?

a) CREATE

b) ALTER

c) DELETE

d) JOIN

Answer: c) DELETE

8. Which type of join returns only the rows that have matching values in both tables?

a) Inner join

b) Left join

c) Right join

d) Outer join

Answer: a) Inner join

9. Which normal form ensures that there are no repeating groups of data within a table?

a) First Normal Form (1NF)

b) Second Normal Form (2NF)

c) Third Normal Form (3NF)


d) Boyce-Codd Normal Form (BCNF)

Answer: a) First Normal Form (1NF)

10. Which SQL command is used to add a new row to a table?

a) INSERT

b) ADD

c) CREATE

d) UPDATE

Answer: a) INSERT

11. What is the purpose of the COMMIT statement in SQL?

a) To save all changes made to the database

b) To discard all changes made since the last COMMIT or ROLLBACK

c) To undo the most recent change to the database

d) To create a new transaction

Answer: a) To save all changes made to the database

12. Which of the following is NOT a valid data type in SQL?

a) TEXT

b) FLOAT

c) BOOLEAN

d) DECIMALS

Answer: d) DECIMALS

13. Which command is used to remove a table from the database in SQL?

a) DROP

b) REMOVE

c) DELETE

d) ERASE

Answer: a) DROP
14. Which SQL clause is used to filter the results of a query based on a specified condition?

a) WHERE

b) HAVING

c) FILTER

d) LIMIT

Answer: a) WHERE

15. Which of the following is an example of a DDL (Data Definition Language) command?

a) SELECT

b) UPDATE

c) CREATE

d) DELETE

Answer: c) CREATE

16. In a relational database, what is a foreign key used for?

a) To uniquely identify each record in a table

b) To establish relationships between tables

c) To enforce referential integrity

d) To perform mathematical operations

Answer: c) To enforce referential integrity

17. Which of the following is NOT a type of database index?

a) Primary index

b) Secondary index

c) Clustered index

d) Cartesian index

Answer: d) Cartesian index

18. What is the purpose of the GROUP BY clause in SQL?

a) To sort the results of a query

b) To group rows that have the same values into summary rows
c) To filter the results of a query based on a specified condition

d) To limit the number of rows returned by a query

Answer: b) To group rows that have the same values into summary rows

19. Which of the following is an example of a distributed database?

a) SQLite

b) Microsoft Access

c) Cassandra

d) PostgreSQL

Answer: c) Cassandra

20. Which SQL function is used to find the maximum value in a column?

a) MAX()

b) MIN()

c) AVG()

d) SUM()

Answer: a) MAX()
1. Which of the following is not a type of database model?
a) Hierarchical
b) Relational
c) Sequential
d) NoSQL

2. In a relational database, what is a primary key used for?


a) To uniquely identify each record in a table
b) To establish relationships between tables
c) To enforce referential integrity
d) To perform complex calculations

3. Which type of join returns only the rows that have matching values in both tables?
a) Inner join
b) Left join
c) Right join
d) Outer join

4. What is the purpose of the GROUP BY clause in SQL?


a) To sort the results of a query
b) To group rows that have the same values into summary rows
c) To filter the results of a query based on a specified condition
d) To limit the number of rows returned by a query

5. Differentiate between composite and simple (atomic) attributes in a database schema, providing
an example for each. Explain how these attributes are represented in an Entity-Relationship (ER)
Diagram.

You might also like