Click here to Skip to main content
15,889,315 members

The Weird and The Wonderful

   

The Weird and The Wonderful forum is a place to post Coding Horrors, Worst Practices, and the occasional flash of brilliance.

We all come across code that simply boggles the mind. Lazy kludges, embarrassing mistakes, horrid workarounds and developers just not quite getting it. And then somedays we come across - or write - the truly sublime.

Post your Best, your worst, and your most interesting. But please - no programming questions . This forum is purely for amusement and discussions on code snippets. All actual programming questions will be removed.

 
GeneralRe: What use are foreign keys anyway? Pin
OriginalGriff19-Feb-18 6:22
mveOriginalGriff19-Feb-18 6:22 
GeneralRe: What use are foreign keys anyway? Pin
Rob Grainger19-Feb-18 11:00
Rob Grainger19-Feb-18 11:00 
GeneralRe: What use are foreign keys anyway? Pin
Kirk 1038982119-Feb-18 7:24
Kirk 1038982119-Feb-18 7:24 
GeneralRe: What use are foreign keys anyway? Pin
Rob Grainger19-Feb-18 10:59
Rob Grainger19-Feb-18 10:59 
JokeRe: What use are foreign keys anyway? Pin
phil.o19-Feb-18 12:15
professionalphil.o19-Feb-18 12:15 
GeneralRe: What use are foreign keys anyway? Pin
Inferno9019-Feb-18 16:45
professionalInferno9019-Feb-18 16:45 
GeneralRe: What use are foreign keys anyway? Pin
Richard Deeming20-Feb-18 2:42
mveRichard Deeming20-Feb-18 2:42 
GeneralRe: What use are foreign keys anyway? Pin
kmoorevs23-Feb-18 5:43
kmoorevs23-Feb-18 5:43 
Fandango90 wrote:
the same mistakes. Primary key every table with an auto-fill ID column

Sorry, I don't see how this is a mistake. Confused | :confused:

Fandango90 wrote:
Yes, you have a primary key, congratulations! But what's the point if you don't have a reference to the ID from another table?
I think you may have misunderstood the OP's issue. They didn't de-normalize, only removed the FK constraints.

Fandango90 wrote:
Did someone forget that the ID Primary Key column is a machine necessity, if at all? Like who care my next record starts with ID 2001!?

I'm not even sure what you mean by 'machine necessity'. Perhaps it's sarcasm and I'm not getting it. Confused | :confused:

Fandango90 wrote:
A true Primary Key is one created based on data "snippets" off other columns in the table

Again, I can't tell if this is sarcasm or a real opinion. Confused | :confused: So an identity or guid is not a true PK, but a couple of columns where one or more values can change is??? (or, just throw in a timestamp to be sure!) It sure makes future record maintenance a lot easier when I can tag a record with a single condition. Anyway, it would probably make an interesting poll. Smile | :)
"Go forth into the source" - Neal Morse

GeneralRe: What use are foreign keys anyway? Pin
Rob Grainger27-Feb-18 23:20
Rob Grainger27-Feb-18 23:20 
GeneralRe: What use are foreign keys anyway? Pin
TheGreatAndPowerfulOz5-Mar-18 8:47
TheGreatAndPowerfulOz5-Mar-18 8:47 
GeneralRe: What use are foreign keys anyway? Pin
HarvestMoon000010-Mar-18 7:02
HarvestMoon000010-Mar-18 7:02 
GeneralConcurrentQueue & FirstOrDefault() and search speed. Pin
raddevus5-Feb-18 10:28
mvaraddevus5-Feb-18 10:28 
GeneralRe: ConcurrentQueue & FirstOrDefault() and search speed. Pin
Eddy Vluggen6-Feb-18 1:02
professionalEddy Vluggen6-Feb-18 1:02 
GeneralRe: ConcurrentQueue & FirstOrDefault() and search speed. Pin
Richard Deeming6-Feb-18 2:46
mveRichard Deeming6-Feb-18 2:46 
GeneralRe: ConcurrentQueue & FirstOrDefault() and search speed. Pin
raddevus6-Feb-18 5:41
mvaraddevus6-Feb-18 5:41 
GeneralRe: ConcurrentQueue & FirstOrDefault() and search speed. Pin
Kornfeld Eliyahu Peter6-Feb-18 3:37
professionalKornfeld Eliyahu Peter6-Feb-18 3:37 
GeneralRe: ConcurrentQueue & FirstOrDefault() and search speed. Pin
raddevus6-Feb-18 5:37
mvaraddevus6-Feb-18 5:37 
GeneralRe: ConcurrentQueue & FirstOrDefault() and search speed. Pin
Richard Deeming6-Feb-18 10:11
mveRichard Deeming6-Feb-18 10:11 
GeneralRe: ConcurrentQueue & FirstOrDefault() and search speed. Pin
raddevus6-Feb-18 10:19
mvaraddevus6-Feb-18 10:19 
GeneralRe: ConcurrentQueue & FirstOrDefault() and search speed. Pin
Jörgen Andersson9-Feb-18 2:02
professionalJörgen Andersson9-Feb-18 2:02 
GeneralRe: ConcurrentQueue & FirstOrDefault() and search speed. Pin
raddevus9-Feb-18 4:16
mvaraddevus9-Feb-18 4:16 
GeneralRe: ConcurrentQueue & FirstOrDefault() and search speed. Pin
Richard Deeming9-Feb-18 4:47
mveRichard Deeming9-Feb-18 4:47 
GeneralRe: ConcurrentQueue & FirstOrDefault() and search speed. Pin
raddevus9-Feb-18 8:31
mvaraddevus9-Feb-18 8:31 
GeneralRe: ConcurrentQueue & FirstOrDefault() and search speed. Pin
Richard Deeming12-Feb-18 8:19
mveRichard Deeming12-Feb-18 8:19 
GeneralRe: ConcurrentQueue & FirstOrDefault() and search speed. Pin
Jörgen Andersson9-Feb-18 6:09
professionalJörgen Andersson9-Feb-18 6:09 

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.