Click here to Skip to main content
15,913,773 members

Welcome to the Lounge

   

For discussing anything related to a software developer's life but is not for programming questions. Got a programming question?

The Lounge is rated Safe For Work. If you're about to post something inappropriate for a shared office environment, then don't post it. No ads, no abuse, and no programming questions. Trolling, (political, climate, religious or whatever) will result in your account being removed.

 
GeneralRe: Code First, do you like it? Pin
Sascha Lefèvre10-Feb-16 5:58
professionalSascha Lefèvre10-Feb-16 5:58 
AnswerRe: Code First, do you like it? PinPopular
HobbyProggy10-Feb-16 2:45
professionalHobbyProggy10-Feb-16 2:45 
AnswerRe: Code First, do you like it? Pin
Amarnath S10-Feb-16 2:54
professionalAmarnath S10-Feb-16 2:54 
GeneralRe: Code First, do you like it? Pin
Slacker00710-Feb-16 3:43
professionalSlacker00710-Feb-16 3:43 
GeneralRe: Code First, do you like it? Pin
Amarnath S10-Feb-16 4:23
professionalAmarnath S10-Feb-16 4:23 
GeneralRe: Code First, do you like it? Pin
Slacker00710-Feb-16 4:26
professionalSlacker00710-Feb-16 4:26 
GeneralRe: Code First, do you like it? Pin
Amarnath S10-Feb-16 6:20
professionalAmarnath S10-Feb-16 6:20 
AnswerRe: Code First, do you like it? PinPopular
Marc Clifton10-Feb-16 3:04
mvaMarc Clifton10-Feb-16 3:04 
Programmers rarely think correctly in terms of relationships between objects when they do code first. They're usually thinking in terms of denormalized data. Certainly, I do, because it's the denormalized data that I usually want to display to the user.

So, that's the first problem with code first.

Programmers are typically not very good at figuring out normalization and the nuances of left joins, right joins, one-to-many and many-to-many relationships, at least as to how you'd implement them in a DB. Sure, the code first stuff should be able to generate the lookup tables if you define the relationship ordinality correctly, but as others have written, I'd rather have direct control.

Even DB people make a mess of relationships.

Lastly, there's a weird reality that I can define a decent normalized database, but when I go to use it in the code, I realize that I screwed up understanding some relationship that I thought I understood when creating the DB, but I realize I got wrong when I go actually trying to use it based on the requirements. It's weird that that can happen, but it does, at least in my experience.

[tldr:]

Neither code first nor database first is the correct approach. It needs to be "code and database together." And code first does NOT get you there.

Marc

GeneralRe: Code First, do you like it? Pin
Slacker00710-Feb-16 3:06
professionalSlacker00710-Feb-16 3:06 
AnswerRe: Code First, do you like it? Pin
Foothill10-Feb-16 3:06
professionalFoothill10-Feb-16 3:06 
AnswerRe: Code First, do you like it? Pin
Tom Deketelaere10-Feb-16 3:41
professionalTom Deketelaere10-Feb-16 3:41 
GeneralRe: Code First, do you like it? Pin
Slacker00710-Feb-16 3:51
professionalSlacker00710-Feb-16 3:51 
AnswerRe: Code First, do you like it? Pin
User 483504710-Feb-16 3:42
User 483504710-Feb-16 3:42 
AnswerRe: Code First, do you like it? Pin
Duncan Edwards Jones10-Feb-16 4:03
professionalDuncan Edwards Jones10-Feb-16 4:03 
GeneralRe: Code First, do you like it? Pin
Slacker00710-Feb-16 4:35
professionalSlacker00710-Feb-16 4:35 
GeneralRe: Code First, do you like it? Pin
Duncan Edwards Jones10-Feb-16 4:42
professionalDuncan Edwards Jones10-Feb-16 4:42 
AnswerRe: Code First, do you like it? Pin
Dave Kreskowiak10-Feb-16 4:29
mveDave Kreskowiak10-Feb-16 4:29 
GeneralRe: Code First, do you like it? Pin
Slacker00710-Feb-16 4:37
professionalSlacker00710-Feb-16 4:37 
AnswerRe: Code First, do you like it? Pin
Marco Bertschi10-Feb-16 5:24
protectorMarco Bertschi10-Feb-16 5:24 
AnswerRe: Code First, do you like it? Pin
pkfox10-Feb-16 5:32
professionalpkfox10-Feb-16 5:32 
GeneralRe: Code First, do you like it? Pin
PIEBALDconsult10-Feb-16 12:44
mvePIEBALDconsult10-Feb-16 12:44 
AnswerRe: Code First, do you like it? Pin
dazfuller10-Feb-16 20:49
dazfuller10-Feb-16 20:49 
AnswerRe: Code First, do you like it? Pin
Flo Lee10-Feb-16 20:54
Flo Lee10-Feb-16 20:54 
AnswerRe: Code First, do you like it? Pin
dietmar paul schoder10-Feb-16 21:38
professionaldietmar paul schoder10-Feb-16 21:38 
AnswerRe: Code First, do you like it? Pin
Quirkafleeg10-Feb-16 21:42
Quirkafleeg10-Feb-16 21:42 

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.