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) »
  • How good is data access and manipulation?
Pages: [1]

Author Topic: How good is data access and manipulation?  (Read 1618 times)

joanne

  • Administrator
  • Ask me questions
  • *****
  • Posts: 852
  • Karma: 83
  • CiviCRM version: 4.4.16
  • CMS version: Drupal 7
How good is data access and manipulation?
February 15, 2011, 11:34:23 pm
Having got to the end of the post I realise that this is really a question about MySQL, but perhaps someone will be kind enough to provide an answer in spite of that. 

We currently use a non-web-based proprietary CRM, and I have full access to all the data through MSSQL Server Management Studio.  I use that access to manipulate/extract data that it would be hard to get through the CRM interface.  I am concerned that I might not be able to get the same information if we switch to CiviCRM. 

As an example, at the beginning of each month I need to produce the following (simplified) table which tells me how many active trainees or counsellors there are in each of three States:
role State 1 State 2 State 3
trainee 23 145 72
counsellor 89 364 156

I have done this by:
  • creating a view that includes the ID, role (which will be relationships I think in civiCRM) and State (all from one table) for current volunteers meeting certain criteria.  This data is further filtered to ensure only currently financial volunteers are included. The  financial status information comes from a different table
  • creating a second view based on the first that provides a list of the count for each role in each state
  • creating a stored procedure that creates a table from the second view using a pivot function to give the layout I want.
  • scheduling the stored proc to run at 1 am on the first of each month

When I get time to compile the stats I can copy and paste that table as required without worrying about new enrolments, resignations or subs paid since the first of the month.

Am I going to be able to get that same table if we switch to CiviCRM?  We will be having the database hosted by 'a company'  and I know we will need a VPS.  Obviously I will need to learn new syntax etc.

Assuming everything is set up correctly, in  MYSQL :
  • can I create a view using data from more than one table
  • (if so, can I update a view that contains data from more than one table)
  • is there a Pivot function or equivalent to give the required layout
  • will I be able to schedule jobs to run when I want

As I said at the beginning, this post is really about MySQL not civiCRM, but if I can't get the info I need then CiviCRM will not be for us.





xavier

  • Forum Godess / God
  • I’m (like) Lobo ;)
  • *****
  • Posts: 4453
  • Karma: 161
    • Tech To The People
  • CiviCRM version: yes probably
  • CMS version: drupal
Re: How good is data access and manipulation?
February 16, 2011, 12:00:18 am
Hi,

As you say, that's mysql and if you want to dig directly into the database, you can.

As for your reporting example, civireport offers a simple framework where you can embed your sql queries and for instance mail the report on a monthly basis, let you add parameters like the date of the report so you can some from the previous months again, generate a pdf directly...

That might be something you'd benefit from. Otherwise, the data is directly accessible from sql as you can on your existing one.

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

joanne

  • Administrator
  • Ask me questions
  • *****
  • Posts: 852
  • Karma: 83
  • CiviCRM version: 4.4.16
  • CMS version: Drupal 7
Re: How good is data access and manipulation?
February 16, 2011, 10:16:09 pm
Thanks for your reply Xavier.  I can see I need into delve into civireport.  Am I correct in thinking that I need access to the server civicrm is installed on to do that?

xavier

  • Forum Godess / God
  • I’m (like) Lobo ;)
  • *****
  • Posts: 4453
  • Karma: 161
    • Tech To The People
  • CiviCRM version: yes probably
  • CMS version: drupal
Re: How good is data access and manipulation?
February 16, 2011, 11:49:01 pm
Yes, correct.

You might me able to use a local civicrm version connecting to a remote database server, but that's not the normal way
-Hackathon and data journalism about the European parliament 24-26 jan. Watch out the result

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Pre-installation Questions (Moderator: Dave Greenberg) »
  • How good is data access and manipulation?

This forum was archived on 2017-11-26.