Free Lessons
Courses
Seminars
TechHelp
Fast Tips
Templates
Topic Index
Forum
ABCD
 
Home   Courses   TechHelp   Forums   Help   Contact   Merch   Join   Order   Logon  
 
Back to Access Forum    Comments List
Upload Images   @Reply   Bookmark    Link   Email   Next Unseen 
Table with Multiple FKs
Usman Nizamani 
   
4 years ago
Hi, is it ok to have a table with multiple foreign keys (table is supposed to take data from multiple parent tables) which can be blank depending on which parent table it is working as a subform(subtable) in the database, or is it considered a bad design?
Adam Schwanz  @Reply  
           
4 years ago
Yes, it's ok. In fact it's going to be pretty widely used when using things like Relational Combo. You're going to have multiple FKs in your table.
Usman Nizamani OP  @Reply  
   
4 years ago
Thanks for your answer and I know what you mean by relational combo (small tables for static data) but my table has more meaningful tables with multiple FKs that actually store real data but that data could be related to different parent table (depending on which master table this child table is serving in a particular situation which means that there could be null keys in some of the FKs).
Is it ok for FKs to be null for some records?
Adam Schwanz  @Reply  
           
4 years ago
That depends on how you have things setup. I have two tables now where basically an Orders Table and a Parts Table(only 1 at a time, otherwise would need a junction table), where basically the order gets quoted, a record is created, and than later if they buy it, we assign a part from the other table which is the FK in the Orders Table, so it has null values all the time. Only thing you really need to be aware of is when making queries with the tables, you need to use outerjoins in some areas to include all the orders (ones without FKs) if you need to work with all of the orders.
Richard Rost  @Reply  
          
4 years ago
Yeah, multiple foreign keys is almost always the norm. Take an Order table for example. You'd have a CustomerID, SalesRepID, ServiceTechID, etc. These are all FKs.

This thread is now CLOSED. If you wish to comment, start a NEW discussion in Access Forum.
 

Next Unseen

 
New Feature: Comment Live View
 
 

The following is a paid advertisement
Computer Learning Zone is not responsible for any content shown or offers made by these ads.
 

Learn
 
Access - index
Excel - index
Word - index
Windows - index
PowerPoint - index
Photoshop - index
Visual Basic - index
ASP - index
Seminars
More...
Customers
 
Login
My Account
My Courses
Lost Password
Memberships
Student Databases
Change Email
Info
 
Latest News
New Releases
User Forums
Topic Glossary
Tips & Tricks
Search The Site
Code Vault
Collapse Menus
Help
 
Customer Support
Web Site Tour
FAQs
TechHelp
Consulting Services
About
 
Background
Testimonials
Jobs
Affiliate Program
Richard Rost
Free Lessons
Mailing List
PCResale.NET
Order
 
Video Tutorials
Handbooks
Memberships
Learning Connection
Idiot's Guide to Excel
Volume Discounts
Payment Info
Shipping
Terms of Sale
Contact
 
Contact Info
Support Policy
Mailing Address
Phone Number
Fax Number
Course Survey
Email Richard
[email protected]
Blog RSS Feed    YouTube Channel

LinkedIn
Copyright 2026 by Computer Learning Zone, Amicron, and Richard Rost. All Rights Reserved. Current Time: 4/30/2026 5:10:15 AM. PLT: 0s