Re: Patch Review please : 321770 - Import Roll History



Op do, 17-08-2006 te 15:29 +0100, schreef Aigars Mahinovs:
> On 8/17/06, Bengt Thuree <bengt thuree com> wrote:
> > Keeping all Import times --> 1 tables (time), and one extra column (time id)
> > in photo
> 
> Why would you need an extra table? Can't you simply make the extra
> column in the photo table be a UNIX timestamp of the import roll?

That's the same thing, except that your database schema isn't fully
normalized.

It might not seem obvious in this case, but I think Bengt's schema is to
be prefered. Imagine two imports with the same timestamp (possible by
mass importing with a shell script) -- with only a timestamp field for
each photo you cannot separate the rolls.

Also, the import timestamp is an attribute of the import roll, not of
the photo. (One import can take several seconds, so the actual import
time of the individual photo is not what we are after here.) This shows
that an import role is an entity in itself, and your database schema
should reflect that.

As a bonus, this makes it possible to store other attributes of the
import role in the future.

By the way, I do not understand what the problem of adding an extra
table would be.


-- 
Martijn Vermaat

mvermaat cs vu nl
http://www.cs.vu.nl/~mvermaat/





[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]