NOTE: use Perl; is on undef hiatus. You can read content, but you can't post it. More info will be forthcoming forthcomingly.
All the Perl that's Practical to Extract and Report
Stories, comments, journals, and other submissions on use Perl; are Copyright 1998-2006, their respective owners.
re-Normalize (Score:1)
task_start, task_finish, task_canceljunction tables. You've just traded trying to enforceUserID NOT NULL IF Status NOT NULLfor enforcing that a task appears at most once in the UNION of the three task_{start,finish,cancel} tables, which will be even more awkward to code in your data dictionary (1=COUNT(*) FROM UNION...)You need just one task_status table that has
NOT NULLFKs to TaskID and UserID, plus a State enumerated type and an autoinsert date timestaBill
# I had a sig when sigs were cool
use Sig;
Re:re-Normalize (Score:2)
Ah, thanks. You're correct that my normalization wasn't correct. I can now see the value of what you propose and that does make the task simpler and more maintainable. As a caveat, though, some of what you suggest implies using a real database, not a toy like MySQL (which is what we're using).
This gives me another good rule of thumb to keep in mind. Naturally, when I see things like field_1, field_2, field_3 and so on, it's obvious that I need another table as what I'm looking at is essentially an arr
Re:re-Normalize (Score:1)
You have to use a real programming language too, not a toy like Perl.
(Oh, I meant Perl version 2. What? There's a newer version? I bet it's a toy just like Perl 2.)
Reply to This
Parent