A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Access » Database Design
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

Table Connection



 
 
Thread Tools Display Modes
  #1  
Old March 4th, 2008, 07:05 AM posted to microsoft.public.access.tablesdbdesign
ak
external usenet poster
 
Posts: 70
Default Table Connection

Dear experts,
Here I have a very important question. Once I connect table to table
sometimes it shows 1 to 1. In the same time I need it 1 to many. How come
that shows one to one? What is the technique in it? How it works?

Besides this I have another question. For example table1 and table2.
In query I can see field size as : integer and long integer. What is
integer and what is long integer. I dont know this. Please explain. I am a
top intrested student in msaccess who is studying more than 7 years. In
table1 in which situation I have to mention field size integer and long
integer? If so what I have
to mention in table2 ? Would appreciate your response.
  #2  
Old March 4th, 2008, 11:23 AM posted to microsoft.public.access.tablesdbdesign
Allen Browne
external usenet poster
 
Posts: 11,706
Default Table Connection

A1. One-to-one
When you create a relationship between 2 tables, Access looks at how the
fields are indexed. If it's the primary key (or a unique index), it knows
that you can only have that value in ONE record, so it determines that's the
ONE side of the relationship.

If the field on the other side is uniquely indexes as well, you can have
that value in only ONE record there as well. Hence it reports it as a
one-to-one relationship. If this happens when you don't expect it, you need
to change the index on the table that should be in the MANY side of the
relation, so it is not uniquely indexed.

A2. Integer vs Long.
In Access an Integer means a whole number up to a maximum of 32767 (i.e.
signed, 16-bit.) A Long Integer is a signed 32-bit number, so handles any
whole number up to 2 billion.

These days, I suggest you use Long Integer unless you have a special reason
to use the smaller type.

If you want to create a relationship between tables, you need to use the
same type on both sides. The default AutoNumber is a long integer, so a
foreign key that relates back to an AutoNumber needs to be a Long Integer.

--
Allen Browne - Microsoft MVP. Perth, Western Australia
Tips for Access users - http://allenbrowne.com/tips.html
Reply to group, rather than allenbrowne at mvps dot org.

"ak" wrote in message
...
Dear experts,
Here I have a very important question. Once I connect table to table
sometimes it shows 1 to 1. In the same time I need it 1 to many. How
come
that shows one to one? What is the technique in it? How it works?

Besides this I have another question. For example table1 and table2.
In query I can see field size as : integer and long integer. What is
integer and what is long integer. I dont know this. Please explain. I
am a
top intrested student in msaccess who is studying more than 7 years. In
table1 in which situation I have to mention field size integer and long
integer? If so what I have
to mention in table2 ? Would appreciate your response.


 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


All times are GMT +1. The time now is 09:20 AM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.