Binary data types as keys would make using database tools for adhoc queries practically impossible. That alone is enough to throw out the idea for me.
In my world primary keys should always be meaningless, so an INT should always be just fine. Your binary fields don't sound meaningless to me, so I'd never use them as keys. I'm keen to hear your "requirements" though. Kerry On Tue, Aug 31, 2010 at 11:25 AM, Jorge Cercas <[email protected]> wrote: > Hi Andreas, > > Lets assume, for argument sake, that the data types you mentioned just > wouldn't meet the specified requirements. > > On 30 August 2010 08:51, Andreas Henningsson < > [email protected]> wrote: > >> I would stick to INT, SMALLINT, BIGINT for primary keys. Depending on the >> numbers >> or rows in the table I need to store. >> >> /Andreas >> >> On Mon, Aug 30, 2010 at 1:39 AM, [email protected] < >> [email protected]> wrote: >> >>> Hi, >>> >>> I would like some insight/opinions on using binary types for primary >>> keys - one assumption could be that these keys would be the binary >>> representation of a UUID. A second assumption could be that UUID data >>> types are not supported by a database. >>> >>> Thanks. >>> >>> -- >>> You received this message because you are subscribed to the Google Groups >>> "H2 Database" group. >>> To post to this group, send email to [email protected]. >>> To unsubscribe from this group, send email to >>> [email protected]<h2-database%[email protected]> >>> . >>> For more options, visit this group at >>> http://groups.google.com/group/h2-database?hl=en. >>> >>> >> >> >> -- >> Andreas Henningsson >> >> "Vanligt sunt förnuft är inte särkilt vanligt." -- Voltaire >> >> -- >> You received this message because you are subscribed to the Google Groups >> "H2 Database" group. >> To post to this group, send email to [email protected]. >> To unsubscribe from this group, send email to >> [email protected]<h2-database%[email protected]> >> . >> For more options, visit this group at >> http://groups.google.com/group/h2-database?hl=en. >> > > -- > You received this message because you are subscribed to the Google Groups > "H2 Database" group. > To post to this group, send email to [email protected]. > To unsubscribe from this group, send email to > [email protected]<h2-database%[email protected]> > . > For more options, visit this group at > http://groups.google.com/group/h2-database?hl=en. > -- You received this message because you are subscribed to the Google Groups "H2 Database" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/h2-database?hl=en.
