Ask Your Question
0

Base: How to create 'universal unique' ID for record transfer

asked 2020-07-19 13:10:14 +0200

StephenT gravatar image

When transferring records between BD users, what do you use to prevent confusion between records with the same ID?

edit retag flag offensive close merge delete

Comments

Just for my curiosity: What is a "BD user"?

Opaque gravatar imageOpaque ( 2020-07-19 13:38:34 +0200 )edit

There must either be an authority managing such identifiers (which we only have for special purposes), or an identifier (add-to most likely) must be generated randomly targeting into a sufficiently large space with a reliable algorithm to get uique values with sufficiently high probability without additional measures.
A standard seems to be to use 128-bit values, which can distinguish more tha 10^38 values.
(About 2 000 000 000 000 000 000 000 000 000 000 per currently living human).
Where restricions are neecessary, they must be negotiated.
Just one finding on the subject e.g.: https://medium.com/teads-engineering/...

Lupp gravatar imageLupp ( 2020-07-19 14:39:18 +0200 )edit

2 Answers

Sort by » oldest newest most voted
0

answered 2020-07-23 03:51:18 +0200

Ratslinger gravatar image

Hello,

This is not available in Base but many newer databases (HSQLDB v1.8 embedded is not one) provide a function:

HSQLDB (v2.x & up)

image description

Firebird -

image description

MySQL -

image description

and PostgreSQL documentation:

PostgreSQL provides storage and comparison functions for UUIDs, but the core database does not include any function for generating UUIDs, because no single algorithm is well suited for every application. The uuid-ossp module provides functions that implement several standard algorithms. The pgcrypto module also provides a generation function for random UUIDs. Alternatively, UUIDs could be generated by client applications or other libraries invoked through a server-side function.

This is limit of checking done. It is likely other DB's as similar.

edit flag offensive delete link more
0

answered 2020-07-19 15:53:27 +0200

StephenT gravatar image

I've skimmed the article; interesting. However, specifically how are people getting a UUID or GUID into an LO Base field?

I'm coming from a Filemaker background where you'd auto-enter UUID into 1 field of each record of each table. It needs to have a similar mechanism to be practicable.

edit flag offensive delete link more
Login/Signup to Answer

Question Tools

1 follower

Stats

Asked: 2020-07-19 13:10:14 +0200

Seen: 63 times

Last updated: Jul 23