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) »
  • Multiple Databases
Pages: [1]

Author Topic: Multiple Databases  (Read 2519 times)

blindape

  • Guest
Multiple Databases
August 05, 2009, 03:19:11 am
Hi,
I have been developing CiviCRM for and organisation that provides foster care.  It is being used to track the recruitment, training and assessment of foster carers.  I had my first presentation of the work so far last monday and everyone was really impressed, and then they asked me could I add a second database to track the people going into foster care.  So I was wondering is there a way to create a second database where the contacts used completely different custom groups to those in the original database, but where certain fields could be matched up?  I my first though was to create a second website for the second database to use, having one site to track the carers and the other to track those going into care. However I don't know if the two would then be able speak to each other.  I would be grateful for any tips or advice on this subject.

Regards,

John Curwood

CiviTeacher.com

  • I live on this forum
  • *****
  • Posts: 1282
  • Karma: 118
    • CiviTeacher
  • CiviCRM version: 3.4 - 4.5
  • CMS version: Drupal 6&7, Wordpress
  • MySQL version: 5.1 - 5.5
  • PHP version: 5.2 - 5.4
Re: Multiple Databases
August 05, 2009, 12:41:37 pm
Hi,

Conceptually I'm having difficulty understanding your intent.

Is there some security restriction or purpose to have the databases segregated?  In other words is it necessary that certain Contacts be completely separated from others for HIPAA or regulatory reasons?

I'm failing to understand why, if you indeed have a completely different set of Groups to use for certain Contacts, that all the Contacts and Groups cannot live in the same database.

Stuart


Try CiviTeacher: the online video tutorial CiviCRM learning library.

lcdweb

  • Forum Godess / God
  • I live on this forum
  • *****
  • Posts: 1620
  • Karma: 116
    • www.lcdservices.biz
  • CiviCRM version: many versions...
  • CMS version: Joomla/Drupal
  • MySQL version: 5.1+
  • PHP version: 5.2+
Re: Multiple Databases
August 05, 2009, 12:49:52 pm
here's a good doc outlining some of the options for multi-site needs:
http://wiki.civicrm.org/confluence/display/CRMDOC/CiviCRM+for+Drupal+-+Configure+Multi-site+Installations

It sounds like you sort of want them separated, but also want to be able to connect them, or to share certain resources (custom field definitions, etc.). So you'd probably want to have a single db and make use of the _domain table to segregate some of the data.

Note that v2.2 does not have those multi-site capabilities, but they are returning in v3.0. There's some preliminary documentation here:
http://wiki.civicrm.org/confluence/display/CRMUPCOMING/Multi+Site+Installation
support CiviCRM through 'make it happen' initiatives!
http://civicrm.org/mih

blindape

  • Guest
Re: Multiple Databases
August 05, 2009, 04:52:59 pm
Basically i guess, what we are currently doing at the moment is tracking info on the carers, what type of house they have, location, home-life, culture, how far they have progressed through the training and assessment process and are they ready to take on foster children.
Now what the organisation would like to add on is a facility to track the foster children that get referred to them.  Their background, behavioral, emotional issues, why they have come into foster care.
I guess that these two groups require different information recorded about them.  for example if a new contact is being added for a foster child, they wouldn't want to be seeing all the fields for the carers that the foster child wouldn't need and vice verca.  but there will need to be some sort of match-up process between the foster children and the carers.
They don't have to be on different sites, I guess it is just for ease of use for the people that will be using the data base on a day to day basis.

Regards,

John

lcdweb

  • Forum Godess / God
  • I live on this forum
  • *****
  • Posts: 1620
  • Karma: 116
    • www.lcdservices.biz
  • CiviCRM version: many versions...
  • CMS version: Joomla/Drupal
  • MySQL version: 5.1+
  • PHP version: 5.2+
Re: Multiple Databases
August 05, 2009, 05:10:34 pm
One way you could structure it is to place all your carers in the db as household contact types, and all the children as individuals. At least on the surface, it seems like that would be a pretty natural segmentation. You can then distinguish the data points you collect for each, and build relationships as carers/households take in a foster child.
support CiviCRM through 'make it happen' initiatives!
http://civicrm.org/mih

Dave Greenberg

  • Administrator
  • I’m (like) Lobo ;)
  • *****
  • Posts: 5760
  • Karma: 226
    • My CiviCRM Blog
Re: Multiple Databases
August 05, 2009, 05:44:47 pm
I think Brian's suggestion of using 2 different contact types is one reasonable approach for now - since that will allow you to establish different sets of custom fields for "carers" vs "foster children".

We will probably be implementing a sub-contact feature for 3.1 which will allow you to do this more "naturally". You would be able to have two sub-contact types under Individual - Carers and Foster Children - and set up distinct custom group fields for each.

A different approach for now would be to use Activities to store the person-type specific info. Something like:
Activity Type 1 = "Foster Carer Info" - and it's custom fields would be career, home-life etc.
Activity Type 2 = "Foster Child Info" - and it's custom fields would be ....

(you could even break up logic chunks of data into multiple activity types)

Viewing / extracting the info if done like this can be a bit more problematic - but you can definitely search on the custom activity fields.
Protect your investment in CiviCRM by  becoming a Member!

blindape

  • Guest
Re: Multiple Databases
August 06, 2009, 01:33:08 pm
Thanks for the Ideas.  I am already using both household and individual in the current database as there needs to be separate data collected about the household environment and about each carer living in that environment.  Would it be possible to use organisation for the foster children?  I thought about using the activities idea, but for ease of use for the people actually operating civiCRM on a daily basis I think I would steer away from that approach.
That sub-contact feature you are considering for 3.1 sounds perfect.  From the sounds of it I guess that it is still some time off development. However if I can use the organisation contact in the meantime that's fantastic.

Regards,

John Curwood

Dave Greenberg

  • Administrator
  • I’m (like) Lobo ;)
  • *****
  • Posts: 5760
  • Karma: 226
    • My CiviCRM Blog
Re: Multiple Databases
August 06, 2009, 03:11:15 pm
You can try out using organization. Main drawbacks are:
* you'll need to figure out a decent way to store first, middle, last name fields and other demographics that are automatically available for individuals (date of birth, gender, etc.)
* if you need to record relationships like sibling, parent etc. - you'll need to modify or create new relationship types that allow "organization" type contacts to be used (the default relationship types for these relationships are limited to individuals).

... might be a few other gotchas as well - so definitely take some time to work with it before settling on that solution.
Protect your investment in CiviCRM by  becoming a Member!

blindape

  • Guest
Re: Multiple Databases
August 06, 2009, 09:26:09 pm
Thanks Dave,

i will have a play around with that Idea before I commit.

so how far away is 3.1?  ;)

Once I have finnished this project and a couple of other jobs, I would be happy to help out in what way I can.  Coding is not in my skill set but I have experience with Graphic Design, Documentation and Software Training.

Regards,

John Curwood

Dave Greenberg

  • Administrator
  • I’m (like) Lobo ;)
  • *****
  • Posts: 5760
  • Karma: 226
    • My CiviCRM Blog
Re: Multiple Databases
August 07, 2009, 03:12:55 pm
No timetable for 3.1 yet. However we expect to start working on contact sub-types in the next month - on a branch - since this is a sponsored project. Stay tuned...

One other approach which really might be best...
* Enter both carers and kids as individuals, but TAG them to make it easy to identify and find only that "group".
* Create custom field group for carers - as a TAB (not inline) set of fields
* Create a second custom field group for kids - also as a tab.

When looking at a give record, staff will see both tabs - but should be able to easily pick the right one to edit or view based on the TAG shown on contact summary screens.
Protect your investment in CiviCRM by  becoming a Member!

blindape

  • Guest
Re: Multiple Databases
August 09, 2009, 01:39:54 am
Thanks Dave,  I think that your last idea is probably the best approach for now.  I already had the Carers details on a separate TAB so there won't need to be any redesign of the database from that perspective.

Cheers,

JohnCurwood

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Pre-installation Questions (Moderator: Dave Greenberg) »
  • Multiple Databases

This forum was archived on 2017-11-26.