Multiple choice technology web technology

Database can be accessed from service layer

  1. True

  2. False

Reveal answer Fill a bubble to check yourself
B Correct answer
Explanation

In layered architecture, the service layer should NOT directly access the database - it should go through a DAO/repository layer. This separation maintains loose coupling and makes the system testable and maintainable. Direct database access from service layers is considered an anti-pattern.