this post was submitted on 24 Jun 2023
8 points (83.3% liked)
Experienced Devs
3956 readers
1 users here now
A community for discussion amongst professional software developers.
Posts should be relevant to those well into their careers.
For those looking to break into the industry, are hustling for their first job, or have just started their career and are looking for advice, check out:
- Logo base by Delapouite under CC BY 3.0 with modifications to add a gradient
founded 1 year ago
MODERATORS
you are viewing a single comment's thread
view the rest of the comments
view the rest of the comments
Hello. Appreciate your question. I think that this is a good use case for the Repository Pattern.
In your case, this might look something like this:
You can consult the Design Patterns / Gang of Four book for more details
Off topic, but personally I don't feel you should worry too much about having to change the database in the future. I have rarely seen it happen in my career.