473,621 Members | 2,745 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Best way to find a record in a table with a large number of entries?

It's a database keeping info about people and is expected to contain
20,000 to 25,000 people. I could put a GoToPerson Combo on the form,
but the customer and I are not to keen on that. It makes finding a
person difficult for casual users. I'm thinking of a pop-up search
form that will allow some flexibility in searching and also display
results in a subform (e.g. which J Smith).

What do you think?

--
Regards.
Richard.
Nov 13 '05 #1
8 2109
Have you shown your customer how a combobox with autoexpand turned on works?
You just begin typing in the last name and the list automatically scrolls to
the first last name beginning with the letters you have already typed. Just
like the Help file. It's very quick and finding someone in 25,000 records is
a breeze.

--
PC Datasheet
Your Resource For Help With Access, Excel And Word Applications
re******@pcdata sheet.com
www.pcdatasheet.com
"Richard Sherratt" <ri************ **@NOTHINGHEREb runsley.com.au> wrote in
message news:nd******** *************** *********@4ax.c om...
It's a database keeping info about people and is expected to contain
20,000 to 25,000 people. I could put a GoToPerson Combo on the form,
but the customer and I are not to keen on that. It makes finding a
person difficult for casual users. I'm thinking of a pop-up search
form that will allow some flexibility in searching and also display
results in a subform (e.g. which J Smith).

What do you think?

--
Regards.
Richard.

Nov 13 '05 #2
On Fri, 24 Dec 2004 04:12:24 GMT, "PC Datasheet" <no****@nospam. spam>
wrote:
Have you shown your customer how a combobox with autoexpand turned on works?
You just begin typing in the last name and the list automatically scrolls to
the first last name beginning with the letters you have already typed. Just
like the Help file. It's very quick and finding someone in 25,000 records is
a breeze.


Yes. I have shown them. They have a system of mine already. The chief
user, who is also the man who signs the cheques, doesn't like the look
and feel.
--
Regards.
Richard.
Nov 13 '05 #3
Richard Sherratt wrote:
On Fri, 24 Dec 2004 04:12:24 GMT, "PC Datasheet" <no****@nospam. spam>
wrote:

Have you shown your customer how a combobox with autoexpand turned on works?
You just begin typing in the last name and the list automatically scrolls to
the first last name beginning with the letters you have already typed. Just
like the Help file. It's very quick and finding someone in 25,000 records is
a breeze.

Yes. I have shown them. They have a system of mine already. The chief
user, who is also the man who signs the cheques, doesn't like the look
and feel.


If the issue is that the user doesn't know exactly what they are
looking for then perhaps a search form that utilizes the Soundex
or Metaphone algorithm is what is needed. These allow you to
phonetically spell a lookup term. You can search here for sample
implementations .

Performance-wise, its never a good idea to download all possibilities
and then search against it - better to prompt the user for some
starting characters to narrow down the search...

--
'---------------
'John Mishefske
'---------------
Nov 13 '05 #4
On Thu, 23 Dec 2004 23:29:38 -0600, John Mishefske
<mi************ @JUNKtds.net> wrote:
Richard Sherratt wrote:
On Fri, 24 Dec 2004 04:12:24 GMT, "PC Datasheet" <no****@nospam. spam>
wrote:

Have you shown your customer how a combobox with autoexpand turned on works?
You just begin typing in the last name and the list automatically scrolls to
the first last name beginning with the letters you have already typed. Just
like the Help file. It's very quick and finding someone in 25,000 records is
a breeze.

Yes. I have shown them. They have a system of mine already. The chief
user, who is also the man who signs the cheques, doesn't like the look
and feel.


If the issue is that the user doesn't know exactly what they are
looking for then perhaps a search form that utilizes the Soundex
or Metaphone algorithm is what is needed. These allow you to
phonetically spell a lookup term. You can search here for sample
implementation s.

Performance-wise, its never a good idea to download all possibilities
and then search against it - better to prompt the user for some
starting characters to narrow down the search...


Thanks.

--
Regards.
Richard.
Nov 13 '05 #5
yeah, the pop up, followed by a new form displaying all the results
works best. loading 25K people in a combobox is a bitch, because it's
an O(n) operation, which means, that the more people in the database
you have the more you'll have to wait for the combobox to load

Plenty of solutions. here's one off the top of my head:

make sure you always set the .Sort property, so the server can return
your data sorted. <--- important

do a small statistical analists of the last names of the poeple in your
database and find out the distribution of the first letter of the last
name of each employee (i assume they are employees). Create views that
group employees according to the first letter of the last name, eg,
[A-D], [E-F] and so on, and so on. You may also create sub-views on
the above views, that include the first and the second letter of each
employee (see later on in the reply). Ask the user for the name of the
employee, get the first/second letter of their last name and search
each view/subview, accordingly.

Worst search time: O(log(n, n)) logn with subscript n, where n is the
number of groups you create. this is orders of magnitude faster than
O(n) (linear searching), which is what you do when you load the combo
box.

this is basically how binary search works.
http://en.wikipedia.org/wiki/Binary_search
now, why you want to find the normal distribution: because you might
have a portion of the employees that their last name starts with the
later J for example. if that portion is like 10-20% of your workforce,
it will take you more to search that portion of employees, since after
the first grouping, you're back loading/searcing your data lineary, so,
the guy that signs the checks will be not happy. If you create
subsets(subview s) of that portion(s) of employess that are larger
(percentagewise ) - i'd say more than 6%-, you will always have will
always have very fast loading times. (well, unless your workforce
increases by a 10th fold, where you'll have to use some other search
technique

You might wanna code the analysis into a module, so you can use it at a
later time. (you will use it, again)
Now, all together, let's say "Thank you Dr. Knuth!"

George Marselis

Nov 13 '05 #6
George Marselis wrote:
yeah, the pop up, followed by a new form displaying all the results
works best. loading 25K people in a combobox is a bitch, because it's
an O(n) operation, which means, that the more people in the database
you have the more you'll have to wait for the combobox to load


Your translation from math into human language gets it too vague. Or do
you know an algorithm that takes less time, the more input you feed it?
Like to see that one :-)

--
Bas Cost Budde, Holland
http://www.heuveltop.nl/BasCB/msac_index.html
I prefer human mail above automated so in my address
replace the queue with a tea
Nov 13 '05 #7
heh, merry xmass Bas

No, I don't. But in CompSci terms, it's all comperative: between an
algorithm that manipulates data in linear time and an algorithm that
does the same thing in a fraction of the time, you pick the second one
:)

i think the radix shorting algorithm performs better as the input gets
larger... but i'm not sure, let me go find out
Mery xmass :)

George Marselis

Nov 13 '05 #8
On 24 Dec 2004 14:01:43 -0800, "George Marselis"
<Pr**********@g mail.com> wrote:
yeah, the pop up, followed by a new form displaying all the results
works best. loading 25K people in a combobox is a bitch, because it's
an O(n) operation, which means, that the more people in the database
you have the more you'll have to wait for the combobox to load
Filling the combo is easy. It's using it that's the problem. I know
what you're getting at, though.

An example from 1996 of filling a combo quickly. I had a combo box of
Australian post codes (about 14,000) on a form in Access V2 running on
a 386 with 8MB memory. Autocomplete was on. Getting to a record near
the end (initial letter W) was less than a second. Those call-back
functions really work. :-)
Plenty of solutions. here's one off the top of my head:


<snip>

Thanks for all that info. It will come in useful. Comp Sci wasn't
available when I went to uni and I thought I wanted to be an engineer.
--
Regards.
Richard.
Nov 13 '05 #9

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

Similar topics

2
2525
by: Ben | last post by:
Right now I have 1 table. The first part is the first and last name along with address etc. There is about 10-15 fields here. The second part consists of times, penalties and if they enter this event or not. With 30 events max times 3 thats 90 fields. Although within limits even I know this is not the way to do it. I want to split the table into 2. 1 for the personal info and the other for the events. Not sure what the best way to link...
5
3327
by: Ross A. Finlayson | last post by:
Hi, I'm scratching together an Access database. The development box is Office 95, the deployment box Office 2003. So anyways I am griping about forms and global variables. Say for example I'm adding a customer. The Customer fields are mostly foreign keys that refer to primary keys in other tables, left join instead of junction tables at this point. So, when I want to add a customer record, I also need to add records to the other...
7
3049
by: Stephen Poley | last post by:
I have the following situation: - a table of employees, keyed on employee-id; - a table of training sessions, keyed on session-id; - a requirement to log who was present at which session, plus optional extra textual information (e.g. "left early due to illness"). The solution I had in mind was: 1) create a presence table, keyed on employee-id and session-id, containing a 'present' yes/no field and a comment text field; 2) cross-join...
13
1905
by: Martin Z | last post by:
I'm making a CRUD screen for an Oracle database... but problem is that the primary key in that table is populated via an autonumber, which in Oracle is done just with triggers and sequences. Suffice to say that ADO.Net 1.1 is unaware that this column is, despite appearances, optional - which is a problem when creating new rows. I was wondering what the best way to remove the constraint is? I've been bitten too many times by assuming the...
3
2833
by: CourtGuy | last post by:
Hi Folks, I've got a problem that's been confounding me for months. I work for a criminal court, and I'm trying to set up an Access database to track petitions filed by criminal defendants. I am using the court's case file number record as the primary key to make sure the database doesn't wind up with multiple entries for the same case number. However, a single case number can have other defendants charged in the same case number who...
139
14126
by: ravi | last post by:
Hi can anybody tell me that which ds will be best suited to implement a hash table in C/C++ thanx. in advanced
1
2568
by: farhan31 | last post by:
Hello all I have Two tables.Table 1 and table 2.Table 1 has one to many relation with Table 2.I have one main form Form1 based on table 1.On form 1 i have a sub form based on table 2.I have put a find record button on main form i.e Form 1.Master/child relation is already established.Find button works fine with main form.it changes the main form entries and the sub form entries accordingly.this button doesnot work with sub form.this means that...
4
6475
by: bruce24444 | last post by:
I'm working on a database created in Access 97 which has a form which tracks claims made for damages. When the person reports the claim, a form is used to enter Date Reported, Claim Number, Loss Type, Reported To, and Caller Name. This information is recorded into tbl:Claims_Assignment. I've been asked to create a form, to correct these initial details if entered incorrectly, so the end user doesn't have to go into tbl:Claims_Assignment,...
2
2660
by: Ashley | last post by:
hey, what's up............................. "Neil" <nospam@nospam.netwrote in message news:8YFwj.10509$0o7.1113@newssvr13.news.prodigy.net...
0
8213
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8653
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
8597
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
8457
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
1
6101
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5554
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 then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4065
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
1
2587
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
1
1763
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.