Skip to main content

All Questions

Filter by
Sorted by
Tagged with
1 vote
1 answer
123 views

Database design using Closure Table for tagging system

I created these database tables with the inspiration in NjDevPro github repository. The design uses Closure Table for implementation of hierarchical tagging system in ...
xralf's user avatar
  • 37
1 vote
0 answers
176 views

Database connector in Python

I've been trying to build an ORM. I started with the connector layer, which is responsible for the database server connections and executes raw SQL as the code below shows. I have built the ...
dark knight's user avatar
4 votes
2 answers
173 views

Image Database Service

I created simply database service with get, insert, get all image names and verify exist method. All images will be store in blob storage with unique filename + postfix size. Next one I have image ...
Petr Tomášek's user avatar
3 votes
1 answer
215 views

Classical model for database connection provider

Let's forget about Spring Singleton Beans and about other frameworks in Java. We have one or more simple HttpServlets. And we should make database connection. (doesn't matter what is it, hibernate ...
Ivan Ermolaev's user avatar
4 votes
2 answers
206 views

DB-to-Java value mapper

In my company, I've inherited some Java library that I'm now writing tests to, refactoring and fixing Sonar issues. One particular point that Sonar is complaining about is a big chaining of ...
Rafael Eyng's user avatar
3 votes
2 answers
18k views

Simple singleton database connection pool

I'm studying design patterns, and to demonstrate a singleton, I've implemented a primitive database connection pool. ConnectionPool.java ...
Levent Divilioglu's user avatar
3 votes
1 answer
125 views

Mapping different classes to the same database table

I have several very similar subclasses that I (think I) want to be stored in the same database table. Most of the fields are identical, with each subclass adding 1 or 2 custom fields. My code is using ...
Felipe's user avatar
  • 131
5 votes
4 answers
1k views

Database adapters

I'm writing adapters for some MS Access database because I really didn't like that automatically generated code that Visual Studio was providing. Right now I just need to get data, not updating ...
yoger's user avatar
  • 303
10 votes
2 answers
16k views

Manage connection without 'using' statement

I replace this common statement: ...
reptildarat's user avatar
4 votes
3 answers
253 views

Cancelling an order with a side-effect of logging the operation

I have a data access layer method to cancel an order. This operation should have an associated "operation history" entry. My first (naïve) implementation looks like this: ...
thomasb's user avatar
  • 287
2 votes
1 answer
3k views

Builder pattern for Codeigniter ActiveRecord queries

I am using Codeigniter and it's ActiveRecord. I had this idea for a base class that provided a generic getter/setter for doing simple queries on a database. I have a lot of database objects that ...
xiankai's user avatar
  • 123