Questions tagged [dao]
In computer software, a data access object (DAO) is an object that provides an abstract interface to some type of database or other persistence mechanism. From Wikipedia: http://en.wikipedia.org/wiki/Data_access_object
57 questions
4 votes
7 answers
2k views
Should there be one-to-one relationship between DAOs and tables?
Should there be a one-to-one relationship between DAOs and tables? For example, should only one DAO communicate with a given table? Our data layer is kind of flawed, e.g. we have a MAN table that ...
0 votes
3 answers
397 views
Java JPA: Transaction logic in DAO vs Service
Being new to JPA and transaction management, I have a Spring Boot REST API application layered like this: Controller -> Service -> DAO -> DB I want to be agnostic from any ORM and am using ...
-1 votes
1 answer
324 views
How to implement DAO design pattern?
I'm trying to learn how to implement a DAO design pattern (for a game, but this does not really matter). In my program, I have a database layer which has user objects. Then in the code, I have a DAO ...
4 votes
4 answers
2k views
Database agnostic DAO (NoSQL + SQL)
Background While writing a new component, I m in middle of making a decision of SQL/NOSQL database (Mongo vs Mysql) for my storage layer. As of today, mysql seems to be a perfect fit for my use-case (...
3 votes
1 answer
1k views
Cross-cutting concerns in package-by-feature structure
What is your suggestion on where to put cross-cutting concerns in a package-by-feature structured app? This aspect seem to be missing from most of the pro package-by-feature articles I have read. ...
3 votes
2 answers
3k views
How should the service layer be done?
so I have this android app at work, if I understand it right the DAO/services/UI layers is to "decouple" the UI from the database. I have 2 problems with that : 1/ Decoupling Like this if things ...
0 votes
1 answer
1k views
MVP - Model Layer Architecture - Where and how to Setup Entities and DAO
I'm coding a "small" application using MVP pattern that gets it's data from a SQL database. I'm not using an ORM out of the box, and for the sake of learning, I'm writing my own simple ORM/DAO type ...
0 votes
2 answers
148 views
Should I create a Repository Container to get my repositories?
@Component public class RepositoryContainer { @Autowired public CommentRepository commentRepository; @Autowired public ItemRepository itemRepository; @Autowired public ...