Re: OT: SQL Server Table Design Question

2004-03-18 Thread Dick Applebaum
You should not experience any performance hit. The only real downside is what Dave was talking about -- unless you have a good reason, why clutter up the database with an extra field and indexes -- the law of parsimony -- the simplest way is the best way. But, if you *do* have a good reason (as

RE: OT: SQL Server Table Design Question

2004-03-18 Thread Tangorre, Michael
What are some of the downsides to this? Will I experience a performance hit should I use the additional key? > Now, the above are valid reasons for including a separate key > -- another might be that the T3 record contains intersection > data, and/or it is sometimes meaningful to process this ta

Re: OT: SQL Server Table Design Question

2004-03-18 Thread Dick Applebaum
On Mar 18, 2004, at 7:25 AM, Nick de Voil wrote: > Just to play devil's advocate and also enjoy the unusual experience of >  disagreeing with Dave - your proposed approach of adding a surrogate > key is >  our standard way of doing things. Even when the table is a simple >  intersection table con

RE: OT: SQL Server Table Design Question

2004-03-18 Thread Tom Kitta
I agree, we do the same thing here. TK   -Original Message-   From: Nick de Voil [mailto:[EMAIL PROTECTED]   Sent: Thursday, March 18, 2004 10:26 AM   To: CF-Talk   Subject: Re: OT: SQL Server Table Design Question   Just to play devil's advocate and also enjoy the unusual experien

Re: OT: SQL Server Table Design Question

2004-03-18 Thread Nick de Voil
Just to play devil's advocate and also enjoy the unusual experience of disagreeing with Dave - your proposed approach of adding a surrogate key is our standard way of doing things. Even when the table is a simple intersection table consisting of nothing but 2 foreign keys, we always make the primar

Re: OT: SQL Server Table Design Question

2004-03-18 Thread Dick Applebaum
I tend to agree with Dave and opt for not adding Column C If I understand, you want to deal with C as an abstraction  of the A-B relationship.  I can see how passing  C (instead of A & B) would simplify form handling. But, you could pass AB just as easily as you can pass C. I think introducing

RE: OT: SQL Server Table Design Question

2004-03-18 Thread Tangorre, Michael
Basically, I only gave you a partial story.. The rest of it is that the join tables are used in other relationships and the where conditions and join conditions are getting sloppy. In addition, a lot of the front end deals with dynamic forms and passing around a handful of IDs is getting cumbersome

RE: OT: SQL Server Table Design Question

2004-03-18 Thread Tony Weeg
yeah, the question is a bit vague    -Original Message- From: Dick Applebaum [mailto:[EMAIL PROTECTED] Sent: Thursday, March 18, 2004 8:44 AM To: CF-Talk Subject: Re: OT: SQL Server Table Design Question On Mar 18, 2004, at 5:04 AM, Tangorre, Michael wrote: > What is the proper,

Re: OT: SQL Server Table Design Question

2004-03-18 Thread Dick Applebaum
On Mar 18, 2004, at 5:04 AM, Tangorre, Michael wrote: > What is the proper, or preferred way of doing the following: > > >  I have three tables: > > >  T1 - PK A >  T2 - PK B >  T3 - PK AB (compound) > > >  Is it acceptable to add column C to T3 and make that the PK, and then > add a >  unique co

OT: SQL Server Table Design Question

2004-03-18 Thread Tangorre, Michael
What is the proper, or preferred way of doing the following: I have three tables: T1 - PK A T2 - PK B T3 - PK AB (compound) Is it acceptable to add column C to T3 and make that the PK, and then add a unique constraint to AB? This would ease writing in writing of the WHERE clauses when up