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  

Defining Relationships



 
 
Thread Tools Display Modes
  #1  
Old July 14th, 2004, 06:11 PM
Jacob
external usenet poster
 
Posts: n/a
Default Defining Relationships

I can define my relationship as 1:1 or 1:N but what about implementing business rule restrictions etc. For example can i show that a table is Optional or that though the relationship is 1:M that there is a restriction of (1,8) meaning a minimum of 1 record, but a maximum of no more than 8 records? this notation is common but i don't see how to document it. I feel that i can't do all that i need to make sure my DB has a good design.

Thanks!
  #5  
Old July 16th, 2004, 05:32 PM
Tim Ferguson
external usenet poster
 
Posts: n/a
Default Defining Relationships

"=?Utf-8?B?Q01CIGZyb20gT21haGE=?="
wrote in
:


Just out of curiosity, how (generally) could one enforce the max
number of records (cardinality?)


The other way is by putting constraints on the referencing table: for
example if you have only eight seats at a committee, you would have a
Membership table that looks like

Membership
CteeCode INTEGER FK References Comittees
PersonID INTEGER FK References People
SeatNumber INTEGER CONSTRAINT 0SeatNumber AND SeatNumber9

CONSTRAINT pk PRIMARY KEY (CteeCode, PersonID)
CONSTRAINT lt8 UNIQUE (CteeCode, SeatNumber)

The ValidationRule on SeatNumber combined with the unique index means that
no committee can have more than eight members. How you allocate that seat
number is up to you, but remember that it is only an arbitrary counter --
unless, of course, you decide that 1=Chairman, 2=Secretary, etc etc!

Hope that helps


Tim F

 




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

Similar Threads
Thread Thread Starter Forum Replies Last Post
Not seeing all relationships in layout window jettabug General Discussion 3 June 18th, 2004 05:42 PM
removing relationships. FFira General Discussion 1 June 4th, 2004 05:33 AM
Problem with defining my own table style! mca Tables 0 June 1st, 2004 09:23 AM
Table Relationships Design Tom Database Design 1 May 5th, 2004 11:56 PM


All times are GMT +1. The time now is 06:55 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.