DDL Below...Question. I've got two tables ConferenceParam and ConferenceParamValue.ConferenceParam holds the default settings for a Customer's coference.ConferenceParamValue holds the "overriding" settings for a particular conference.I've got a composite primary key of ParamName and CustomerID. Is this a good idea, or should I go with an arbitray key like an Identity? I've read all of the articles on the site about choosing them, but I still have not found a "rule" that I can apply that tells me when to do what.Composite Key or Abitrary key? What should I do?Thanks all! CREATE TABLE [dbo].[ConferenceParam] ( [ParamName] [varchar] (50) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL , [CustomerID] [int] NOT NULL , [DefaultValue] [varchar] (100) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL , [Cre_Date] [datetime] NOT NULL , [Cng_Date] [datetime] NOT NULL ) ON [PRIMARY]GOCREATE TABLE [dbo].[ConferenceParamValue] ( [ParamName] [varchar] (50) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL , [CustomerID] [int] NOT NULL , [ParamValue] [varchar] (100) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL , [Cre_Date] [datetime] NOT NULL , [Cng_Date] [datetime] NOT NULL ) ON [PRIMARY]GOALTER TABLE [dbo].[ConferenceParam] WITH NOCHECK ADD CONSTRAINT [PK_ConferenceParam] PRIMARY KEY CLUSTERED ( [ParamName], [CustomerID] ) ON [PRIMARY] GOALTER TABLE [dbo].[ConferenceParamValue] WITH NOCHECK ADD CONSTRAINT [PK_ConferenceParamValue] PRIMARY KEY CLUSTERED ( [ParamName], [CustomerID] ) ON [PRIMARY] GOALTER TABLE [dbo].[ConferenceParam] WITH NOCHECK ADD CONSTRAINT [DF_ConferenceParam_Cre_Date] DEFAULT (getdate()) FOR [Cre_Date], CONSTRAINT [DF_ConferenceParam_Cng_Date] DEFAULT (getdate()) FOR [Cng_Date]GOALTER TABLE [dbo].[ConferenceParam] ADD CONSTRAINT [FK_ConferenceParam_ConferenceParamValue] FOREIGN KEY ( [ParamName], [CustomerID] ) REFERENCES [dbo].[ConferenceParamValue] ( [ParamName], [CustomerID] ), CONSTRAINT [FK_ConferenceParam_Customer] FOREIGN KEY ( [CustomerID] ) REFERENCES [dbo].[Customer] ( [CustomerID] )GO
Michael<Yoda>Use the Search page you must. Find the answer you will.</Yoda>