Re: Check for no more than two entries of each value in a column?

From: <>
Date: Fri, 17 Apr 2009 16:23:59 -0700 (PDT)
Message-ID: <>

On Apr 17, 1:38 pm, livefreeordie <> wrote:
> Hi,
> I need to create an app where any given employee may nominate up to
> TWO other employees per year for an award.  This number could change.

Seriously this sounds like something where the business rules could change at any time.

I would think about an ERD with a many to many relationship ( employee suggesting to employee being nominated perhaps ) and the usual intersection table between. I think I would stay away from any modifications to the basic employeee table ( entity ).

Let the employees make as many suggestions as they want via the system against other employees or have the application enforce the hard coded rule. ( Sorry you have already nominated 2 employees this year thanks for using the system see ya ).

Or create a stored procedure to maintain the intersection table. Maybe have the stored procedure get it's values of how many per year from another table and create a specific screen in the application for HR to change their minds?

My gut feel is that HR will change their minds continually about how many valid nominations are in fact the business rule and I would tend to recommend letting them all into the system and let HR rank and monitor the whole mess. Received on Fri Apr 17 2009 - 18:23:59 CDT

Original text of this message