Click here to Skip to main content
15,884,836 members
Home / Discussions / Database
   

Database

 
GeneralRe: Composite Key Pin
Eddy Vluggen1-Sep-15 3:33
professionalEddy Vluggen1-Sep-15 3:33 
GeneralRe: Composite Key Pin
Tim Carmichael1-Sep-15 2:15
Tim Carmichael1-Sep-15 2:15 
GeneralRe: Composite Key Pin
Gilbert Consellado1-Sep-15 3:08
professionalGilbert Consellado1-Sep-15 3:08 
GeneralRe: Composite Key Pin
Tim Carmichael1-Sep-15 3:59
Tim Carmichael1-Sep-15 3:59 
AnswerRe: Composite Key Pin
Wendelius1-Sep-15 3:07
mentorWendelius1-Sep-15 3:07 
GeneralRe: Composite Key Pin
Gilbert Consellado1-Sep-15 3:41
professionalGilbert Consellado1-Sep-15 3:41 
GeneralRe: Composite Key Pin
Wendelius1-Sep-15 19:32
mentorWendelius1-Sep-15 19:32 
AnswerRe: Composite Key Pin
Mycroft Holmes1-Sep-15 12:54
professionalMycroft Holmes1-Sep-15 12:54 
I go slightly against the grain here, I use a LinkID field for many to many tables, what you are describing, setting that as the primary key. The 2 foriegn key fields can then have a unique constraint applied.

And yes this adds a performance cost, minor unless you are using serious volumes, but if there are tables referencing the link table you only need the linkid field rather than the 2 fields making up the composite key.
Never underestimate the power of human stupidity
RAH

QuestionKnowing if connection failed to sql server in C# Pin
pluss425-Aug-15 21:46
pluss425-Aug-15 21:46 
AnswerRe: Knowing if connection failed to sql server in C# Pin
Jörgen Andersson25-Aug-15 22:25
professionalJörgen Andersson25-Aug-15 22:25 
SuggestionRe: Knowing if connection failed to sql server in C# Pin
Richard Deeming26-Aug-15 2:20
mveRichard Deeming26-Aug-15 2:20 
GeneralRe: Knowing if connection failed to sql server in C# Pin
Jörgen Andersson26-Aug-15 2:43
professionalJörgen Andersson26-Aug-15 2:43 
GeneralRe: Knowing if connection failed to sql server in C# Pin
pluss426-Aug-15 8:08
pluss426-Aug-15 8:08 
Questionquestion for my new project Pin
turion8722-Aug-15 5:09
turion8722-Aug-15 5:09 
AnswerRe: question for my new project Pin
Wendelius22-Aug-15 5:58
mentorWendelius22-Aug-15 5:58 
AnswerRe: question for my new project Pin
Mycroft Holmes22-Aug-15 13:37
professionalMycroft Holmes22-Aug-15 13:37 
AnswerRe: question for my new project Pin
Jörgen Andersson23-Aug-15 21:09
professionalJörgen Andersson23-Aug-15 21:09 
AnswerRe: question for my new project Pin
GuyThiebaut25-Aug-15 2:53
professionalGuyThiebaut25-Aug-15 2:53 
QuestionER Diagram Pin
piiinku0021-Aug-15 15:53
piiinku0021-Aug-15 15:53 
AnswerRe: ER Diagram Pin
Jörgen Andersson23-Aug-15 22:21
professionalJörgen Andersson23-Aug-15 22:21 
QuestionJoining 4 Tables in SQL Server Pin
Member 1154678320-Aug-15 10:35
Member 1154678320-Aug-15 10:35 
AnswerRe: Joining 4 Tables in SQL Server Pin
Mycroft Holmes20-Aug-15 13:02
professionalMycroft Holmes20-Aug-15 13:02 
GeneralRe: Joining 4 Tables in SQL Server Pin
Member 1154678321-Aug-15 3:50
Member 1154678321-Aug-15 3:50 
GeneralRe: Joining 4 Tables in SQL Server Pin
Eddy Vluggen21-Aug-15 4:20
professionalEddy Vluggen21-Aug-15 4:20 
GeneralRe: Joining 4 Tables in SQL Server Pin
Mycroft Holmes21-Aug-15 14:16
professionalMycroft Holmes21-Aug-15 14:16 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.