one-to-oneOrMore ?

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

How can I enforce a relationship of "one to one or more"? In a tourism
business, a PARTY(lots of data) consists of one or more PASSENGERs(little
data). But, a PARTY must have at least one passenger.
TIA,
Charlie
 
Charlie said:
How can I enforce a relationship of "one to one or more"? In a tourism
business, a PARTY(lots of data) consists of one or more PASSENGERs(little
data). But, a PARTY must have at least one passenger.
TIA,
Charlie

I'm afraid you simply can't enforce this via relationships. You could
conceivably (and with difficulty) construct your user interface to enforce
this i.e. if someone enters a new party, then they must also enter a
passenger, and a passenger may not be deleted if it is the only passenger in
a party. However, as with any rule that relies entirely on the user
interface for it's enforcement, there is plenty of scope for it going wrong
or being circumvented, so it would be wise to incorporate some automatic,
periodic integrity checking in your system.
 
How can I enforce a relationship of "one to one or more"? In a tourism
business, a PARTY(lots of data) consists of one or more PASSENGERs(little
data). But, a PARTY must have at least one passenger.
TIA,
Charlie

You can't. At least temporarily as you're entering the data, you will
have to add a PARTY for there to be a record in the database to which
a PASSENGER record can be linked. It's a chicken-or-egg problem; you
must create one of the records first before the other, so you cannot
require that they both exist at all times.

John W. Vinson[MVP]
Join the online Access Chats
Tuesday 11am EDT - Thursday 3:30pm EDT
http://community.compuserve.com/msdevapps
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top