Limiting a related table to one entry of a given 'subtype'

C

Cheese_whiz

Hi,

I have a main table 'files'. I can relate people to files in various roles.
To achieve that and given my other requirements, I have these tables:

tblFiles for main files
tblEntitities that includes all the contacts/organizations/groups/etc
tblRoles which contains roles for what an entity might play in a file (read:
plaintiff, defendant, witness, etc)
tblFileEntityRoles used to resolve the many to many relationships

Ok, what I need to be able to do, if possible, is to limit a particular role
to only one entry per file. For example, maybe I only want to be able to
have a maximum of one 'Lead Staff' member for each file.

How would I do that? Could I add a column to my roles table that specifies
the maximum per file number of each role? Is there a better way?

Tahnks,
CW
 

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

Top