PrepAway - Latest Free Exam Questions & Answers

Which design pattern should you use for this scenario?

You are creating an application that repeatedly connects to a database to retrieve order data for
invoices. All data comes from the same database. In order to preserve resources, you have to
ensure that only one database connection should be used at any time. The code also has to open
as few new database connections as possible. Which design pattern should you use for this
scenario?

PrepAway - Latest Free Exam Questions & Answers

A.
Adapter

B.
Factory

C.
MVC

D.
Singleton


Leave a Reply

Your email address will not be published. Required fields are marked *