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 »
  • Using CiviCRM »
  • Using Core CiviCRM Functions (Moderator: Yashodha Chaku) »
  • Data design: Departments in a University
Pages: [1]

Author Topic: Data design: Departments in a University  (Read 7009 times)

jcrothers_ubc

  • I’m new here
  • *
  • Posts: 8
  • Karma: 0
  • CiviCRM version: 4.1.1
  • CMS version: Drupal
  • MySQL version: ?
  • PHP version: ?
Data design: Departments in a University
August 14, 2013, 03:38:57 pm
I couldn't figure where to put a data design question. Hope this is the right place!

I have created a contacts database for my department at the University of British Columbia. Originally I imported the Employer for UBC employees as "UBC". I'm seeing now that that won't work since it's way too broad. Yes, these people would say their employer was UBC but what I care about is that the specific area they work in.

Specifically I want to add relationships like Jane Gee is the Undergraduate Advisor of Geophysics.

Their employer info can be broken down to four fields.

Employer: UBC
Faculty: eg Arts (null for 50% of UBC employee records)
Section/Department: eg Sociology (null for 66% of UBC employee records)
Unit: eg Institute of Social Justics (null for 95% of UBC employee records)

I was planning to create an Individual custom field set "Organisation details" with Faculty, Section/Department and Unit as custom fields. People not employed by UBC (about half of all records) can still have data for those fields.


My current thinking about how to accurately record their specific employer is to update the Employer record for UBC employees to be a concatenation of all or some of Employer & Faculty & Section/Department & Unit. For example some people will just have Employer & Section/Department. Others will have Employer & Faculty.

I don't like this solution. One because it duplicates information. Two because the decision as to which fields to concatenate is somewhat arbitrary. Three because I don't have complete information for all those fields for all UBC employees.

Has anyone dealt with this issue before or has some insight on how I should design my data?

I feel like I'm missing something. There must be a better way!

Thanks for any suggestions.
 

xavier

  • Forum Godess / God
  • I’m (like) Lobo ;)
  • *****
  • Posts: 4453
  • Karma: 161
    • Tech To The People
  • CiviCRM version: yes probably
  • CMS version: drupal
Re: Data design: Departments in a University
August 14, 2013, 10:55:19 pm
Hi,

This is a tricky one, and you are likely to get different solutions offered, all equally valid ;)

I'd start by creating new contact types (staff, faculty, department, unit).

Having a custom set and the various "employers" for the staff is probably the more readable solution (using contact references). You might want to write a custom extension to filter the autocomplete to return only the right type if it doesn't limit out of the box (not sure it does)

If you need to have easily the list of staff in a unit/dpt/faculty, you might want to use multiple employer/employee relationships, that would allow you to keep track of the internal promotion (Jane left the institute A in 2012 to go to the Institute B).

For the employer field, it depends what you want to do with it. Is this for mailing, letter, event badges...?

If it's "only" for display, I'd put the most specific "employer" if not empty (eg. unit if set, otherwise section, otherwise faculty)

Talking about display, it's easy to add a custom extension to alter the presentation, for instance to display the various relationships in the summary (that reminds me I need to share this extension) when you have a good data model.

If the data is stored properly, you can change the layout, if it displays ok but the info isn't stored properly, you're going to get blocked at one point or another

X+

-Hackathon and data journalism about the European parliament 24-26 jan. Watch out the result

jcrothers_ubc

  • I’m new here
  • *
  • Posts: 8
  • Karma: 0
  • CiviCRM version: 4.1.1
  • CMS version: Drupal
  • MySQL version: ?
  • PHP version: ?
Re: Data design: Departments in a University
August 20, 2013, 03:57:47 pm
Thanks for the prompt reply. I understood about 1/2 of it. Had to look up the rest. :)

To confirm, you are suggesting I create new contact subtypes?
e.g
Individual > Staff
Organisation > Faculty
Organisation > Department
Organisation > Unit

Then create a custom field set called "Employer Details" and have a contact reference field for Faculty, Department and Unit.

Is that right?

I don't know how to write custom extensions so I'll just leave that part of the suggestion for now. (Though I do understand what you're suggesting it does.)

I don't need to track movement, I just need to know where they are right now. But I could potentially use the detailed employer info on event badges and other things I haven't thought of yet. 

Is creating multiple employer relationships an alternative to creating new subtypes as above?

Regarding this point: "I'd put the most specific "employer" if not empty (eg. unit if set, otherwise section, otherwise faculty)"
I need to see it all in context, but I think the relationships that I really care about is at the highest level (UBC) and the most specific level (unit ->section->faculty as you suggest).

I'm not really feeling clear on a way forward but I'm going to play for a bit with your subtype suggestion and see how that goes.

Thanks


xavier

  • Forum Godess / God
  • I’m (like) Lobo ;)
  • *****
  • Posts: 4453
  • Karma: 161
    • Tech To The People
  • CiviCRM version: yes probably
  • CMS version: drupal
Re: Data design: Departments in a University
August 20, 2013, 09:58:38 pm
Quote from: jcrothers_ubc on August 20, 2013, 03:57:47 pm
Is that right?
exactly

Quote from: jcrothers_ubc on August 20, 2013, 03:57:47 pm
Is creating multiple employer relationships an alternative to creating new subtypes as above?

Creating the subtypes will be useful no matter how you store the relationship I think.

It was an alternative to the custom field set.

The benefit of using relationships instead of contact reference fields is that
1) you keep an history of past relationships
2) it handles better reverse relationships (ie you can see all the staff in a given unit/dpt/faculty

But the interface is not as nice (eg you need to create each relationship separately unless you develop something custom)

I'd suggest to try both, you'll get a better feel

Quote from: jcrothers_ubc on August 20, 2013, 03:57:47 pm
I'm not really feeling clear on a way forward but I'm going to play for a bit with your subtype suggestion and see how that goes.

It's best to see what it feels like indeed. Won't be hard to clean up after you've played.
-Hackathon and data journalism about the European parliament 24-26 jan. Watch out the result

jcrothers_ubc

  • I’m new here
  • *
  • Posts: 8
  • Karma: 0
  • CiviCRM version: 4.1.1
  • CMS version: Drupal
  • MySQL version: ?
  • PHP version: ?
Re: Data design: Departments in a University
August 21, 2013, 03:04:55 pm
Thanks for your assistance.

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Using CiviCRM »
  • Using Core CiviCRM Functions (Moderator: Yashodha Chaku) »
  • Data design: Departments in a University

This forum was archived on 2017-11-26.