Tagged Questions
1
vote
4answers
72 views
Save and load objects without breaking encapsulation
I want to save and load objects to a database without using a ORM (like Hibernate).
Lets say i have the following class:
public class Person {
private int age;
public void birthday(){
...
4
votes
2answers
485 views
best practice for accessing data in a database while abstracting the accessing
I am attempting to learn the best practices for the following scenario.
I have a defined set of data objects that are subject to change with updates. And some of these objects have arrays of other ...
0
votes
2answers
54 views
How to join queries on multiple data sources and page them effectively
Lets say i have two data sources for some entity say... Users. LDAP and custom Sql Database.
Now in my application, I have to show a page of users filtered from both databases based on some 'Where' ...
0
votes
2answers
113 views
Inserting into database from many different websites
I have a customer enquiry management website with many different websites (on different servers) sending enquiries into it. Currently each website has a contact form on the page and the form creates a ...
0
votes
2answers
173 views
How to notify the views when the database changes? (MVC, C#)
I'm thinking on a good design which is based on MVC and works with databases, but I have no idea how to notify the views of certain database-changes.. What technique to use, do I need more layers or ...
0
votes
2answers
216 views
Which design pattern to use in Interfacing Async Server to database?
I have implemented a Async TCP Server using TcpListener class. (Async means, it is non-blocking). It accepts multiple client connections , read data as it comes and provides callback. The messages ...
0
votes
2answers
452 views
Design pattern for filtering products?
If you go to a website like Newegg or B&H when they show a list of products, there are several filter options like Brand, Price, Size, Color, etc.
What is a good design pattern for something like ...
0
votes
2answers
233 views
Problematic data patterns, performance-wise
Assertion: the performance of SQL databases degrades when the volume of data becomes very large (say, tens or hunderds of terabytes).
This means certain patterns in database design which are ...
3
votes
1answer
791 views
How to apply OOP technique to Delphi database programming?
I've been using Delphi for about 10 years to develop database applications.
My everyday life cycle is about creating a new TForm, dropping components such as TSQLQuery, TDataSource (as 2-tier ...
2
votes
1answer
285 views
Implement Iterator design pattern using JDBC
I'm tackling the following question:
The iterator design pattern is one that has strong encapsulation. As an example; a library wants a book management system. A class for the books storing their ...
2
votes
1answer
127 views
How should laying out data sent to view in regard to localized texts be approached in asp .net mvc?
Let's say I want to show a fieldset that contains a form and a button.
There will be some textboxes for I/O values and some labels for:
the fieldset title (not related to values)
textboxes (labels ...
2
votes
1answer
341 views
android content provider - design pattern for hiding inner complexity yet allowing complex queries
I have a question regarding best practice for implementing complex queries with content providers. As I see from the android contact content provider it is recommended to use the fields selection, ...
2
votes
1answer
124 views
Recommended pattern for domain entities containing data from multiple databases
I maintain an application which has many domain entities that draw data from more than one database. The way this normally works is that the entities are loaded from Database A (in which most of their ...
1
vote
1answer
260 views
Complex Search with Data Access Layer
I have entities like this. I made them simplier for this sample:
public class City
{
public int Id { get; set; }
public string Name { get; set; }
}
public class Street
{
public int Id { ...
1
vote
1answer
506 views
C# Design How to Elegantly wrap a DAL class
I have an application which uses MyGeneration's dOODads ORM to generate it's Data Access Layer. dOODad works by generating a persistance class for each table in the database. It works like so:
// ...
1
vote
1answer
471 views
Database Replication OOD Pattern
Greetings fellow overflowers,
After reading on MSDN about correct strategies on how to perform database replication, and understanding their suggestion on Master-Subordinate Incremental Replication. ...
0
votes
1answer
23 views
Where should i access my Database
I'm curious how you would handle following Database access.
Let's suggest you have a Computer which Hosts your database as part of his server work and multiple client PC's which has some ...
0
votes
1answer
38 views
Saving Customer Orders to the database and ensuring integrity of that order is preserved
In my Rails app, I need to store customer orders so the shop owner can still refer to the orders at a later time.
I'm concerned that after an order has been finalised, that some time later the store ...
0
votes
1answer
18 views
java technology for updating multiple database structures
i have to write a component to read xml files and update already created database table. the problem is the xmls change to have new data and the corresponding database table structure then changes.
...
0
votes
1answer
27 views
Does database affect classes?
I had created one class User and UserDAOImpl class for querying DB using class User. As there is one table to be queried, these two classes are sufficient for me.
What if there is a case where new ...
0
votes
1answer
29 views
What design patterns might be useful for creating a logical report engine?
I am designing (and coding) a report engine, that produces the aggregated data for a report - this is not about the presentation layer.
Example :
I've got a database full of people records. Each ...
0
votes
1answer
92 views
Which design pattern to use for my usecase?
My core usecase is to read/write from database and directory server.
Eg.
createUser,
modifyUser,
associateGroup,
changePassword etc
I have several other functionalities to be done in several of ...
0
votes
1answer
74 views
Business Logic Design
I'm Developing a website using asp.net and sql server i'm using EF with the code first approach as a Data access layer, and the business logic layer(BLL) i've developed a class for each entity that ...
0
votes
1answer
147 views
How to classify data to different categories with their purpose in ERP Applications?
all
I am recently pondering that how to classify data into different categories in Erp solutions, basing on that, I can decide which data should I strip out and put it into a shared database for ...
0
votes
1answer
158 views
Unity of work used with more database
I am learning some patterns, Unity of work / repository... There are some examples on web, but no one connects to more than one database.
In my applications almost always I have the need to get some ...
0
votes
1answer
254 views
Adapter pattern in use and inheritance for a simple DB connection
I have a little problem trying to understand how my current database connection class was designed as an Adaptor. It provides a connect method which will invoke the parent's connect method which is ...
0
votes
1answer
56 views
Best way to import and integrate to external records system
We're building a product for the education market, for which we have a few initial customers.
Our tool needs to have student, faculty, staff & course data. All this data is already built into the ...
0
votes
1answer
471 views
how to design classes to handle database query with several tables?
I just wanna propose some discussion here. This question comes to me because I need to refactoring some messy codes.
Usually, in web applications, MVC is the most common pattern for the ...
2
votes
0answers
121 views
Correct bitmap loading in Android regarding patterns and clean code programming
I am currently working on my first serious android app. It is the first time I am appliying solid patterns programing and design which I learnt during the university studies. I have come across a ...
1
vote
0answers
44 views
MySQL Data Overrides
I am working on a project where an object (a product for example) could have potentially hundreds of attributes. Objects may have different attributes as well. Because of this, among other more ...
1
vote
0answers
172 views
Own ORM and data redundancy when mapping multiple tables into one object
Firstly, sorry for my English.
This is my first time playing with databases in Java and I want to write a simple middle-layer (between database and application) in pure JDBC and SQL which will map my ...
1
vote
0answers
75 views
What pattern applies to encapsulating “contextual” queries?
At the moment, my project at work has a very inefficient loop which is suffering the n + 1 problem to a great degree. (6n + 1, I think.) Currently, a number of web services instantiate an object ...
1
vote
0answers
149 views
Need ideas for deep loading
Details: C# 2.0, SQL Server 2005
I have recently relinquished the idea that I would be able to get NHibernate working with my project. It would have worked great if I had started with it, but now it ...
0
votes
0answers
17 views
Want to migrate a crucial set of tables from one data center from US to another data center
How to find the Dependencies on the tables
How to insert huge data loads without DB timeouts.
Where to have the logging and auditing ?
0
votes
0answers
20 views
What are some accepted patterns to load a UITableView with server-side data?
Goal: A UITableView(Controller) that:
Loads server-side content and:
Feels responsive to the user (e.g. progress wheels)
Is thread-safe
My current approach: My current approach feels very ...
0
votes
0answers
37 views
Database Process Rollback Design Pattern
I am using a database Script (oracle Request) that applies changes to many tables, sometimes I need to rollback the process, and it is a headache to do it manually, so I was thinking to do a custom ...
0
votes
0answers
22 views
A good way to manage/maintain privacy and terms pages?
I have word documents of privacy and terms and converted them into php includes that are basically this structure:
<div>
<h1>title</h1>
<p>text</p>
...
0
votes
0answers
35 views
Data managing with SQLite in Android
I know there are many articles and patterns about good database managing but I can't figure out the best way of handling my data in Android.
The structure of my data classes have nearly the same ...
0
votes
0answers
33 views
PHP - Call the same method for a collection of objects
I have to call the same method for each object of an objects array, iteratively. This method contains a database query.
Is there a pattern that I can follow to achieve this, avoiding to perform the ...
0
votes
0answers
29 views
Pull out dynamic metrics from structured data
I would like to build a system which would pull out required metrics of data in a database. These metrics would help in analyzing and building reports.
For instance I have a table Appointment which ...
0
votes
0answers
30 views
To encapsulate SQL query into the classes inherited from base class Entity
I have a DB which contains four tables: Department, Employee, Task and Project. I need to develop a program such that we can bind several projects, tasks, we must to create new projects and bind ...
0
votes
0answers
170 views
Some approach to work with big data cases
At the company that I work we have some problems with performance loading the data of database.
Our ERP works with a big database and we need to make some complex queries.
We are using C# following ...
0
votes
0answers
808 views
Best practice to store composite object in database
I have some hierarchy of objects in my program (i.e. PHP). Its composite design pattern used. I.e. countries -> states -> cities -> districts. Whithin my code I often work with this objects ...
0
votes
0answers
158 views
Chronological data model
On the twitter website if you click on the connect tab on the top of the screen (https://twitter.com/i/connect) you get this nice little chronological display of your tweets and when new people ...