473,414 Members | 1,980 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,414 software developers and data experts.

Odd data structure help

I have, over the past few years, developed a Access system that is in
use in our companies engineering, purchasing, and sales departments.
It is a fairly complex system that runs great. So, I am pretty well
versed in Access design (many thanks to all the posters in this group
too, I'm not sure I could have done without).

I do have a situation that has stumped me though. I have a table
listing various parts that are used for a "quote list"
(tblPartsTemplate). The list is getting too long to sort through
manually so I am trying to add some pre-set filters.

In the form where the "quote list" is started I have added four or so
"filters" (CheckBoxes or ComboBoxes) for the user to set-up the
filter.

All the records in tblPartsTemplate relate to two of the various
filters (Filter 1,2). Maybe 25% of the records relate to one other
filter (Filter 3), and another 25% to yet another filter (Filter 4). A
few records relate to all the filters also. Two of these filters are
boolean, and two are user-selectable strings. Right now, I have fields
in this table that basically have a heading of Filter1, Filter2...
ect.

The problem is when I say this: Show me all the records that are the
listed under Filter1. Now, of those records, AND of a particular group
of 25% show me all the records under Filter2. Right here the problem
begins, as I'm sure you saw, I have no way to distinguish "a
particular group of 25%".

I could see splitting the "particular groups" in this table into
different tables, but the records are SO similar otherwise. This table
is used in a ton of other areas of the database and splitting it would
cause major rational problems elsewhere. Also, this "filter" scenario
is the only place the current structure is causing me problems.

Well, I'm not sure that this makes any sense, but I think I need to
look at somehow destinguishing the "particular groups" of records. If
anyone can offer any tips or ideas, it would be much appreciated. And
I'll be sure to post whatever solution I come up with.

Thanks
Jeff
Nov 12 '05 #1
1 1270
You are saying that
Maybe 25% of the records relate to one other
filter (Filter 3), and another 25% to yet ANOTHER filter (Filter 4)
and
A few records relate to all the filters also.
Now, I am confused. So, when you say "filtering", what you are doing is
selecting records that satisfy the criteria. This is already
accomplished by ANDing the criteria. What you want now is to know if a
particular record is a part of those affected (mostly) by Filter1, or
Filter2, or Filters 3 or 4?
This clearly is ambiguous, if you say that
A few records relate to all the filters also.
For one of these, it is impossible to distinguish which 25% the record
belongs to.
But for those records that are not related to all filters, it seems
simple to do - apply filters in reverse order and form the filtering SQL
such that it returns an extra field, say "FilterKey", which is set to
the filter number. Then, UNION these results and you will have the
distinguished records. However, the ambiguous records will be placed in
the broadest filter.
If you apply the filters, flagging the records, in the forward order
(from the broadest to the narrowest) then ambiguous records will be
places in the narrowest filter they satisfy.

Pavel

Jeff Smeker wrote:
I have, over the past few years, developed a Access system that is in
use in our companies engineering, purchasing, and sales departments.
It is a fairly complex system that runs great. So, I am pretty well
versed in Access design (many thanks to all the posters in this group
too, I'm not sure I could have done without).

I do have a situation that has stumped me though. I have a table
listing various parts that are used for a "quote list"
(tblPartsTemplate). The list is getting too long to sort through
manually so I am trying to add some pre-set filters.

In the form where the "quote list" is started I have added four or so
"filters" (CheckBoxes or ComboBoxes) for the user to set-up the
filter.

All the records in tblPartsTemplate relate to two of the various
filters (Filter 1,2). Maybe 25% of the records relate to one other
filter (Filter 3), and another 25% to yet another filter (Filter 4). A
few records relate to all the filters also. Two of these filters are
boolean, and two are user-selectable strings. Right now, I have fields
in this table that basically have a heading of Filter1, Filter2...
ect.

The problem is when I say this: Show me all the records that are the
listed under Filter1. Now, of those records, AND of a particular group
of 25% show me all the records under Filter2. Right here the problem
begins, as I'm sure you saw, I have no way to distinguish "a
particular group of 25%".

I could see splitting the "particular groups" in this table into
different tables, but the records are SO similar otherwise. This table
is used in a ton of other areas of the database and splitting it would
cause major rational problems elsewhere. Also, this "filter" scenario
is the only place the current structure is causing me problems.

Well, I'm not sure that this makes any sense, but I think I need to
look at somehow destinguishing the "particular groups" of records. If
anyone can offer any tips or ideas, it would be much appreciated. And
I'll be sure to post whatever solution I come up with.

Thanks
Jeff

Nov 12 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

5
by: Jeff | last post by:
I've created a beast! Here is my data structure: $VAR1 = 'bunkers'; $VAR2 = { 'items' => , \ ] }; $VAR3 = 'simpsons'; $VAR4 = {
7
by: Santah | last post by:
hi I'm new to C++ and I'm currently working on Visual C++ 6.0 I'm trying to open a text file, and read some data from it part of the text file looks like this: --------
3
by: Mike Jones | last post by:
need help with data structures.Looking for ways to start, sample code, anything Program description: Design and implement a Visual C++ .NET program that inserts values into a data...
2
by: yee young han | last post by:
I need a fast data structure and algorithm like below condition. (1) this data structure contain only 10,000 data entry. (2) data structure's one entry is like below typedef struct _DataEntry_...
11
by: hoopsho | last post by:
Hi Everyone, I am trying to write a program that does a few things very fast and with efficient use of memory... a) I need to parse a space-delimited file that is really large, upwards fo a...
2
by: James Radke | last post by:
Hello, I have a vb.net windows application that is calling an older DLL provided by a third party. They supplied a VB 6 application that, when run on my systemn successfully passes data to the...
6
by: James | last post by:
I am using vb.net and need to keep in memory a large data structure, so I am looking for the best option. And after several test I am pretty confused. So I will be grateful if anyone can help me. ...
29
by: zoltan | last post by:
Hi, The scenario is like this : struct ns_rr { const u_char* rdata; }; The rdata field contains some fields such as :
30
by: Charles Law | last post by:
Here's one that should probably have the sub-heading "I'm sure I asked this once before, but ...". Two users are both looking at the same data, from a database. One user changes the data and...
13
by: farhaaad | last post by:
Dears, I have many feilds in my tables that are left blank for some records, If I make a sub table for it and and change those feilds to a lookup feilds so only those options are chosen which...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.