Re: What solution is better: DB or object?
- From: Malte <You_can_spam_me_here@xxxxxxxxx>
- Date: Wed, 13 Apr 2005 21:45:54 +0200
Audrius wrote:
Maybe i didnt put my problem right...
I'm trying to acomplish such thing: I have a database where i store all the information about Tests. My Test consists of various fields from different tables in DB. So what solution is better, to use SQL queries whenever i need some piece of Test's data (not all data at once), or to use SQL query to read all the data related to particular test into some object once and after I complete working with that test update all the data from object back to db? By the way, application will be working with one test at a time.
What solution would be better looking from performace and memory usage standpoint?
I wont try using hibernate, but this solution would be really good. Thanks for advice.
That's different! You're already using rdbms. I'd say that the frequency of your data needs would govern your strategy. If data does not change you might instantiate one (or several) objects from rdbms data. Depending on your logic it might make more sense to just pull the data you need, when you need it.
There are other factors: What other uses do other applications/users make of the database. Network round trip, etc.
.
- Follow-Ups:
- Re: What solution is better: DB or object?
- From: Audrius
- Re: What solution is better: DB or object?
- References:
- What solution is better: DB or object?
- From: audrius . peseckis
- Re: What solution is better: DB or object?
- From: TSchultz55
- Re: What solution is better: DB or object?
- From: Audrius
- What solution is better: DB or object?
- Prev by Date: Re: Ridiculous readInt() bug? Read-head not advancing far enough?
- Next by Date: Re: stupid question
- Previous by thread: Re: What solution is better: DB or object?
- Next by thread: Re: What solution is better: DB or object?
- Index(es):