Hi Chip,
Another way to look at this is in terms of separating the logical structure
from the data. Using UUIDs compels you to think about the logical structure
separately from the contents. That's a good thing. I agree it can be useful
to have a unique serial number on some tables. But that doesn't mean it's a
good idea to use it as a key. Social Security numbers are the perfect
example of this.

Another instance is being able to identify records any place in the
database by a single value. For instance, I have a table for recording
notes users attach to records. The idea it to be able to attach a note to
anything. If I'm using longints it takes two fields to identify the record,
table # & id #. With a UUID I only need one.

Another instance in my history was the necessity to merge data from two
tables into one as part of a refactoring. This was tricky because there was
duplication of IDs in the series and lots of linked records as well. If
they'd been UUIDs it would have been a non-issue. Same thing for syncing
data from distributed databases.

Another instance that comes to mind is troubleshooting new datafiles.
Client has a production database that allows users to create multiple
datafiles. (True story.) There's some issue that's only shows up creating
new datafiles. Using long ints all the tables are starting their sequences
at 1. Have a complex linking situation where a linking table with 4 fields
pointing at different related tables all have the same values in all
fields.

I think a lot of 4D issues arise from how easy it is to conflate the data
with structure. UUIDs are way to separate them and I think leads to more
robust structure designs.

On Wed, Oct 24, 2018 at 9:17 AM Chip Scheide via 4D_Tech <
4d_tech@lists.4d.com> wrote:

> it is more of a situation of:
> - Do I **really** want to type a UUID to try to follow/check on
> related records when something goes pear-shaped?
> - Do I want my admin(s) to have to type a UUID to try to chase related
> records?
> - Do I want to have to work with UUIDs, other then knowing that they
> exist and are inplace as requested/required?
>
>
> On Wed, 24 Oct 2018 10:59:48 -0500, Keith Culotta via 4D_Tech wrote:
> > RE: never use them to link between tables
> >
> > Is using them to link between tables (establish 4D Relations,
> > correct?) a hazardous practice?
> >
> > Thanks,
> > Keith - CDI
> >
> >> On Oct 24, 2018, at 10:49 AM, Charles Miller via 4D_Tech
> >> <4d_tech@lists.4d.com> wrote:
> >>
> >> Rudy
> >>
> >> For me this always choose UUID for primary key and never use them to
> link
> >> between tables. The overhead from space is not so great Andy I never
> want
> >> to type in uuid to find related records etc
> >>
> >> Regards
> >>
> >> Chuck
> >>
> >> On Wed, Oct 24, 2018 at 10:52 AM Two Way Communications via 4D_Tech <
> >> 4d_tech@lists.4d.com> wrote:
> >>
> >>> I have an application with a big database file ( + 60 GB), with 128
> >>> tables. (4D v17)
> >>>
> >>> All id fields and foreign keys are of type longint.
> >>>
> >>> Now, for replication and sharing purposes, I would like to change the
> type
> >>> to UID.
> >>>
> >>> The process seems quite cumbersome: to start, I need to remove the
> >>> ‘primary key’ flag from all the ID fields, then I need to add UID
> >>> fields to
> >>> every table,
> >>> change the foreign keys as well, and use apply formula to make sure the
> >>> relations are intact. I am a bit worried that this will have a
> >>> major impact
> >>> on the size of the data file.
> >>>
> >>> Furthermore, I need to automate the whole process so the upgrade works
> >>> flawlessly at the customers site.
> >>>
> >>> Has anyone ever done this?
> >>> Any tips?
> >>>
> >>> Regards,
> >>>
> >>> Rudy Mortier
> >>> Two Way Communications bvba
> >>>
> >>>
> >
> > **********************************************************************
> > 4D Internet Users Group (4D iNUG)
> > Archive:  http://lists.4d.com/archives.html
> > Options: https://lists.4d.com/mailman/options/4d_tech
> > Unsub:  mailto:4d_tech-unsubscr...@lists.4d.com
> > **********************************************************************
> ---------------
> Gas is for washing parts
> Alcohol is for drinkin'
> Nitromethane is for racing
> **********************************************************************
> 4D Internet Users Group (4D iNUG)
> Archive:  http://lists.4d.com/archives.html
> Options: https://lists.4d.com/mailman/options/4d_tech
> Unsub:  mailto:4d_tech-unsubscr...@lists.4d.com
> **********************************************************************



-- 
Kirk Brooks
San Francisco, CA
=======================

*We go vote - they go home*
**********************************************************************
4D Internet Users Group (4D iNUG)
Archive:  http://lists.4d.com/archives.html
Options: https://lists.4d.com/mailman/options/4d_tech
Unsub:  mailto:4d_tech-unsubscr...@lists.4d.com
**********************************************************************

Reply via email to