473,395 Members | 1,656 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.

relationship on tables

I have 5 tables need to create relationship

Customer Table
CustomerID(auto number)(primary key)
Customer Name(text)
Customer City(text)
Customer St(txt)

Customer OrderTable
Customer Number(txt)(primary key)
Company tel. Ph lines- Number
Parted Company Tel. ph Lines -- Number
remote worker branch- txt/ yes no
Number virtual tel.ph NOs. - number
site No. - number
Review board Approval - blank or yes no
Contract signed - date
Project Initation- Date
service type -text
Equipment type - text
Employee Tbl
EmpID(auto no)(primary key)
Emp Fs Name(txt)
Emp Ls Name(txt)

IpSuborder Table
suborder- Number (primary key)
schedule testing- date
conduct v testing- date
checkout -date
acd -date
sch.test turn- date
plns switch- date
transport t- date
conduct company test turn- date
cported -date
maintenance acceptance - date
reason order days- text/ memo
order completed - date
order cancel -date
order disconnect- date

mostly my queries and report will be based on suborder table.

Thanks

Nisha Patel

Apr 4 '07 #1
2 2160
You will need a "foreign key" in compatible field format the table on the
many side to the main table to which it is related (if it is a one-to-one
relationship, it's arbitrary which is the main and which is the related
table; if it is a many-to-many, you'll need a junction or intersection
table... not as simple). In an order database, the Orders Table is usually
the main/central focus.

Search at http://support.microsoft.com in the Knowledge Base for "Orders and
Solutions" for a sample Orders database to examine.

Larry Linson
Microsoft Access MVP
"access baby" <ni*******@gmail.comwrote in message
news:11**********************@p77g2000hsh.googlegr oups.com...
>I have 5 tables need to create relationship

Customer Table
CustomerID(auto number)(primary key)
Customer Name(text)
Customer City(text)
Customer St(txt)

Customer OrderTable
Customer Number(txt)(primary key)
Company tel. Ph lines- Number
Parted Company Tel. ph Lines -- Number
remote worker branch- txt/ yes no
Number virtual tel.ph NOs. - number
site No. - number
Review board Approval - blank or yes no
Contract signed - date
Project Initation- Date
service type -text
Equipment type - text
Employee Tbl
EmpID(auto no)(primary key)
Emp Fs Name(txt)
Emp Ls Name(txt)

IpSuborder Table
suborder- Number (primary key)
schedule testing- date
conduct v testing- date
checkout -date
acd -date
sch.test turn- date
plns switch- date
transport t- date
conduct company test turn- date
cported -date
maintenance acceptance - date
reason order days- text/ memo
order completed - date
order cancel -date
order disconnect- date

mostly my queries and report will be based on suborder table.

Thanks

Nisha Patel

Apr 4 '07 #2
On Apr 4, 6:04 pm, "Larry Linson" <boun...@localhost.notwrote:
Your reply here is of such poor quality, IMO, that I'm hoping you are
aaron kempf's alter ego...
You will need a "foreign key" in compatible field format the table on the
many side to the main table to which it is related
Have you given any thought to the meaning of your phrase, "compatible
field format"? Can you explain what relevance field formatting has to
a foreign key? (None, I suspect.)

What do you mean by "main table" and "related table"?

Consider the following SQL DDL (Data Definition Language) snippet:

CREATE TABLE OrderDetails (
order_ID INTEGER NOT NULL
REFERENCES Orders (order_ID)

The correct terms for the two tables in a foreign key definition (i.e.
those found in the SQL literature) are 'referenced table' and
'referencing table' respectively.

I was going to give you the benefit of the doubt and infer that by
"main table" you meant referenced table and by "related table" you
meant referencing table, but then you said,
if it is a one-to-one
relationship, it's arbitrary which is the main and which is the related
table; if it is a many-to-many, you'll need a junction or intersection
table
Junction tables are used to model all relationships between entities
(which I why I prefer the name 'relationship table') i.e. not limited
to many-to-many relationships and include one-to-many and one-to-one
relationships.

Let's rewrite your sentence using the correct terminology: "If it is a
one-to-one relationship, it's arbitrary which is the referenced table
and which is the referencing table." Do you now see the problem?
That's right: the junction table is *always* the referencing table!

Jamie.

--
Apr 5 '07 #3

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

Similar topics

0
by: Alcyone Oliveira | last post by:
------=_NextPart_000_000D_01C36572.F6480CE0 Content-Type: multipart/alternative; boundary="----=_NextPart_001_000E_01C36572.F6480CE0" ------=_NextPart_001_000E_01C36572.F6480CE0 Content-Type:...
4
by: H Cohen | last post by:
Hi, I have a corporate database with about 60 different tables that spans manufacturing, accounting, marketing, etc. It is possible, but unwieldy, to establish a relationship for each table...
2
by: Steve | last post by:
How do I delete a relationship between tables in SQL Server 7.0? I previously had a relationship between two tables, but I renamed the field and table of one of the tables and the old...
8
by: Andante.in.Blue | last post by:
Hello, I have just inherited a legacy Access 97 database. While going through it, I noticed something strange... its Relationships window (the one accessed by Tools --> Relationships) is almost...
2
by: Marco Simone | last post by:
Hi, I have 4 tables, tblCompany, tblA, tblB and tblC. tblA, tblB and tblC contain same type of data, they should be in one table, but since there are many fields, I split it into 3 tables. Each...
5
by: BrianDP | last post by:
This is a strange one-- I have an Access 2K database with a split front end/back end. There are two tables in the back end - RFile and RLine. There is a one to many relationship from...
10
by: Richard | last post by:
Hi folks, thanks for taking the time to read this (and hopefully point our where I'm going wrong). The scenario: I have a local Access2007 database which links in several read only mySql...
11
by: RobertJohn | last post by:
Hi all I am using Access 2007 to start a small home library application, and so far it has two tables. 1. Books, with fields Book_ID (Primary Key) and Title, and 2. Authors, with fields...
4
by: Phil Stanton | last post by:
Having spent ages sorting out the layout of my relationship window with about 60 tables and getting it all tidy and with enough of the tables visible to show the PK an FK relaionshipsOn a subseqent...
6
by: NicoleCartrette | last post by:
Going back to school is easier said than done.. This was posted to an older thread earlier but I don't think it got any attention. Your help is appreciated Professor requires we create a...
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:
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
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
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...

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.