UtterAccess.com

Welcome Guest ( Log In | Register ) · View New Posts · View Unanswered Topics

 
Reply to this topicStart new topic
> One True Lookup Table
 
   
Lewis_F
post Jul 14 2008, 09:12 PM
Post #1

UtterAccess Enthusiast
Posts: 21



How do you guys feel about one central lookup table, as opposed to several individual tables? I'm trying to decide whether I should use one, or many.

Thanks for any input.
Go to the top of the page
 
+
Alan_G
post Jul 14 2008, 09:21 PM
Post #2

UtterAccess Moderator
Posts: 11,525
From: Devon UK



I'd say you need a seperate table for each entity.........


--------------------
HTH
Alan

It's nice to be important, but it's more important to be nice
Go to the top of the page
 
+
pbaldy
post Jul 14 2008, 09:50 PM
Post #3

UtterAccess VIP
Posts: 4,534
From: Nevada, USA



I agree with Alan. I've seen discussions on the topic, and the general consensus (though not unanimous), was against the one-table solution.


--------------------
Paul
MS Access MVP
www.BaldyWeb.com
Go to the top of the page
 
+
datAdrenaline
post Jul 14 2008, 09:53 PM
Post #4

UtterAccess VIP and Access Wiki Moderator
Posts: 12,538
From: Northern Virginia, USA



I use both techniques in my apps ...

Click Here for a thread regarding the topic ... the post I directly linked you to has a sample utility that really helps maintaining the lists ... the entire thread is a good read and, IMO, expresses some stuff you should know ...

Click Here for another thread on the topic ..

And this thread I think is the first time I participated on the topic here at UA ...

... The first link has the most recent version of the utility ... but all the links may help add to your decision making process ...


EDITS ADDED ...

I'm always the odd ball!! ... evilgrin.gif ...

Edited by: datAdrenaline on Mon Jul 14 22:54:00 EDT 2008.


--------------------
Brent Spaulding | datAdrenaline | Access MVP
Sometimes I think I have 1000 kids -- then I realize -- Hey I do! :) ... Pay it Forward, lives will be touched forever!
Go to the top of the page
 
+
ace
post Jul 14 2008, 10:29 PM
Post #5

UtterAccess VIP
Posts: 4,767
From: Upstate NY, USA



Like illegal drugs, you should just say no to one true lookup tables.
No matter who is enticing you.


--------------------
Just because you are a character doesn't mean that you have character.
Go to the top of the page
 
+
datAdrenaline
post Jul 14 2008, 11:14 PM
Post #6

UtterAccess VIP and Access Wiki Moderator
Posts: 12,538
From: Northern Virginia, USA



ROFLMAO!! .....

... I know I am in the minority ... but I DO admit the short comings of the technique ... I beleive in the first link I provided I give caution putting my "umpf" in the tables than there should be.

I manage almost 40 lists this way ... in the long run it has made my life easier, BUT in the beginning when I tried to make the lists more than just an ID, TextValue, Description ... I got into workarounds and a ton of difficulty... that is when I decided that if my need goes beyond that which I have listed, the list becomes its own table (again managed by code)


--------------------
Brent Spaulding | datAdrenaline | Access MVP
Sometimes I think I have 1000 kids -- then I realize -- Hey I do! :) ... Pay it Forward, lives will be touched forever!
Go to the top of the page
 
+
Graham R Seach
post Jul 15 2008, 12:49 AM
Post #7

UtterAccess VIP
Posts: 337
From: Sydney, Australia



From a data modelling perspective, it is advisable to use individual tables for each lookup entity.

This is particularly important when joining on multiple lookups, because of the need for the query engine to create virtual tables, not to mention the performance hit when having to filter such tables twice; once to get the category, and once to get at the specific value.

Multi-purpose lookups are never used in data warehouses or other VLDBs.


--------------------
Graham R Seach
Microsoft Access MVP. Sydney, Australia
Go to the top of the page
 
+
ChrisO
post Jul 15 2008, 02:14 AM
Post #8

Utterly Banned
Posts: 3,905
From: Brisbane, Australia



The OP seems to be asking: -

“How do you guys feel about one central lookup table, as opposed to several individual tables? I'm trying to decide whether I should use one, or many.”

I have read this thread many times and fail to see the logic in any of the replies so far.

It may also mean a central lookup table placed on a BE serving the FE’s, or it may also mean the lookup table being placed on the FE’s locally.

The latter (local FE) implies a local configuration table for that machine whereas the former (BE table) implies a ‘follow me configuration’ to a logged in user on the network.

May I ask the question, what does the OP mean?

Regards,
Chris.


--------------------
A nod's as good as a wink to a blind horse.
Go to the top of the page
 
+
ace
post Jul 15 2008, 06:03 AM
Post #9

UtterAccess VIP
Posts: 4,767
From: Upstate NY, USA



The term 'one true lookup table' or 'OTLT has a meaning in the
relational database world. That's why there is a name for it.

Google it.


--------------------
Just because you are a character doesn't mean that you have character.
Go to the top of the page
 
+
datAdrenaline
post Jul 15 2008, 10:02 AM
Post #10

UtterAccess VIP and Access Wiki Moderator
Posts: 12,538
From: Northern Virginia, USA



Hello Graham! ... Great to see you here! ...

With respect to performance, I have not seen a performance hit. For comboboxes/listboxes I use the "Category Specific" queries (sel_lkupSystemList_* using my sample as a point of referal to common context) as my primary source in the RowSource SQL ... so there is not a double hit there with every record, however, one hit to populate the rows of the combo with the category upon form load, then the once to find the value ....

When extracting data from database, I do not use the category specify queries. Since in my table of lists there is a UniqueID for each value in it, I just JOIN up to the main list table (tblListValues), that way the execution of the final query just has the value to find, so only one hit .... although the one hit is against a larger table.

... But ... in logical agreement, I can definately see where the OTLT method can be more db engine intensive ... but in most cases I can't see that being a noticible factor if things are set up in an optimal fashion ... I have not tested it though.

-----

I would think in VLDB's hardly use ANY lookups are used ... but I am not versed in VLDB's ... they are just figments of my imagination!


--------------------
Brent Spaulding | datAdrenaline | Access MVP
Sometimes I think I have 1000 kids -- then I realize -- Hey I do! :) ... Pay it Forward, lives will be touched forever!
Go to the top of the page
 
+
datAdrenaline
post Jul 15 2008, 10:14 AM
Post #11

UtterAccess VIP and Access Wiki Moderator
Posts: 12,538
From: Northern Virginia, USA



Lewis ...

From an "advice" point of view ... I have advised both ways (as you have probably gathered from my previous post), however (as you can see from the posts thus far!) the individual table method is more commonly implemented. There are many reasons for that veiw point. One such reason is that its easier to "jump in" and follow what has been done. So if/when your successor takes over, or if you have someone creating reports from your source or ???, it will be easier for that person to follow your structure without specific guidance. I have also advised a multi-purpose lookup (aka: "embedded tables"), but I personally consider it an advanced method simply because the developer needs to fully understand the ramifications for using the technique. As I stated, I have had GREAT success and enjoy using the embedded table technique ... its ease of updating data, ease of adding a list, less clutter in the table view of the db window (but more in the query view!).... I'll likely not stop using it! But, it is definately not for everyone! Ultimately, I think the single table per entity approach has a more universal appeal, but I do beleive the embedded table method has its place and when done right can be a big benifit for the developer.


--------------------
Brent Spaulding | datAdrenaline | Access MVP
Sometimes I think I have 1000 kids -- then I realize -- Hey I do! :) ... Pay it Forward, lives will be touched forever!
Go to the top of the page
 
+
ChrisO
post Jul 15 2008, 06:53 PM
Post #12

Utterly Banned
Posts: 3,905
From: Brisbane, Australia



G’day Ace.

The reason I didn’t notice the title contained ‘One True Lookup Table’ is that I’ve never heard of it before.

Doesn’t look like I’ll need to spend too much time on it. grin.gif

Thanks for the info and regards,
Chris.


--------------------
A nod's as good as a wink to a blind horse.
Go to the top of the page
 
+
Graham R Seach
post Jul 15 2008, 07:14 PM
Post #13

UtterAccess VIP
Posts: 337
From: Sydney, Australia



I replied with a view as it related to data modelling. I have used single table lookups before, with no problem against a Jet backend, but they are an abomination in highly normalised (DKNF) data warehouses where we're talking about hundreds of millions of records. Since I typically build Access frontends against this sort of backend, the consideration is very relevant here. VLDBs (very large databases) DO use lookups, just like any other database, but they do not use OTLTs because of the massive performance hit and the problems associated with table keys.


--------------------
Graham R Seach
Microsoft Access MVP. Sydney, Australia
Go to the top of the page
 
+
datAdrenaline
post Jul 15 2008, 09:20 PM
Post #14

UtterAccess VIP and Access Wiki Moderator
Posts: 12,538
From: Northern Virginia, USA



Whoa! .... hundreds of millions!!! .... OUCH!!! .... my largest table has 3million records and I thought that was getting pretty big! ... apparently not! ... I think I would "feel" it then too! As of this moment I have somewhere close to total of 1500 rows in my "embedded table" ... and that is for about 40 lists ... so ... thats like a blip compared to your scenario!! ..

Also .. I think its pretty cool that you use Access as a front end to these! ... I guess is all in the connection eh?

Thanks for that bit of information Graham.


--------------------
Brent Spaulding | datAdrenaline | Access MVP
Sometimes I think I have 1000 kids -- then I realize -- Hey I do! :) ... Pay it Forward, lives will be touched forever!
Go to the top of the page
 
+
pere_de_chipstic...
post Jul 16 2008, 06:36 AM
Post #15

UtterAccess VIP
Posts: 3,355
From: South coast, England



I have a database for special needs schools, it has a table with categories (columns):
Sensory Loss
Epilepsy
Learning Difficulties
Communication
Feeding
Autism
ADD
SLD
Physical handicap
etc

But these are basically constant and cannot be changed by the user. So I am not sure it can be classified as an OTLT. The problems using OTLT I believe far outway the benefits especially if, in the future, some other developer takes over the development / maintenance of your dB.

my 2c worth!


--------------------
Warm regards
Bernie
Go to the top of the page
 
+
datAdrenaline
post Jul 16 2008, 10:02 AM
Post #16

UtterAccess VIP and Access Wiki Moderator
Posts: 12,538
From: Northern Virginia, USA



Bernie ...

You are correct .. that is not an OTLT dazed.gif. If you D/L the attachment in the link I provided, I think that will show you what one is ... at least my rendition of it!! sad.gif ...


--------------------
Brent Spaulding | datAdrenaline | Access MVP
Sometimes I think I have 1000 kids -- then I realize -- Hey I do! :) ... Pay it Forward, lives will be touched forever!
Go to the top of the page
 
+

Reply to this topicStart new topic

 



RSS Lo-Fi Version Time is now: 30th July 2010 - 11:33 AM

Tag cloud: