|Re: generator of generators
>you can (a) get all of the records belonging to company Nand (b) select count (*) where companyid='N'
exactly what I thought
>The number does not tell you how many records exist, however.I never thought that
>you can NOT use a generator number as a record enumeratorI never thought that
> Third. If you have one generator for each company, you will havemultiple records in the table having the same ID.
the row is uniquely identified by (company_ID, ID)
> That's three bads.I have still to see the first one :)
>How are these numbers to be used? Knowing that might shed morelight on why you think you need different generators for each
very easy: say that every company stores digital pictures in the
database. They want every picture be uniquely identified. This ID
will be given by their private generator.
However - for privacy sake - no company must be aware of the activity
done by others. If I store a picture today and it is given no 100 and
store another picture tomorrow and it is given no 200, I know that -
or I could think that - others stored roughly 100 pictures.
This is exactly the info that cannot leak "outside".
Every company must know the no of its pictures (the application will
issue a "select count(*)..") and nothing else.
All in all I stay with the idea that I need one generator for every
company: I see no other solution.