Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Active Record pattern #79

Open
iluwatar opened this issue Jun 23, 2015 · 17 comments · May be fixed by #3087
Open

Active Record pattern #79

iluwatar opened this issue Jun 23, 2015 · 17 comments · May be fixed by #3087

Comments

@iluwatar
Copy link
Owner

iluwatar commented Jun 23, 2015

Description

The Active Record design pattern is a common architectural pattern used to manage database records. It simplifies data access by encapsulating the database logic within a model class. Each instance of the model corresponds to a row in the database, and the model class includes methods for CRUD (Create, Read, Update, Delete) operations.

Main Elements of Active Record Pattern:

  1. Model Class: Represents a table in the database. Each instance represents a single row.
  2. CRUD Operations: Methods for Create, Read, Update, and Delete operations are defined within the model.
  3. Database Connection: The model class manages the database connection.
  4. Simple Queries: Basic querying capabilities are encapsulated within the model.

References

Acceptance Criteria

  1. A new model class should be created, representing a database table.
  2. The model class should include methods for basic CRUD operations.
  3. The implementation should adhere to the project’s contribution guidelines and include relevant documentation and unit tests.
@stephen-lazarionok
Copy link

I may help with implementing this pattern. Please let me know if it's oaky with you.

@iluwatar
Copy link
Owner Author

Sure, go ahead, your contribution is welcome!

@stephen-lazarionok
Copy link

Okay, I will work on this pattern

@stephen-lazarionok
Copy link

Pull request #206 is prepared. Please review.

@stephen-lazarionok
Copy link

I've fixed the points raised and left my comments

@iluwatar
Copy link
Owner Author

jOOQ uses Active Record pattern: http://www.jooq.org/

@iluwatar
Copy link
Owner Author

iluwatar commented Jul 7, 2020

Described in book "Patterns of Enterprise Application Architecture" by Fowler

@iluwatar
Copy link
Owner Author

@TwentyVentti
Copy link

TwentyVentti commented Oct 12, 2022

@iluwatar I can help work on this pattern let me know if that’s okay with you.

@iluwatar
Copy link
Owner Author

Nice, please go ahead @TwentyVentti

sergejsvisockis added a commit to sergejsvisockis/java-design-patterns that referenced this issue Apr 1, 2024
sergejsvisockis added a commit to sergejsvisockis/java-design-patterns that referenced this issue Apr 1, 2024
sergejsvisockis added a commit to sergejsvisockis/java-design-patterns that referenced this issue Apr 1, 2024
sergejsvisockis added a commit to sergejsvisockis/java-design-patterns that referenced this issue Apr 15, 2024
sergejsvisockis added a commit to sergejsvisockis/java-design-patterns that referenced this issue Apr 15, 2024
sergejsvisockis added a commit to sergejsvisockis/java-design-patterns that referenced this issue Apr 15, 2024
sergejsvisockis added a commit to sergejsvisockis/java-design-patterns that referenced this issue Apr 15, 2024
sergejsvisockis added a commit to sergejsvisockis/java-design-patterns that referenced this issue Apr 15, 2024
sergejsvisockis added a commit to sergejsvisockis/java-design-patterns that referenced this issue Apr 15, 2024
sergejsvisockis added a commit to sergejsvisockis/java-design-patterns that referenced this issue Apr 15, 2024
sergejsvisockis added a commit to sergejsvisockis/java-design-patterns that referenced this issue Apr 15, 2024
sergejsvisockis added a commit to sergejsvisockis/java-design-patterns that referenced this issue Apr 15, 2024
sergejsvisockis added a commit to sergejsvisockis/java-design-patterns that referenced this issue Apr 15, 2024
sergejsvisockis added a commit to sergejsvisockis/java-design-patterns that referenced this issue Apr 15, 2024
sergejsvisockis added a commit to sergejsvisockis/java-design-patterns that referenced this issue Apr 15, 2024
sergejsvisockis added a commit to sergejsvisockis/java-design-patterns that referenced this issue Apr 15, 2024
sergejsvisockis added a commit to sergejsvisockis/java-design-patterns that referenced this issue Apr 15, 2024
sergejsvisockis added a commit to sergejsvisockis/java-design-patterns that referenced this issue Apr 15, 2024
sergejsvisockis added a commit to sergejsvisockis/java-design-patterns that referenced this issue Apr 15, 2024
sergejsvisockis added a commit to sergejsvisockis/java-design-patterns that referenced this issue Apr 15, 2024
sergejsvisockis added a commit to sergejsvisockis/java-design-patterns that referenced this issue Apr 15, 2024
sergejsvisockis added a commit to sergejsvisockis/java-design-patterns that referenced this issue Apr 15, 2024
sergejsvisockis added a commit to sergejsvisockis/java-design-patterns that referenced this issue Apr 15, 2024
@iluwatar
Copy link
Owner Author

Updated task description

@ipaulaandreea
Copy link

@iluwatar Can you assign me with this task, please?

@iluwatar iluwatar moved this from Todo to In Progress in Java Design Patterns project Oct 13, 2024
ipaulaandreea added a commit to ipaulaandreea/java-design-patterns that referenced this issue Nov 5, 2024
@ipaulaandreea ipaulaandreea linked a pull request Nov 5, 2024 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: In Progress
Development

Successfully merging a pull request may close this issue.

6 participants