NYCPHP Meetup

NYPHP.org

[nycphp-talk] talk Digest, Vol 41, Issue 5

Mitch Pirtle mitch.pirtle at gmail.com
Tue Mar 9 11:50:03 EST 2010


On Tue, Mar 9, 2010 at 10:32 AM, Edward Potter <edwardpotter at gmail.com> wrote:
> So full normalization is no longer the non plus ultra of database design?
> __________________________________
> Once the cost of everything went zero, that was pretty much the end of
> 'normalization'
>  Just throw everything now into a blob of ooze.  Get to stuff u need, forget
> everything else.  Once u leaped into OO, organic models come into play.
> Right, like everything we were taught is pretty much irrelevant now: just
> thow it into into the ooze.  WTF? Who cares? Why waste the energy? Just toss
> it into the cloud.
> Yipes! ;-)
> I guess being up on Core Data is a required skill. That framework is insanly
> great.

Yeah, those bozos at Facebook, LinkedIn, Yahoo, and Google have no
idea what they are talking about. 3rd normal form was good for our
dads, and it's good for us too!

Seriously though: Take whatever popular PHP CMS you might have laying
around, and consider what it would take to migrate content from one
existing website to another website that also already has its own
content... I'm willing to bet all that data is "unique" to a bunch of
incrementally selected, absolutely meaningless integers.

Both databases are certain to have collisions with all those
auto_increment columns. If the design had instead stuck to uniqueness
(hey, sounds a lot like what a Primary Key is!) then you would only
have collisions with content having the same title, for example. But
instead, you're certain to have an article with an id of 1 on both
systems (despite being completely different content), same goes for id
of 2, 3, 4, and so on...

In the end you have to provide logic to your export/import process
that first pulls all of these meaningless pseudo-PKs and inserts each
content item one at a time, and then providing the necessary linkage
to menus, categories, etc. because they also relied on a bunch of
totally nonrelated, pseudo-PKs.

Go ahead and dismiss my points if you want - this point is a very
valid one, one that I initially dismissed as well.

Looks like you're making the same mistake :^P

-- Mitch



More information about the talk mailing list