We make cartoons here.
But let's say we were working on 3 different Cop movies.
Our projects are devided into project, sequence, and shot.
project sequence shot
CopFilm1 alley shooting death of the bad
guy
CopFilm2 car chase
death of the bad guy
CopFilm3 car chase
death of the bad guy
At first I was indexing the shots just buy shot_ID (serial), and storing
the sequence_ID it belongs to.
On the sequence record, I was storing the project_ID it belongs
to.
So if I wanted to select CopFilm3, car chase, death of the bad guy
I had to find the ID of the project CopFilm3, the ID of
the sequence car chase belonging to that project and then shot
death of the bad guy belonging to that sequence.
As most of the operations happen at the shot level, for performance
reasons I think it might be better to store the project and sequence with
the shot, so I don't have to perform any joins.
Also, projects and sequences have alphabetical codes assigned to them,
which is usually the prefered way of accessing the data.
So, it is my impression that I should store those codes in the shot
as foreign keys with on update cascade
should someone decide to rename projects and sequences, and their codes,
which happens.
Is this approach ok or should I stick to serial ID's and make the lookups?
Any comment on problems like this?
Thanks.
-- Dado Feigenblatt Wild Brain, Inc. Technical Director (415) 553-8000 x??? dado@wildbrain.com San Francisco, CA.