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

From: James R.
Sent on: Sunday, February 26, 2012 12:59 PM
Another thing I might add is:

1.  Consider the sort order {1,2,10,"20",'[masked]',"2 Cups Coffee Company","2-Pac"}, and possibly Lucene/etc.

2.  If reading these books to start, converting business rules and desires to 'computerization' has interesting implications.  Often that's what they mean by more art than science.  Some might label this process 'downsizing' or 'upsizing'.

3.  Now that PostgreSQL 9.1 supports Covering indexes, I wonder if dba's should be exploring that more?
     http://www.wikivs.com/wiki/MySQL_vs_PostgreSQL#Advanced_Indexing



Subject: Re: [sfmysql] Database Design help needed by a beginner
From: [address removed]
To: [address removed]
Date: Sun, 26 Feb[masked]:13:37 -0500

http://stackoverflow.com/questions/377375/a-beginners-guide-to-sql-database-design

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: 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




--
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]




--
Please Note: If you hit "REPLY", your message will be sent to everyone on this mailing list ([address removed])
This message was sent by farid aliev ([address removed]) from The SF MySQL Meetup Group.
To learn more about farid aliev, 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]

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