Skip to content

Latest commit

 

History

History
13 lines (10 loc) · 1.32 KB

File metadata and controls

13 lines (10 loc) · 1.32 KB

CRUD with MySQL and Java, using the DAO pattern

DAO Pattern

The DAO (Data Access Object) design pattern is an approach used in software programming to separate the data access logic from the business logic of the application. It allows the application to interact with a database or any other data source in an abstract and decoupled manner. Here are the main points about the DAO:

Data Access Abstraction:

The DAO provides an abstract interface to perform CRUD (Create, Read, Update, Delete) operations on a data source, hiding the specific implementation details.

Encapsulation:

It encapsulates the complexity and particulars of data access, offering simple and intuitive methods for the application to use.

Decoupling:

The separation between business logic and data access logic facilitates system maintenance and evolution, as changes in how data is accessed do not affect business logic.

Testing Facilitation:

With the DAO, it is easier to create unit tests, as the data access logic can be easily mocked or replaced with test implementations.

Code Reusability:

It promotes code reuse by centralizing data access operations in one place.

UML diagram

UML - model