> Your message cannot be posted because it appears to be either spam or > simply off topic to our filter. To bypass the filter you must include > one of the following words in your message: > > database,sql,query Uuups...:))) What about some new on topic keywords like entity, atrribute, relation, unique, primary, consistency? > > > Hi there, > > Given: an entity with an attribute NAME (type char), which is unique. > Problem: defining the primary key in view of preformance. > > Building primary keys on char/varchar types, isn't a good idea, because > string operations are less efficient (more time and memory consuming) than > operations on integers. Instead of using a primary key on a char/varchar > type, I could name a new attribute ID (type integer), which is unique also > and build the primary key on that field. But then I'll need an > UNIQUE on the > name field for consistency checking. > > Which way is better? Does defining an additional UNIQUE on a char/varchar > types nullifies the preformance gain of using primary keys on integers > instead of chars/varchars? > > -- > Regards, > Carsten Alexander > > Mein PGP-Key: http://www.dorando.de/acamat/PGPKey.txt > > Zum Thema (Neo)Nazis nur soviel: > Braun wie Scheisse! Dumm wie Scheisse! Aber lasst sie nicht oben > schwimmen! > --------------------------------------------------------------------- Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail <[EMAIL PROTECTED]> To unsubscribe, e-mail <[EMAIL PROTECTED]> Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php