need db advice, input, ideas (1 Viewer)

lipin

Registered User.
Local time
Today, 02:13
Joined
May 21, 2002
Messages
149
I have a db that is used to track audited orders and the errors found in those audits. Well I have it almost ready for implementing and the way I set it up was the primary key in the main table was the carton number on the order.
Well now mgmt says that it needs to be able to accept the same carton being audited more than one time. But my table will not accept because that unique carton number is already in the table. I have queries and reports tied together and relationships in place. So my question is How should I handle multiple audits on a particular carton? some of my thoughts are:

a composite primary key? How will this affect relationships?

a separate field to enter if it is a multiple audit carton number?

just set it to accept duplicates? any negative affects?

Just looking for any helpful thoughts or ideas. Thanks.
 

BarkerD

Registered User.
Local time
Today, 02:13
Joined
Dec 1, 1999
Messages
106
Change your primary key to an Audit Number. Make the carton number a foreign key to the Carton table.

You may need to do some re-design of your application before it is ready to be implemented. Ask your boss if there are any other specifications that you need to know about before you re-design. In my experience, management always likes to change directions in mid-stream. Get the specs on paper before proceeding. :D :confused:
 

The_Doc_Man

Immoderate Moderator
Staff member
Local time
Yesterday, 20:13
Joined
Feb 28, 2001
Messages
27,172
While you are at it, document how much it costs in terms of extra hours for this little change. Managers ALWAYS need to have the cost of something rubbed in their faces.

It won't make them stop asking for changes, though. If you are lucky, your boss DOESN'T have pointy hair around his bald spot so will learn to ask for things earlier in the development cycle.
 

Users who are viewing this thread

Top Bottom