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

I am stupid- Access Relationships and such

rsmccli
52
Most of the time my job has been working with a fairly large existing AC2002 database: making minor changes, automating functions, adding command buttons or text boxes here and there... Now I have to actually build a small database for recording personnel and their company affiliations; it also has to allow for remote additions from satellite companies. I have noticed recently that I am not good at making tables and setting up their relationships etc. I understand that this is a fairly simple process, but for some reason I am still having trouble.

I posted here before to ask the best setup for the main table and have decided:

tblEmployers
CompanyID (PK)
Employer

tblEmployeeInfo
SSN (PK)
FirstName
LastName
DOB

tblEmployeeHybrid
SSN (PK1)
FirstName
LastName
DOB
Company(PK2)
(a ton more fields with additional information)


Okay, so when these relationships are set up, each SSN can be in the tblEmployeeHybrid several times, but each entry must have a different Company affiliation, and any given company cannot have dupicate SSN entries.

Now I just want to know what type of relationship should each field get. Do you just put relationships for the Primary Key fields? In the hybrid table, if you typed in an SSN that already exists in tblEmployees, will the FirstName, LastName, etc. fields automatically update, or is that something you have to do in a form? If this is true, do you base the form on a query with fields from the two smaller tables or just the "hybrid" table. Thank you for your time, sorry about being dense.
Mar 3 '08 #1
1 1044
FishVal
2,653 Expert 2GB
Hi, there.

What you are trying to do is called many-to-many relationship. This type of relationship between two tables is implemented by addition of third table which contains foreign keys of these two tables. I somewhat confused about what do you mean with PK1 and PK2. I hope that is not composite primary key because this should be two foreign keys.

To ensure your table contains only unique combinations of [SSN] and [Employer] set multifield index restricting duplicate values. You may learn more about indexes reading Indexes in Microsoft Access article.

Best regards,

Fish
Mar 3 '08 #2

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

Similar topics

8
by: sebb | last post by:
I'm kind of newbie to programming, but I thought of something and I want some opinions on that. It's about a new instruction block to do some cycles. I thought about that because it's not very...
119
by: rhat | last post by:
I heard that beta 2 now makes ASP.NET xhtml compliant. Can anyone shed some light on what this will change and it will break stuff as converting HTML to XHTML pages DO break things. see,...
10
by: Fei Li | last post by:
Hi, If I'm not stupid for this, then the design of FolderBrowserDialog is very stupid. It only allow to strat browing from several predefined folder(Environment.SpecialFolder). What can I do if...
5
by: Guoqi Zheng | last post by:
I think I have this kind of problem very often, now it is really making me crazy. VS.NET always want to change my html code. Ok, that is fine as long as Vs.Net can ask my confirmaton first. For...
6
by: Adam Smith | last post by:
I have posted this and similar questions repeatedly and can't even raise a single response. I am being led to believe that this then 'Must be a stupid question' although people say that there is no...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
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,...
0
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...
0
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...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

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.