1 Reply Latest reply on Mar 31, 2010 1:43 PM by philmodjunk

    Record IDs in a multi-table database file

    AustexDBGuy

      Title

      Record IDs in a multi-table database file

      Post

      I need an absolutely unique identifier for every record in every table in a single-file/multiple table solution.  Will Get ( RecordID ) guarantee a unique identifier for every record across all tables, or is there a risk that two records in different tables might have the same Get ( RecordID ) result?

       

      Thanks in advance for any insights.

        • 1. Re: Record IDs in a multi-table database file
          philmodjunk

          RecordID should not be used as a primary key.

           

          RecordID is a serial number starting with one that is generated when the record is created. Thus records created in a different table may very likely have a record ID that matches records in the first table.

           

          Furthermore, if you import the records, say from a backup into a clone, the imported records all get new record ID's which may be different from their original values.

           

          I recommend auto-entered serial numbers for this. If you need it to be unique from records created in a different table, specify a different prefix or suffix to records created in each table.

           

          You could set the next serial value to 1A, on one table and 1B in the other for example.