How to generate unique IDs

As you can see in the tables of Figure 1.1, many IDs are defined in the database schema. Each Job, File, Type and Quality can thus be identified by a single and unique number. The problem is to ensure the uniqueness of this number.

Since every database has its own way of solving this problem (if any), it was decided to do it by hand via the use of an additional table called ''NextBookkeepingIDs''. This table has only two columns: ''TableName'' and ''ID''. It contains only four lines (with TableNames ''Job'', ''File'', ''Type'' and ''Quality''), which keep track of the next ID that should be used when creating a Job, a File, a Type or a Quality. The IBookkeepingEditor interface implementations have to take care that this table is maintained up to date. Note that the table contains a fifth line called ``IndexName''. This index is used for the bookkeeping updates, see section [*].



Sebastien Ponce 2004-03-12