[nycphp-talk] Database, table, and column naming schemes
Kristina Anderson
ka at kacomputerconsulting.com
Wed Oct 7 02:56:59 EDT 2009
> >
> >Kristina
> >
> >Kristina
>
> Oh no -- there's two of you! :-)
>
> Cheers,
>
> tedd
> --
> -------
> http://sperling.com http://ancientstones.com http://earthstones.com
>
>
Hi Tedd,
Nope, there's only one of me fortunately!
BTW I apologize as I was not trying to be presumptuous in my earlier
posts. Sometimes I cogitate best by explaining stuff out loud ...
I'm just thinking now about the examples Dan gave and how that could
have prevented stuff like
SELECT video.id, video.title as vidtitle, video.fileName AS filename,
video.filePath AS filepath,video.description, videocategories.name,
section.name, videocategories.id AS categoryID
FROM video, videocategories, section, videosbysection
WHERE video.category_id = videocategories.id
AND video.id = videosbysection.video_id
AND section.id = videosbysection.section_id
AND section.name = '".$sectionname."' AND video.active=1
ORDER BY videocategories.order, videocategories.id, video.order,
video.title
which is something I had to do on a recent project because of the poor
design of the database [or perhaps lack of design, as they took a
database for a CMS that handled "categories" and "sections" and just
dumped things into it wholesale, and my instructions were not to modify
the structure...] -- at least I'm pretty sure something here could have
been improved upon.
Kristina
More information about the talk
mailing list