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

How to define table relationship

can people help me how to define table relationship
i need some example to understand but make sure it's easy to understand
coz my knowledge level still low in access
Sep 11 '06 #1
3 2866
PEB
1,418 Expert 1GB
You have table students and table students notes...

You have student ID in the 2 tables...

In Students each ID is unique

But in students notes it is indexed with dublicates... Because one student can have more than 1 note...

So the relation is ID_student with Id student from the 2 tables The relation is one to many!

To create the relation choose Toosl relationships, choose your tables and drag between the fields that you want to be in relation...
Sep 11 '06 #2
MMcCarthy
14,534 Expert Mod 8TB
To use the Customer and Invoice example. Underlined fields are the Primary keys and fields followed by (FK) are the foreign keys. Foreign keys are fields in a table that relate to the primary keys of other tables.

A customer can be issued with many invoices. Therefore the relationship is one to many. The foreign key goes in the many table.

tblCustomer {CustomerID, CustomerName, Address, Phone}
tblInvoices {InvoiceNo, CustomerID(FK), InvoiceDate, Amount}
Sep 11 '06 #3
paieye
1
I have got a list of individuals and a list of addresses. One individual may have more than one address, and one address may house more than one individual.

What is the best way of defining that relationship ?
Sep 28 '06 #4

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

Similar topics

36
by: toedipper | last post by:
Hello, I am designing a table of vehicle types, nothing special, just a list of unique vehicle types such as truck, lorry, bike, motor bike, plane, tractor etc etc For the table design I am...
2
by: John | last post by:
I'm trying to normalize my database the best I can this time around and I'm running into some trouble. I've been avoid normalizing for a long time now because while I know how to normalize, I'm...
3
by: Robert Stearns | last post by:
I have a pair of tables which have foreign key dependencies on each other. Is there any better way to define them than to create both of them then, after both are defined, 'alter add' the...
2
by: Larry R Harrison Jr | last post by:
I have an Access 97 database with 2 tables that have a one-many relationship. I have a SQL statement in the "one" table which I want to execute and insert 7 records into the "many" table, and I...
5
by: Sami | last post by:
Please bear with me, and if you answer this question, please do it step by step. I am new at Access, not at all sophisticated. I am using Office XP. This will need to be read in Access for...
5
by: PAUL | last post by:
Hello, I have 2 tables with a relationship set up in the dataset with vb ..net. I add a new record to the parent table then edit an existing child record to have the new parent ID. However when I...
3
by: ChasW | last post by:
I have a database with multiple tables. I want to query all tables that have a match for a specified field value. Each of the tables may have duplicate values for this field. From what I have...
76
MMcCarthy
by: MMcCarthy | last post by:
Normalisation is the term used to describe how you break a file down into tables to create a database. There are 3 or 4 major steps involved known as 1NF (First Normal Form), 2NF (Second Normal...
6
by: BD | last post by:
Hi, all. I need to enforce a one-to-many relationship on 2 tables, with a join table. Say the join table contains account information. It has cust_no and acct_no. Both cust_no and acct_no are...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
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...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
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
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...

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.