473,385 Members | 2,069 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,385 software developers and data experts.

Multiway associations

Hi,
I'm making my first database.

I have a list of parts, each of which is sold by multiple
vendors. I also have a list of vendors, each of which sell
multiple parts.

How should i arrange the tables for this that doesn't involve
having lots of empty fields "just in case" ?
---------------------------(end of broadcast)---------------------------
TIP 1: subscribe and unsubscribe commands go to ma*******@postgresql.org

Nov 22 '05 #1
1 1144

On 25/01/2004 05:06 Russell Shaw wrote:
Hi,
I'm making my first database.

I have a list of parts, each of which is sold by multiple
vendors. I also have a list of vendors, each of which sell
multiple parts.

How should i arrange the tables for this that doesn't involve
having lots of empty fields "just in case" ?

One way would be to have a separate vendorpart table something like

CREATE TABLE vendorpart
(
vendor_id int4,
part_id int4
);

which holds the relationships. You'll to define indexes, contraints and
foreign keys on it.
--
Paul Thomas
+------------------------------+---------------------------------------------+
| Thomas Micro Systems Limited | Software Solutions for the Smaller
Business |
| Computer Consultants |
http://www.thomas-micro-systems-ltd.co.uk |
+------------------------------+---------------------------------------------+

---------------------------(end of broadcast)---------------------------
TIP 1: subscribe and unsubscribe commands go to ma*******@postgresql.org

Nov 22 '05 #2

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

Similar topics

1
by: Mike C. Fletcher | last post by:
Yes, yes, I know I should just wait for SourceForge to come up so I can file a bug report, but that's going to be hours, and I'll be knee-deep in Gentoo by then. Just did an all-users install of...
1
by: rollasoc | last post by:
Hi, I'm trying to implement file associations with my application. I've been doing this in phases and I'm stuck at the last hurdle. Phases 1) Installer sets up the file association Main in...
5
by: Eric | last post by:
I want to use embedded icon resources for my file type associations, but only the app.ico seems to show up when I go to choose the icons in the setup File Types editor. The same thing when I try...
4
by: David Allison | last post by:
I am looking to open my MDE Application using the DB files associated with the application I have created. My application is using a non descript three digit extension that is related to the...
1
by: Chance Lerro | last post by:
Here's another way to PREVENT the install program for run-time Access from overwriting existing file associations: 1. Edit the Runtime MSI file with Orca, InstallShield, etc.. 2. Go to the...
0
by: Bruce One | last post by:
I have seen there is only one type of association, and as u link 2 classes it automatically creates a property referencing to the other class. Well, does this cover all relationship between 2...
2
by: Roger Miller | last post by:
When I installed Python 2.5 (on Windows XP) I left 2.4 in place "just in case". Today I decided to remove it. However after doing so (from the control panel) I found that Windows no longer knows...
0
by: Lyle Avery | last post by:
Hi guys, An uninstall of a previous version of Visual Studio, or anything (3rd party dev tools)else happen to unregister these (VS 2005) file extensions. I've tested the ¡°Restore File...
1
by: Lyle Avery | last post by:
Hi guys, Who knows how to restore VS 2k5 file associations, I've clicked Tools->General->"Restore File Associations" button but it doesn't work at all. I know Repair the whole product could fix...
6
by: Jerad Rose | last post by:
I recently installed Visual Studio 2003, after having already installed VS 2005. Unfortunately, it took over all of the file associations. There is an option in Visual Studio 2005 to restore...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
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
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
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...

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.