Hi,

I like the idea of having these data types being regular data types (like Integer, Decimal, Byte string or whatever), and having certain system-enforced properties (ie auto-increment and/or auto-identity).

Auto-increment would mean that the system assigns a number that is guaranteed to be assigned increasing numbers, with or without gaps (maybe controlled by a NOGAPS property?). Auto-increment would probably also imply that the column is read-only (no UPDATE allowed).

Auto-identity guarantees uniqueness, but not necessarily increasing order. This would be more useful for distributed engines where each engine instance can assigns values from a dedicated range.

Thus, the integer type with auto-identity or auto-increment would have the same type compatibility properties as any other integer. You may also assign the desired precision for your application (e.g decimal(15,0)).

Regards,
Roy

Arjen Lentz wrote:
Hi Jay

On 05/02/2009, at 12:31 PM, Jay Pipes wrote:
On a practical note, the naming of both "auto-increment" and "sequence" is unfortunate, because it causes implicit expectations on the behaviour. UNIQUE_ID or GENERATOR (thank Jim!) would be clearer, it's just intended to provide a unique ID, and nothing else. And while in principle I can see how having it user-definable in terms of logic can be useful, I don't think it's essential.

In SQL Server, it's called IDENTITY, which I think is a fine name. So is generator and UNIQUE_ID. I agree with all that auto-increments *implied* always-incrementing behaviour is not good.


IDENTITY sounds very good. Of course we'd need to look at how it behaves for MSSQL, because if Drizzle's implementation is particularly different, it could confuse with having the same name. Might learn something too.


Cheers,
Arjen.
--Arjen Lentz, Director @ Open Query (http://openquery.com.au)
MySQL Training from $475/day, DBA/Support from $249/month

My blog is at http://arjen-lentz.livejournal.com
OurDelta: free enhanced builds for MySQL @ http://ourdelta.org







_______________________________________________
Mailing list: https://launchpad.net/~drizzle-discuss
Post to     : [email protected]
Unsubscribe : https://launchpad.net/~drizzle-discuss
More help   : https://help.launchpad.net/ListHelp

_______________________________________________
Mailing list: https://launchpad.net/~drizzle-discuss
Post to     : [email protected]
Unsubscribe : https://launchpad.net/~drizzle-discuss
More help   : https://help.launchpad.net/ListHelp

Reply via email to