473,320 Members | 1,883 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,320 software developers and data experts.

How many Foreign Keys per table

I created 2 tables to get a shopping list with the item, aisle and price.

TblAisle
CategoryID
Category
Aisle

TblItem
ItemID
Item
CategoryIDFK
AisleIDFK
Price

Is this structure viable in access? I want to generate a shopping list that includes the item, aisle, price.

Regards.
Oct 6 '15 #1
4 853
Seth Schrock
2,965 Expert 2GB
If a category can only be in one aisle, then you don't need the AisleIDFK field in TblItem. You would get this information by joining the two tables in a query. Also, just for sake of understanding later, I would name TblAisle TblCategory since that is how it is being used. This doesn't make or break your database, but it does help you think of it in terms of how it fits your data.
Oct 7 '15 #2
But I am using the aisle field in two different tables. Then I guess you are suggesting that I remove the aisle field from the TblCategory and use a query to get the aisle info.?
Oct 7 '15 #3
Seth Schrock
2,965 Expert 2GB
If a category can only be in one aisle, then don't remove the aisle field from TblCategory, just TblItem. What other table are you using it in?
Oct 7 '15 #4
Thanks for your assistance. Best regards.
Oct 7 '15 #5

Sign in to post your reply or Sign up for a free account.

Similar topics

1
by: Vinodh Kumar P | last post by:
I understand the number of foreign keys allowed is restricted by the DBMS I use. In a general relational schema design perspective how many foreign keys a table shall have? If I have large number...
26
by: pb648174 | last post by:
I have a table called BidItem which has another table called BidAddendum related to it by foreign key. I have another table called BidFolder which is related to both BidItem and BidAddendum, based...
6
by: Brendan Jurd | last post by:
Hi all, I read on the manual page for Inheritance that: "A limitation of the inheritance feature is that indexes (including unique constraints) and foreign key constraints only apply to single...
5
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...
1
by: Thomas T. Thai | last post by:
I'm looking for a better way to make use of foreign keys. Here is a sample setup: -- TESTING Foreign Keys create table mod ( mod_id int not null primary key, name varchar(32) not null...
1
by: HandersonVA | last post by:
There is itemlookup table, which stores item number and item description. Also there is a child table, pricehistory, of the itemlookup table, which stores different prices and different date...
0
by: Carl Vondrick | last post by:
Hi everyone, I am having trouble wrapping my mind around the ActiveRecord pattern and foreign keys. I understand that for each table, there should be a class, and each row is is effectively an...
6
by: ravichoudhari | last post by:
i came accross requirement of multiple foreign keys in a table referencing the same primary key another table. i created the table relations using the relations editor in access. even though i...
1
by: apax999 | last post by:
Kinda new to SQL, using SQL Server 2005. I have some foreign keys in a couple of tables. I need to drop these tables, but can't since I'll get the error: Msg 3726, Level 16, State 1, Line...
2
JnrJnr
by: JnrJnr | last post by:
I have two SQL database tables. One contains various products(with unique primary keys) and the other contains information related to the products aswel as the product's foreign keys. What I want...
0
by: DolphinDB | last post by:
The formulas of 101 quantitative trading alphas used by WorldQuant were presented in the paper 101 Formulaic Alphas. However, some formulas are complex, leading to challenges in calculation. Take...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
0
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you

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.