addressalign-toparrow-leftarrow-rightbackbellblockcalendarcameraccwcheckchevron-downchevron-leftchevron-rightchevron-small-downchevron-small-leftchevron-small-rightchevron-small-upchevron-upcircle-with-checkcircle-with-crosscircle-with-pluscontroller-playcrossdots-three-verticaleditemptyheartexporteye-with-lineeyefacebookfolderfullheartglobegmailgooglegroupshelp-with-circleimageimagesinstagramFill 1light-bulblinklocation-pinm-swarmSearchmailmessagesminusmoremuplabelShape 3 + Rectangle 1ShapeoutlookpersonJoin Group on CardStartprice-ribbonprintShapeShapeShapeShapeImported LayersImported LayersImported Layersshieldstartickettrashtriangle-downtriangle-uptwitteruserwarningyahoo

Re: [sfmysql] Database Design help needed by a beginner

From: Bill K.
Sent on: Sunday, February 26, 2012 9:50 AM
I'm happy to get into a discussion of normal forms, but the short answer is that EAV is not in any normal form.  It fails to pass the definition of a relation at all, both in its physical form and in form of the virtual table it's meant to model.

More practically, using EAV means you lose the ability to create most types of constraints, such as NOT NULL, UNIQUE KEY, and FOREIGN KEY.  EAV is simply not a relational design, and it creates more problems than it solves.  See this story for example: http://www.simple-talk.com/opinion/opinion-pieces/bad-carma/

But let's get back to the point of Tendi's question, which is asking for beginner help for adding some functionality to a web app.  Showing an EAV diagram to a beginner with no explanation is pretty much not helpful.  Teach a man to fish, and he eats for a lifetime.  Try to teach a man to fish by showing him oceanography research, and he wishes he had asked someone else.

I suggest to Tendi to read a book such as "Beginning Database Design" by Clare Churcher.  Here's a thoughtful review of this book by database guru Baron Schwartz:  http://www.xaprb.com/blog/2009/08/22/a-review-of-beginning-database-design-by-clare-churcher/

My other advice to Tendi when trying to learn a new technology, is to learn by experimenting on throw-away code, *not* to learn as you go, trying to change an app that needs to actually work.

Regards,
Bill Karwin

Our Sponsors

People in this
Meetup are also in:

Sign up

Meetup members, Log in

By clicking "Sign up" or "Sign up using Facebook", you confirm that you accept our Terms of Service & Privacy Policy