Hi  all
Jiri asked me to kick in because we have two products.  One with one generator 
per column, one with one generator per database.
Pro's of generator per table are
You have the feeling of a sequence. There shouldn't be a gap, you can do "math" 
on it.This is how other db's have it since DBase.
Pro's of one generator per database...  
I have an orm that more or less only works fine if you assign the PK on 
creation of the object. Per instance I can now do a single trip to the db and 
do gen_id(pk, 1000) and create myself a nice pool of unique ids that I can 
design without additional roundtrips to the db.
It really removes all sense from PK's and that is how I think it should be.  
There are huge gaps and that is perfectly explainable.  
All records inside the db have a unique key. 
If you ever need to synchronize two db's... you can start the one on 
1.000.000.000, second on 2.000.000.000, ...  whatever
You don't need to manage 5 billion generators.  
Imho opinion I would never go back to generator per table.  I discover every 
month new goodies that make my choice for 1 generator awesome.  But I do 
think... for the common sense and feeling...  one table, one generator makes 
most sense...  even when it sucks.
Hopes this solves your debate.
Alexander



> From: j...@cincura.net
> To: firebird-net-provider@lists.sourceforge.net
> Date: Thu, 1 Oct 2015 19:24:00 +0200
> Subject: Re: [Firebird-net-provider] Migrations
> 
> On Thu, Oct 1, 2015, at 19:21, Jiří Činčura wrote:
> > But then we're back where we started. Question is whether the global
> > definition for whole migration generator or per column is more
> > understandable and discoverable for developers.
> 
> And I'm not sure we two can find the answer. Wish others jumped in.
> 
> -- 
> Mgr. Jiří Činčura
> Independent IT Specialist
> 
> ------------------------------------------------------------------------------
> _______________________________________________
> Firebird-net-provider mailing list
> Firebird-net-provider@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/firebird-net-provider
                                          
------------------------------------------------------------------------------
_______________________________________________
Firebird-net-provider mailing list
Firebird-net-provider@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/firebird-net-provider

Reply via email to