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

From: farid a.
Sent on: Sunday, February 26, 2012 12:12 PM

On Sun, Feb 26, 2012 at 11:27 AM, Bill Karwin <[address removed]> wrote:
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:

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:

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.

Bill Karwin

Please Note: If you hit "REPLY", your message will be sent to everyone on this mailing list ([address removed])
This message was sent by Bill Karwin ([address removed]) from The SF MySQL Meetup Group.
To learn more about Bill Karwin, visit his/her member profile

Set my mailing list to email me As they are sent | In one daily email | Don't send me mailing list messages

Meetup, PO Box 4668 #37895 New York, New York[masked] | [address removed]

Farid Aliev.
cell: (415)[masked]

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