 |
BorlandTalk.com Borland discussion newsgroups
|
| View previous topic :: View next topic |
| Author |
Message |
Guest
|
Posted: Tue Oct 17, 2006 10:56 pm Post subject: Want help with database diagnostics tool design. |
|
|
Hi,
Currently I'm writing a database diagnostics application using Delphi 5
and an Access database (which i cannot make changes to). Since I'm not
an experienced Delphi programmer I was hoping you could help me out and
give me some advice.
The database contains observations of some kind. The purpose of the
application is to let the user scan for absurd observations by enabling
a number of filters and setting their parameters. My idea for solving
this problem is to let each of the filters represent a specific query
string which selects all the observations which meets the criteria
specified by the filter. When the user execute a diagnostics the idea
is that all query strings (for selected filters) are joined together:
Filter 1 Query
UNION
Filter 2 Query
..
..
..
UNION
Filter N Query
Then the composite query string is sent to a data module which is
responsible for filling a DataSet with the filtered relations.
Does this seem like a good way to go about this or am I barking up the
wrong tree so to speak? Initially I was thinking about writing a
three-tier application, designing my own DAL but it seems kind of
overkill?
All input would be greatly appreciated! |
|
| Back to top |
|
 |
DB-1 Guest
|
Posted: Wed Oct 18, 2006 1:19 pm Post subject: Re: Want help with database diagnostics tool design. |
|
|
MorrganMail (AT) gmail (DOT) com wrote:
| Quote: |
Filter 1 Query
UNION
Filter 2 Query
.
.
.
UNION
Filter N Query
Then the composite query string is sent to a data module which is
responsible for filling a DataSet with the filtered relations.
|
Using Union in SQL queries is a good and often used technique to combine
several criterias.
| Quote: | Does this seem like a good way to go about this or am I barking up the
wrong tree so to speak?
|
If that kind of SQL clause does what you want, it runs reliably and is
fast enough, then the solution is quite all right. Do some simple proto,
not at all yet thinking about the User Interface, just make the hard
coded SQL sentence to execute, and check what kind of data you can get
with your SQL queries.
| Quote: | Initially I was thinking about writing a three-tier application, designing
my own DAL but it seems kind of overkill?
|
I have always considered Access being kind of a toy database, suited
best to integrated Office type automation environments. Even MS is not
marketing it any more, but MSDE etc. databases have come to replace it.
So it depends, what kind of databases you are trying to diagnose. If
there are some Web-sites using Access database, and you should diagnose
them over the internet then you have to build your solutions according
to that.
For local Access databases I would not invest my time and money to write
any complicated n-tier solutions to this kind of application. Of course,
if there is money to get on the market, and it absolutely requires
n-tier solution before you can get that money then write the needed
n-tier code.
| Quote: | All input would be greatly appreciated!
|
I have never written that kind of diagnostic tools, so take all the
given thoughts from that starting point. Good luck though:)
DB-1 |
|
| Back to top |
|
 |
Guest
|
Posted: Wed Oct 18, 2006 3:28 pm Post subject: Re: Want help with database diagnostics tool design. |
|
|
| Quote: | I have never written that kind of diagnostic tools, so take all the
given thoughts from that starting point. Good luck though:)
DB-1
|
Me neither but we seem to agree and that can't be a bad thing.
Thanks for your input! |
|
| Back to top |
|
 |
Dan Guest
|
Posted: Wed Oct 18, 2006 8:06 pm Post subject: Re: Want help with database diagnostics tool design. |
|
|
On 17 Oct 2006 10:56:25 -0700, MorrganMail (AT) gmail (DOT) com wrote:
| Quote: | Hi,
Currently I'm writing a database diagnostics application using Delphi 5
and an Access database (which i cannot make changes to). Since I'm not
an experienced Delphi programmer I was hoping you could help me out and
give me some advice.
The database contains observations of some kind. The purpose of the
application is to let the user scan for absurd observations by enabling
a number of filters and setting their parameters. My idea for solving
this problem is to let each of the filters represent a specific query
string which selects all the observations which meets the criteria
specified by the filter. When the user execute a diagnostics the idea
is that all query strings (for selected filters) are joined together:
Filter 1 Query
UNION
Filter 2 Query
.
.
.
UNION
Filter N Query
|
How big is N?
How many rows are there in the DB?
| Quote: |
Then the composite query string is sent to a data module which is
responsible for filling a DataSet with the filtered relations.
Does this seem like a good way to go about this or am I barking up the
wrong tree so to speak? Initially I was thinking about writing a
three-tier application, designing my own DAL but it seems kind of
overkill?
|
As DB-1 wrote, this will work. You have to build the query on the fly.
Another approach which I have used successfully to do this kind of
search is to construct a WHERE clause with the needed criteria. Its a
bit too much to post, but I will be happy to email you (or anyone else
who's interested) some code and notes on using it.
| Quote: |
All input would be greatly appreciated! |
|
|
| Back to top |
|
 |
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|