Wrox Programmer Forums
|
Access Discussion of Microsoft Access database design and programming. See also the forums for Access ASP and Access VBA.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Access section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old January 31st, 2007, 11:14 AM
Friend of Wrox
 
Join Date: Mar 2004
Posts: 3,069
Thanks: 0
Thanked 10 Times in 10 Posts
Default

This may work, but it means that each dealer can never have more than one car, and each car can never have more than one job.

mmcdonal
 
Old January 31st, 2007, 11:41 AM
Friend of Wrox
 
Join Date: Jan 2007
Posts: 109
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via AIM to scandalous Send a message via MSN to scandalous
Default

Oh uh, I need Dealers to be able to have multiple jobs.

If JobNumberis the PK I thought the rest of the entries in that table could be duplicated.

Any suggestions on how to fix this problem?

 
Old January 31st, 2007, 11:44 AM
Friend of Wrox
 
Join Date: Mar 2004
Posts: 3,069
Thanks: 0
Thanked 10 Times in 10 Posts
Default

Create a Dealer table with a DealerID as PK
Create a Car table with CarID as PK, and DealerID as FK
Create a Job table with JobID as PK, and CarID as FK

This will allow you to have many dealers, each one havig many cars, and each car having many jobs.
If you would like a single car serviced by many dealers, then that will require a DealerID FK in the job table.

mmcdonal
 
Old January 31st, 2007, 12:07 PM
Friend of Wrox
 
Join Date: Jan 2007
Posts: 109
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via AIM to scandalous Send a message via MSN to scandalous
Default

Thank you so much!!!






Similar Threads
Thread Thread Starter Forum Replies Last Post
displaying relationships williamlove Access VBA 1 August 14th, 2008 10:20 AM
Many-to-Many Relationships in O/R Mapping sarosh Classic ASP Databases 0 December 8th, 2006 05:45 AM
relationships - why really? pettrer SQL Server ASP 2 August 31st, 2006 12:59 PM
Table relationships tanjuakio SQL Server 2000 3 July 28th, 2005 09:14 AM
contraints and relationships zouky ADO.NET 11 September 24th, 2004 01:30 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.