Jump to content
View in the app

A better way to browse. Learn more.

FMForums.com

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Importing and changing duplicate primary keys

Featured Replies

  • Newbies

I am developing a database with about five tables, each of which has a unique serialized primary key by which the various relationships function. Everything works great. My problem is that a group of users will be entering data into a remote copy of the database. After several months, this new data will need to be imported into the primary database. But, of course, since both copies will be creating serialized primary keys, there will be duplicates in the remote copy that need to be systematically changed as part of the import process. Surely this is a common problem. Can anyone point me in the right direction? Perhaps an example script somewhere?

We've yet to deploy, so if there is anything I need to add that will make the process easier, I'd love to know about it now!

Thanks

Brad

Hi Brad,

I think I'd simply assign each set of databases a different prefix to distinguish between them, like having the local version start with "A" and the remote version start with "B". If the records are ever merged, they will maintain their uniqueness and no changes will be needed at import.

  • Author
  • Newbies

Elegant. Just thinking about the process and problems involved in renumbering everything on import was making my head swim. Why didn't I think of that?

Thanks!

Brad

Create an account or sign in to comment

Important Information

By using this site, you agree to our Terms of Use.

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.