<!doctype html public "-//w3c//dtd html 4.0 transitional//en">
<html>
We make cartoons here.
<br>But let's say we were working on 3 different Cop movies.
<br>Our projects are devided into project, sequence, and shot.
<p><tt>project sequence
shot</tt><tt></tt>
<p><tt>CopFilm1 alley shooting death of the bad
guy</tt>
<br><tt>CopFilm2 car chase
death of the bad guy</tt>
<br><tt>CopFilm3 car chase
death of the bad guy</tt><tt></tt>
<p>At first I was indexing the shots just buy shot_ID (serial), and storing
the sequence_ID it belongs to.
<br>On the sequence record, I was storing the project_ID it belongs
to.
<p>So if I wanted to select <tt>CopFilm3, car chase, death of the bad guy</tt>
<br>I had to find the ID of the project <tt>CopFilm3</tt>, the ID of
the sequence <tt>car chase</tt> belonging to that project and then shot
<tt>death of the bad guy </tt>belonging to that sequence.
<br>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.
<br>Also, projects and sequences have alphabetical codes assigned to them,
which is usually the prefered way of accessing the data.
<br>So, it is my impression that I should store those codes in the shot
as foreign keys with <tt>on update cascade</tt>
<br>should someone decide to rename projects and sequences, and their codes,
which happens.
<br>Is this approach ok or should I stick to serial ID's and make the lookups?
<br>Any comment on problems like this?
<p>Thanks.
<pre>--
Dado Feigenblatt Wild Brain, Inc.
Technical Director (415) 553-8000 x???
dado(at)wildbrain(dot)com San Francisco, CA.</pre>
</html>