473,406 Members | 2,378 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,406 software developers and data experts.

Lookup tables - alternatives

Hi,

In my database I am converting grades into scores (A=7, B=6, B/C = 6.5) I'm
told this is quite slow, and sure enough, a report doing a fair bit of this
is slow. I used to have the conversion in the code, but changed it so the
user can edit the table contents and use it for a different set of score
(4a, 4b etc).

Can I achieve the flexibility but recover the speed. As there are no more
than say 12 different score, I wondered about staying with the data in a
table and loadinf it into an array, then accessing this. Would it work? How
would I do it?

Ideas if possible please?

Thanks in advance


Nov 13 '05 #1
2 1759
If you just place the values in a simple table like:
LetterCode ScoreValue
A 7
B 6
C 6.5

etc. etc.
Now, just build a query that joins in the above table to your existing data
table. (ie: just use the query builder to join in the above table, joined on
letter code). With small tables of 100,000 records, you can join this data
in well under 1 second, so, I don't know why you are having performance
problems.

Perhaps the data tables you are dealing with are in the millions of records?

You mentioned "slow", but make no mention of the size of tables you are
dealing with. Perhaps the tables are too large for ms-access?

Anyway, if your tables are small, in the 100,000 record range...using the
above table with the query builder should add any perceptible delay to your
reports. In other words, if you add the above table to your existing sql
used for the report...you will be HARD pressed to see any reduction in
performance in the report...

--
Albert D. Kallal (Access MVP)
Edmonton, Alberta Canada
pl*****************@msn.com
http://www.attcanada.net/~kallal.msn
Nov 13 '05 #2
Using the Lookup Table shouldn't be to slow. What you would need is a common
field value in the main table and the Lookup Table. In the example you give,
you would have two fields in the Lookup Table, the first one would contain
A, B, B/C, etc. The second one would contain 7, 6, 6.5, etc. From your
description, I assume the main table would contain the A, B, B/C values.
Use a query to send the data to your report, add both tables to the query
and link them on this common field. Next, place the second field from the
Lookup Table in the query's output. Because of the link, the text grades
will be associated with their equivalent scores.

--
Wayne Morgan
Microsoft Access MVP
"John M" <jo**@jmawer.demon.co.uk> wrote in message
news:cn*******************@news.demon.co.uk...
Hi,

In my database I am converting grades into scores (A=7, B=6, B/C = 6.5)
I'm
told this is quite slow, and sure enough, a report doing a fair bit of
this
is slow. I used to have the conversion in the code, but changed it so the
user can edit the table contents and use it for a different set of score
(4a, 4b etc).

Can I achieve the flexibility but recover the speed. As there are no more
than say 12 different score, I wondered about staying with the data in a
table and loadinf it into an array, then accessing this. Would it work?
How
would I do it?

Ideas if possible please?

Nov 13 '05 #3

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

Similar topics

2
by: CoreyWhite | last post by:
The future of computer architecture will use lookup tables. Currently computer processor speed outweighs the benefits of using computer memory for lookup tables, except in some cases. As computer...
9
by: Koen | last post by:
Hi all, My application uses a lot of lookup tables. I've splitted the frontend (forms, reports, etc) from the backend (data). The database has around 10 different users. The values in the...
3
by: my-wings | last post by:
I've been reading about how evil Lookup fields in tables are, but I've got to be missing something really basic. I know this subject has been covered before, because I've just spent an hour or two...
13
by: John Baker | last post by:
Hi: I have a general question about table access and look ups. Over simplifying things,and using a very theoretical example, lets say I have two tables; Client and Bill. The client table...
3
by: google | last post by:
I have a database with four table. In one of the tables, I use about five lookup fields to get populate their dropdown list. I have read that lookup fields are really bad and may cause problems...
10
by: junky_fellow | last post by:
what are lookup tables ? How can they be used to optimise the code ?
4
by: jon f kaminsky | last post by:
Hi- I've seen this problem discussed a jillion times but I cannot seem to implement any advice that makes it work. I am porting a large project from VB6 to .NET. The issue is using the combo box...
3
by: dbuchanan | last post by:
Hello, (Windows forms - SQL Server) I fill my datagrid with a stored procedure that includes relationships to lookup tables so that users can see the values of the combobox selections rather...
1
by: paulquinlan100 | last post by:
Hi Im having problems getting a column in one of my tables to display the lookup values correctly. The database is split, in the backend the rowsource for this particular field is set to a...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
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: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
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
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
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...

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.