CiviCRM Community Forums (archive)

*

News:

Have a question about CiviCRM?
Get it answered quickly at the new
CiviCRM Stack Exchange Q+A site

This forum was archived on 25 November 2017. Learn more.
How to get involved.
What to do if you think you've found a bug.



  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Pre-installation Questions (Moderator: Dave Greenberg) »
  • Newbie to CIVICRM but Advanced User Question: Multiple PKEY Identity Columns
Pages: [1]

Author Topic: Newbie to CIVICRM but Advanced User Question: Multiple PKEY Identity Columns  (Read 1041 times)

shinzan

  • I post occasionally
  • **
  • Posts: 49
  • Karma: 0
  • CiviCRM version: 4.2
  • CMS version: Joomla 2.5.8
  • MySQL version: 5
  • PHP version: 5
Newbie to CIVICRM but Advanced User Question: Multiple PKEY Identity Columns
December 27, 2012, 02:49:42 pm
High guys, I've had my eye on CiviCRM for a couple of years, and I've scrapped one of my home grown php systems to migrate to it.  Very excited but wanted to get a feel for best practice on this problem.

Our Non Profit has clubs (organizations) and members.  We have a clubID and a MemberID both numbers are very important and how our other software interacts with membership data.  The clubIDs in the past were 1000-2000ish via an identity in that table.

Our membership Data was 1000-12000ish by an identity in that table as well.  My question is can I replicate that in CIVICRM to be automated?  I know CiviCRM has its own Id number that is an identity and I can alter the table to make that seed start at 12012 (our last membership number in my old system) and then I can use that for the ID,  My only problem with that is our memberhsip ID numbers could get huge since organizations, houselholds and everything uses that identity.  The other problem is clubs would be thrown into that, so our current clubid 1000 would be come clubid 12013 and there would be quite a bit of relational integrity lost or further reconciliation in our other system that would have to be performed.  I want a custom field that is an identity so i can have club id and member id be independant and sequential and possibly overlap is how can i accomplish that?

Thanks!

David

Hershel

  • Forum Godess / God
  • I’m (like) Lobo ;)
  • *****
  • Posts: 4640
  • Karma: 176
    • CiviHosting
  • CiviCRM version: Latest
  • CMS version: Mostly WordPress and Drupal
Re: Newbie to CIVICRM but Advanced User Question: Multiple PKEY Identity Columns
December 30, 2012, 04:45:03 am
Quote from: shinzan on December 27, 2012, 02:49:42 pm
I want a custom field that is an identity so i can have club id and member id be independant and sequential and possibly overlap is how can i accomplish that?

If clubs and members are both Contacts, being Organizational and Individual respectively, then I don't see any particular reason for your requirement. Your concern is that the number will get large, but 12000 is not a large number when you consider that there are CiviCRM databases with millions of Contacts.

Your relational integrity I would think is only an issue when you first import your data--after that, CiviCRM handles all that. I don't follow what the issue is here.
CiviHosting and CiviOnline -- The CiviCRM hosting experts, since 2007

See here for the official: What to do if you think you've found a bug.

shinzan

  • I post occasionally
  • **
  • Posts: 49
  • Karma: 0
  • CiviCRM version: 4.2
  • CMS version: Joomla 2.5.8
  • MySQL version: 5
  • PHP version: 5
Re: Newbie to CIVICRM but Advanced User Question: Multiple PKEY Identity Columns
December 31, 2012, 05:47:01 am
Thanks I will just utilize the civicrm contact id for simplicity in development since this is my first project, i see how custom hooks would allow me to acccomplish this though.

Thanks,

David

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Pre-installation Questions (Moderator: Dave Greenberg) »
  • Newbie to CIVICRM but Advanced User Question: Multiple PKEY Identity Columns

This forum was archived on 2017-11-26.