Giter Site home page Giter Site logo

Comments (8)

kyzer-davis avatar kyzer-davis commented on May 24, 2024 2

The database tables SHOULD be marked unsafe if they do not contain UUID as primary key or as part of primary key.

I am not sure this is up to the spec to decide.

from uuid6-ietf-draft.

sergeyprokhorenko avatar sergeyprokhorenko commented on May 24, 2024 1

You probably haven't seen chaos in databases with compound business keys. Often, incomplete compound keys are used for relationships between tables, hoping for luck. Such databases are definitely unsafe. UUIDs are designed to displace compound business keys. This is exactly the subject of this specification

from uuid6-ietf-draft.

sergeyprokhorenko avatar sergeyprokhorenko commented on May 24, 2024 1

UUIDs are designed to displace compound business keys

UUIDs are designed to provide IDs that satisfy certain key criteria. To the extent such criteria make them preferable to existing solutions is going to be application dependent, and highly subjective (and also changeable over time.)

We should limit opining on best practices and conventions to those issues that affect how well UUIDs meet the stated goals of the spec (uniqueness, monotonicity, db locality). Attempting to reach beyond that just compromises how seriously this spec will be taken.

You arbitrarily put forward the list of goals and demand that other people be limited by them. It is necessary to rely not on non-existent best practices, but on the analysis of real problems that UUID solves.

from uuid6-ietf-draft.

sergeyprokhorenko avatar sergeyprokhorenko commented on May 24, 2024 1

Also, what does it mean to mark a database table as "unsafe"? Google doesn't have much to say on the subject, other than MSSQL's TRUSTWORTHY database attribute.

Unsafe mark of table means that database integrity and flexibility are not protected by proper keys. It is similar to package unsafe in Golang that violate type safety. On the contrary the MSSQL's TRUSTWORTHY database attribute is about security, not safety.

from uuid6-ietf-draft.

ben221199 avatar ben221199 commented on May 24, 2024

I don't see the need for it. By convention, everbody already uses id as column name and makes it the primary key. For id, somebody can decide to use UUIDs if they want, because it is in the name: UUID.

from uuid6-ietf-draft.

broofa avatar broofa commented on May 24, 2024

UUIDs are designed to displace compound business keys

UUIDs are designed to provide IDs that satisfy certain key criteria. The extent to which such criteria make them preferable over existing solutions is going to be application dependent, and highly subjective (and also changeable over time.)

We should limit opining on best practices and conventions to those issues that affect how well UUIDs meet the stated goals of the spec (uniqueness, monotonicity, db locality). Attempting to reach beyond that just compromises how seriously this spec will be taken.

from uuid6-ietf-draft.

broofa avatar broofa commented on May 24, 2024

Also, what does it mean to mark a database table as "unsafe"? Google doesn't have much to say on the subject, other than MSSQL's TRUSTWORTHY database attribute.

from uuid6-ietf-draft.

sergeyprokhorenko avatar sergeyprokhorenko commented on May 24, 2024

The database tables SHOULD be marked unsafe if they do not contain UUID as primary key or as part of primary key.

I am not sure this is up to the spec to decide.

I changed SHOULD for MAY

from uuid6-ietf-draft.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.