Loading

Quipoin Menu

Learn • Practice • Grow

express-js / Express.js Database Basics
mcq
Direction: Choose the correct option

Q1.

What is the role of a database in an Express application?
A. To serve static files
B. To persist and manage data
C. To handle HTTP requests
D. To render views
Direction: Choose the correct option

Q2.

Which of the following is a NoSQL database commonly used with Express?
A. SQLite
B. MySQL
C. PostgreSQL
D. MongoDB
Direction: Choose the correct option

Q3.

What is an ORM/ODM?
A. A server
B. A type of database
C. A query language
D. A library that maps database records to objects in code
Direction: Choose the correct option

Q4.

How do you typically connect to a database in an Express app?
A. Using a database driver or ORM/ODM in your startup code
B. By using middleware
C. By configuring the server
D. By writing raw SQL in route handlers
Direction: Choose the correct option

Q5.

Why should database connection details (like passwords) not be hardcoded?
A. To avoid syntax errors
B. For security and flexibility
C. Because Express doesn't support hardcoding
D. To improve performance