473,499 Members | 1,655 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Relational Design - Organisations and Contacts Addresses - Help Please

Hello,

Could someone please point me in the right direction regarding a
relational design question.

The situation is holding contact addresses for Individual contacts and
their organisations, where each organisation could have several
contacts with different addresses or the same address. Not wanting to
duplicate addresses if possible, I am thinking about a table holding
only the address info and separate tables for organisations and
contacts. But I then need to make a link from the Org and Individual
to a shared address (ie where they are the same thing).

I would greatly appreciate any guidance that can be thrown my way.
Many thanks, and I look forward to reading any responses.

Kev

May 30 '06 #1
4 1285
Hi!
I'll give it a try :-)

I have a similar construction in a db.

I used four tables:

tblIndividualsContacts
tblZipCodes
tblOrg
tblRegistration

tblRegistration is used for, that's right!, registration of contacts
and what organization they belong to.

tblZipCodes holds: ZipCodeID,ZipCode, City

and the rest is obvious I think.

Don't know really if this is the optimal design, but it works fine for
our company.

I think you could do without tblRegistration, if your goal is only to
register when creating a new contact. Then all registration would take
place in tblIndividualsContacts.

Hope this can help you out :-)

Kev.T skrev:
Hello,

Could someone please point me in the right direction regarding a
relational design question.

The situation is holding contact addresses for Individual contacts and
their organisations, where each organisation could have several
contacts with different addresses or the same address. Not wanting to
duplicate addresses if possible, I am thinking about a table holding
only the address info and separate tables for organisations and
contacts. But I then need to make a link from the Org and Individual
to a shared address (ie where they are the same thing).

I would greatly appreciate any guidance that can be thrown my way.
Many thanks, and I look forward to reading any responses.

Kev


May 30 '06 #2
Possibilities:

tblContact
ContactID autonumber
first name
last name
other fields
CompanyID foreign Key to Company table
AddressID foreign key to Address Table
tblCompany
CompanID autonumber
Company name
other company info
AddressID foreign key to Address Table

tblAddress
AddressID autonumber
addressline1
addressline2
addressline3
ZipcodeID foreign key to Zipcode table

tblZipcode
ZipcodeID autonumber
Zipcode
City
State
Country

If you make the zipcode table as above then you can
have to city names for same zipcode which can occur. If you use the
ZipCode as the key then ONLY ONE name can be associated with zipcode.

Will need to allow for changing the address for the contact, but can
default to the company address when originally created. How to present
the possibility or recognizing the potential may take some thought.

Jun 1 '06 #3
Thanks Krij I will give your suggestion a try, and let you know how I
got on.
Krij wrote:
Hi!
I'll give it a try :-)

I have a similar construction in a db.

I used four tables:

tblIndividualsContacts
tblZipCodes
tblOrg
tblRegistration

tblRegistration is used for, that's right!, registration of contacts
and what organization they belong to.

tblZipCodes holds: ZipCodeID,ZipCode, City

and the rest is obvious I think.

Don't know really if this is the optimal design, but it works fine for
our company.

I think you could do without tblRegistration, if your goal is only to
register when creating a new contact. Then all registration would take
place in tblIndividualsContacts.

Hope this can help you out :-)

Kev.T skrev:
Hello,

Could someone please point me in the right direction regarding a
relational design question.

The situation is holding contact addresses for Individual contacts and
their organisations, where each organisation could have several
contacts with different addresses or the same address. Not wanting to
duplicate addresses if possible, I am thinking about a table holding
only the address info and separate tables for organisations and
contacts. But I then need to make a link from the Org and Individual
to a shared address (ie where they are the same thing).

I would greatly appreciate any guidance that can be thrown my way.
Many thanks, and I look forward to reading any responses.

Kev


Jun 5 '06 #4
Thanks Ron, I will have a play with this one and let you know how I
get on.

Ron2006 wrote:
Possibilities:

tblContact
ContactID autonumber
first name
last name
other fields
CompanyID foreign Key to Company table
AddressID foreign key to Address Table
tblCompany
CompanID autonumber
Company name
other company info
AddressID foreign key to Address Table

tblAddress
AddressID autonumber
addressline1
addressline2
addressline3
ZipcodeID foreign key to Zipcode table

tblZipcode
ZipcodeID autonumber
Zipcode
City
State
Country

If you make the zipcode table as above then you can
have to city names for same zipcode which can occur. If you use the
ZipCode as the key then ONLY ONE name can be associated with zipcode.

Will need to allow for changing the address for the contact, but can
default to the company address when originally created. How to present
the possibility or recognizing the potential may take some thought.


Jun 5 '06 #5

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

Similar topics

1
1213
by: Pritcham | last post by:
Hi I'm currently having to design a database for a recruitment agency that's just started up and have one area where I'm a little unsure where to go. Basically I've implemented the 'standard'...
1
2370
by: Steve | last post by:
Hi all Ok then I have searched through the back postings for a while now on google and read some interesting stuff on how to model a typical client / order db however.... My problem is that I...
3
1197
by: Mark H. | last post by:
Hello ppl, I d like some help designing a customized contact list. I have a table for people and a table for addresses. In 99% of the cases one person will have one or more addresses so we have...
1
2169
by: Tim Fierro | last post by:
Hello, I have had many years using flat file databases (File Express from way back) but am now at a company where a relational database is needed and would carry us into the future. Since I...
1
1413
by: stormogulen | last post by:
Hi! I'm hoping someone can help me come up with a 'best possible solution' for the following problem: I'm trying to design an addressbook, i.e a storage for adresses. I would like my adresses...
2
3370
by: Allen Anderson | last post by:
Hi, I'm trying to design contact (names and addresses) tables in an Access database. Some of the contacts represent vendors, some are board members of the organization, some are donors, some...
4
6371
by: deekay | last post by:
At the moment I have simple Access DB with 3 tables Companies, Contacts and Activities. In the Company table we have stored the address fields Address Street Suburb City Code
12
1755
by: Ant Grinyer | last post by:
Having worked in software development for over 15 years in many organisations using different development methodologies such as waterfall, RUP, Scrum and XP, I'm still not sure if there is a...
0
7132
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
7009
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
7178
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
7390
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...
0
5475
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
3103
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
3094
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
1427
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
1
665
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.