Lets say I have a table in a sql server 2000 database called TransactionType:
CREATE TABLE [dbo].[TransactionType](
[ID] [int] NOT NULL,
[Description] [varchar](50) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL,
CONSTRAINT [PK_TransactionType] PRIMARY KEY CLUSTERED
(
[ID] ASC
) ON [PRIMARY]
) ON [PRIMARY]
I then have a transaction table with a column called TransactionTypeID, keyed off of the ID column of the TransactionType table.
My .net client application is responsible for inserting transaction records and specifying the transaction type. My first thought was to have an enumeration defined, casting the enumeration to an integer and passing that value to the database. The issue is that potentially, someone could go into the database and change one of the IDs in the TransactionType table, making the IDs in the database out of synch with the IDs in the client applications enumeration.
So, after my long winded eplanation, my question is, are there design patterns/techniques others use to combat this issue?