472,995 Members | 1,910 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

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

LookupTable with Referential Integrity and Cascaded Updates

I have a 15 LookUp Tables tied to 15 ComboBoxes.
Some of the Tables contain 3 to 10 Recs, and a couple contain up to 50
Recs.

1- Is it a CommonPractice to link the field that gets the ComboBox
result, to the Lookup Table to ensure Referential Integrity and
Cascaded Updates?

2- Also, should the LookupTable PrimaryKey be an AutoKey or the Name
of the main field being referenced, which in my case would average 15
chars, but in two cases be 50-chars long? The AutoKey would be
smaller, but given the size of the Tables may not be necessary?

3- Should I store AutoKey value, or the Value of the main field being
referenced?

Thanks
Greg


eld or is the MainField sufficient as the Primary since each will be
unique, BUT may be up to 50 characters long in a few instances??

2- Should each LookUp Table be linked back to the maintable at the
ComboBox

Feb 27 '07 #1
4 2036
On Feb 26, 8:22 pm, "ApexD...@gmail.com" <ApexD...@gmail.comwrote:
I have a 15 LookUp Tables tied to 15 ComboBoxes.
Some of the Tables contain 3 to 10 Recs, and a couple contain up to 50
Recs.
1- Is it a CommonPractice to link the field that gets the ComboBox
result, to the Lookup Table to ensure Referential Integrity and
Cascaded Updates?
Keep in mind that controls are primarily a means of entering and
viewing data. Don't think of them as being a part of the data or table
structure. If you are using (or intend to) Relationships and Integrety
then yes, the target table and the "lookup" should be connected on the
relevant field.
2- Also, should the LookupTable PrimaryKey be an AutoKey or the Name
of the main field being referenced, which in my case would average 15
chars, but in two cases be 50-chars long? The AutoKey would be
smaller, but given the size of the Tables may not be necessary?
The type of index you use is entirely up to you and the needs of
the application. Sometimes it is beneficial not to use AutoNumbers,
sometimes it is. I usually prefer them as the information they
represent can be changed without needing to affect other data.
Sometimes this is not a good thing. You decide what's best for your
app.

3- Should I store AutoKey value, or the Value of the main field being
referenced?
Whatever field the relationship is based on (usually an index
field) is what you would store.

Feb 27 '07 #2
Thanks Mike

This will probably add an additional 15 Indexes that Access will have
to manage over a network just to ensure Cascading Changes to each
single field. It's nice to have the feature, but will this negatively
impact performance much?

I think I'd like to use the referenced field as the PrimaryKey instead
of an AutoKey, but am I asking to much from Access to deal with a
PrimaryKey field of 50-Chars long
over the network?

ThanksAgain
Greg

Feb 27 '07 #3
On Feb 26, 7:57 pm, "ApexD...@gmail.com" <ApexD...@gmail.comwrote:
Thanks Mike

This will probably add an additional 15 Indexes that Access will have
to manage over a network just to ensure Cascading Changes to each
single field. It's nice to have the feature, but will this negatively
impact performance much?
Not if as stated, the most you'd see in the table is 50 records.
Access will only transfer the indexes that are in use or requested,
not all of them (unless requested).
One other thing I've done in the past to reduce the number of "lookup"
tables is to combine a bunch into one. Mind you this is not really a
good method for selecting values that are a part of a large record,
but maybe for selecting Provinces, States, Currency Types, Format
options ect. As an example you might do this...

Table: tblCommon_Selections
SelID (PK) 'Index for selection
SelText 'Text or description of selection item
Catagory 'A way to group them for different combos

Example Data

ON / Ontario / Provs
PQ / Quebec / Provs
OH / Ohio / States
NY / New York / States
SD / Short Date / Formats
LD / Long Date / Formats

Different combos could filter for thier rowsource by including a
WHERE [Catagory] = blah blah
I think I'd like to use the referenced field as the PrimaryKey instead
of an AutoKey, but am I asking to much from Access to deal with a
PrimaryKey field of 50-Chars long
over the network?
Not really. Fifty chars is really not a lot of data - a 14.4K modem
would transfer that in less than a second. But I feel that an index
should be used as a short identifier, not actual data, so in my
opinion it kind of defeats the purpose. But there's not a rule that
says you can't do it that way.

Feb 27 '07 #4
Once again, Thanks for all the valuable insight.
I will forge ahead with seperate Lookup Tables and ponder the index
issue.
I believe the performance will be fine. If not, I have other options
now.

Thanks
Greg

Feb 27 '07 #5

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

Similar topics

0
by: Greg Allen | last post by:
I am trying to use XML to update customer information in our SQL server database. The customer data has some referential integrity. A simple example would be two tables, employee and department...
2
by: Bob Rogers | last post by:
I seem to have gotten myself into a bit of a pickle. I am trying to delete a record from a table attached to a form, and it complains about not being able to delete a record in a table because...
3
by: Dave | last post by:
I have always taken it for granted that once RI is in place, no orphan records can be created, and that RI can't be put in place while orphans exist, but today I came across a situation where that...
1
by: Grant McLean | last post by:
Hi First a simple question ... I have a table "access_log" that has foreign keys "app_id" and "app_user_id" that reference the "application_type" and "app_user" tables. When I insert into...
7
by: Jimmie H. Apsey | last post by:
Referential Integrity on one of our production tables seems to have been lost. I am running Postgres 7.1.3 embedded within Red Hat kernel-2.4.9-e.49. Within that I have a table with referential...
1
by: HGT | last post by:
Hello all, I am currently on a project which the source data come into the databases is always dirty (not surprisingly); however, due to the design of the database, it is very difficult to...
3
by: Wayne | last post by:
I've inadvertently placed this post in another similar newgroup, and I apologise if you get it twice. I'm building a database that consists of frontend and backend. Some of the lookup tables...
2
by: ApexData | last post by:
Access2000, using a continuous form. I’m getting a message that say “you cannot add or change a record because a related record is required in table Employee”. This occurs in all my combobox...
1
by: Greg (codepug | last post by:
When it comes to LookupTables for dropdown ComboBoxes does it make sense to create an autonumber as the primary key along with main value say IllnessType and then have the combobox store the...
0
by: lllomh | last post by:
Define the method first this.state = { buttonBackgroundColor: 'green', isBlinking: false, // A new status is added to identify whether the button is blinking or not } autoStart=()=>{
2
by: giovanniandrean | last post by:
The energy model is structured as follows and uses excel sheets to give input data: 1-Utility.py contains all the functions needed to calculate the variables and other minor things (mentions...
4
NeoPa
by: NeoPa | last post by:
Hello everyone. I find myself stuck trying to find the VBA way to get Access to create a PDF of the currently-selected (and open) object (Form or Report). I know it can be done by selecting :...
1
by: Teri B | last post by:
Hi, I have created a sub-form Roles. In my course form the user selects the roles assigned to the course. 0ne-to-many. One course many roles. Then I created a report based on the Course form and...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 1 Nov 2023 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM) Please note that the UK and Europe revert to winter time on...
3
by: nia12 | last post by:
Hi there, I am very new to Access so apologies if any of this is obvious/not clear. I am creating a data collection tool for health care employees to complete. It consists of a number of...
0
isladogs
by: isladogs | last post by:
The next online meeting of the Access Europe User Group will be on Wednesday 6 Dec 2023 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, Mike...
4
by: GKJR | last post by:
Does anyone have a recommendation to build a standalone application to replace an Access database? I have my bookkeeping software I developed in Access that I would like to make available to other...
3
SueHopson
by: SueHopson | last post by:
Hi All, I'm trying to create a single code (run off a button that calls the Private Sub) for our parts list report that will allow the user to filter by either/both PartVendor and PartType. On...

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.