473,545 Members | 2,688 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

When use a list, and when a lookup table

Hi,

When should I use a list (in table properties: like
Ford;Mercedes;B MW;Audi )
and when should I use a lookup table??

And second question: IF I use a lookup table, should I always make a
relation (1-to-many) in my relation scheme?

Any help is greatly appreciated, I'm a bit puzzled.

thx
Paul
Nov 13 '05 #1
4 2051
Paul wrote:
Hi,

When should I use a list (in table properties: like
Ford;Mercedes;B MW;Audi )
and when should I use a lookup table??

And second question: IF I use a lookup table, should I always make a
relation (1-to-many) in my relation scheme?

Any help is greatly appreciated, I'm a bit puzzled.

thx
Paul

1) Never do either in table properties. Lookups belong in forms/reports
only.

2) Use a table whenever the list has a good chance of changing.

3) Create the relationship

--
I don't check the Email account attached
to this message. Send instead to...
RBrandt at Hunter dot com
Nov 13 '05 #2
"Rick Brandt" <ri*********@ho tmail.com> wrote in news:GA6ae.1046 $yd7.694
@newssvr11.news .prodigy.com:
Paul wrote:
Hi,

When should I use a list (in table properties: like
Ford;Mercedes;B MW;Audi )
and when should I use a lookup table??


1) Never do either in table properties. Lookups belong in forms/reports
only.

Hi, what is the reason for not using a lookup in table properties?
I noticed this advice earlier, but I never understood why exactly.

Cheers.

K.
Nov 13 '05 #3
there's info on this here:
http://www.mvps.org/access/tencommandments.htm

If you've ever tried to debug or understand someone's database who used
them, you'd understand. I had that happen to me once. All the "hard"
stuff was easy, but this totally screwed me up. Table data should be
painfully obvious, with absolutely no other "stuff" going on behind the
scenes. And that's exactly what table-level lookups are. Yes, they
might save you a step or two, but maybe it's just me. When I'm doing
the development, _I_ like to have control over what's happening and not
have Access do it for me.

In a nutshell, have someone you know slap up a database with lookups in
it, and then ask you to do something simple and see how hard the
lookups make it. Trivial stuff should take minutes, and not be
obfuscated by lookup crap.

just my opinion... but try it sometime and see for yourself.

Nov 13 '05 #4
On 22 Apr 2005 05:59:21 -0700, al********@it4u s.nl (Paul) wrote:
Hi,

When should I use a list (in table properties: like
Ford;Mercedes; BMW;Audi )
and when should I use a lookup table??

And second question: IF I use a lookup table, should I always make a
relation (1-to-many) in my relation scheme?

Any help is greatly appreciated, I'm a bit puzzled.

thx
Paul


Generally speaking, lists should be kept in tables, and lookup items should be
identified by a surrogate key (usually an Autonumber), not by a name.

Let's take your example above of automobile brands, and say there's a table of
automobiles, each one having a brand as an attribute. Ler's also say you
used a value list combo box for the selection like Ford;Mercedes;B MW;Audi.

Now, let's say you've decided you need this data to be editable in more than
one form, so you create the new form and copy the combo box from the first
form to the second form. You now have 2 combo boxes with the same list.

Next, let's say 2 months later, you decide you want to add Fiat to the list,
and you also want to change the name of Merceded to Mercedes Benz. So - you
track down the first form, but you forget about the second form. Now, the
second form won't allow you to pick Fiat, and any Mercedes Benz selected in
the first form won't be the same as the Mercedes items selected in the second
form.

Additionally, what happens when you decide you need to sort cars by something
like manufacturer's home country? Now, you'll have to have an auto brand
table, so there's somewhere to store the country.

So, now let's say, based on the discussion above, we agree that we want to use
a table for auto brands, but we use the name as the identifier, not a
surrogate key.

The first consequence of this is that the database is larger than it needs to
be because the entire brand name is duplicated everywhere it is used, rather
than the mere 4-bytes it would take to store a numeric ID. The next
consequence is that we can't safely rename a brand name unless we also change
it everywhere it's used. We can use a cascade-updating relationship to have
Access fix that up for us, but if there are a lot of records affected, this
can be a massive update that could mess up other users trying to enter or edit
data in a multi-user system, and there's would still be the issue of the
wasted space to store the duplicate name information everywhere.

What we're really talking about here is database normalization theory. If you
want a deeper understanding, find a good book on relational database design.
Nov 13 '05 #5

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

Similar topics

6
1942
by: Chuck Van Den Corput | last post by:
I have an application with one main table with a jillion attributes. There are numerous other tables, but these are either children of the main table or lookup tables. I am finding that I am using up all my indices on the main table to support the relationships with all the child and lookup tables. My question is this: would anyone...
5
1982
by: Marie | last post by:
Access97 I have a table containing addresses with a separate field for State. Is there a way to create a query that returns an unique list of the states in that table and still be updateable? I tried setting the unique values property to Yes but that gave me a recordset that was not updateable. Thanks! Marie
2
1548
by: Emily Jones | last post by:
That subject line will have Joe Celko apoplectic!! Let's say I have this thing. Oh, I don't know, a car. No, a vehicle. Can we agree that is an entity type? Some attributes might be VIN, Fuel, Color. Some entity instances might be: wvv2939-32-2993-2-90, Gasoline, Blue wvv3942-3249--2830-2, Diesel, Red I wanna make it easy to get the...
1
1867
by: Dave | last post by:
I have a problem which I know there is an answer to but have so far been unsuccessful in finding it. It is quite simple in theory. I have created a form which uses a table for lookup values and they appear on the form as a list box. I know I can restrict to list or not within the table, but what I want to do is to be able to add to the list if...
0
1443
by: gerry | last post by:
I want to populating an asp list box from a simple access lookup list (single column not a table.)I don't want to create tables just for lookups as the values will be descriptive only and will never change. What would be the command to rerieve these single column lookups in ASP script? Or do I have to create access tables just to hold these...
3
2270
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 than the key value that are stored in the table. It works well if the comboboxes are selected when the row is created.
3
5398
by: Patrick [MSFT] | last post by:
Let me preface this with the goal I'm trying to achieve is mimic a feature of another language (Dexterity used by Microsoft Dynamics) and so while a filling a drop down list is a workable solution I'd rather do it like Microsoft Dynamics does and use separate textbox and lookup button. What I have is, simply, is a C# winform, a textbox and a...
5
4005
by: sensreview | last post by:
Hello, I need help in selecting a value from combo list thru one lookup table and update different table on MS access form. For eg; I have a lookup table of usernames, I need to use this lookup table in all my other forms to update different table selecting the username from my lookup table. I tried Docmd.runsql but unable to succeed.
2
6219
by: Lysander | last post by:
I have not seen this feature documented before, so I thought I would share it with you, as I will be using it in a later article. For a combo or list box, the source data is normally a Table/Query. Or it could be a value list, a static list of data. But what if your information is not held in a table, and it is not a static list. Examples...
0
7689
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. ...
0
7943
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...
1
7456
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For...
0
6022
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then...
1
5359
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...
0
3490
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...
0
3470
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
1044
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
743
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating...

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.