Loading

Quipoin Menu

Learn • Practice • Grow

express-js / MySQL/PostgreSQL with Express
mcq
Direction: Choose the correct option

Q1.

Which npm package is commonly used to connect to MySQL from Express?
A. sequelize
B. mysql2
C. pg
D. mongoose
Direction: Choose the correct option

Q2.

What is Sequelize?
A. A Promise-based ORM for SQL databases
B. A template engine
C. A testing framework
D. An ODM for MongoDB
Direction: Choose the correct option

Q3.

How do you define a model in Sequelize?
A. Sequelize.createModel('User', ...)
B. sequelize.define('User' { attributes })
C. new Sequelize.Model('User', ...)
D. Model.define('User', ...)
Direction: Choose the correct option

Q4.

What does User.findAll() return in Sequelize?
A. A Promise that resolves to an array of User instances
B. An array of raw data
C. A boolean
D. A cursor
Direction: Choose the correct option

Q5.

Which method is used to establish a connection pool in Sequelize?
A. You use sequelize.connect()
B. You need to call sequelize.pool()
C. It's done automatically when instantiating Sequelize
D. You configure it in the model