Do UUID keys encourage sloppy DB design?

Database primary key fields have two varieties: numeric (int / longint) or Unique Identifier (UUID). Each type has specific advantages. Numeric keys are better for performance- size and speed. UUID keys are better for use in distributed systems, and are guaranteed(*) to be unique. Database designers tend to settle on one type in their system, and use it across all tables.

Like most database-ish people, I’ve worked with both types of key in different systems. Since my current job involves extreme levels of data traceability, I like the way UUIDs assure me that when I look up a product_id value, anything that is not a product_id is inherently excluded. In a system with numeric keys, the numeric value can represent key values of any table in the database.

Kamagra Ajanta Pharma is also available in canadian viagra the market inducing impotence. viagra overnight usa But you put your hands up just after buying the luxury car. Occupational therapy is a very helpful aid order cialis for ADHD. This may seem far removed from traditional article writing but if you like writing controversial op ed pieces then this may be a cialis levitra online subsidiary income stream whilst showcasing your original writing. I was considering this in a different light. When the UUID guarantees data typing, the designer/developer/query-user does not need to ensure the record type with which they are working. In a numeric system, the users must be strictly aware of the record type. I wonder whether relaxing the requirement of data awareness might actually encourage looser database design.

(*) UUIDs have a practically non-existent chance for duplication.

This entry was posted in Uncategorized. Bookmark the permalink.

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.