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) »
  • Developer Discussion »
  • APIs and Hooks (Moderator: Donald Lobo) »
  • native Drupal ERD vs hand crafted ERD
Pages: [1]

Author Topic: native Drupal ERD vs hand crafted ERD  (Read 4980 times)

piperj01

  • Guest
native Drupal ERD vs hand crafted ERD
May 14, 2009, 12:41:02 pm

Sorry if this is only indirectly CiviCRM related, but I am very curious why CiviCRM uses a database that has tables, columns and relations that have been hand crafted ( ERD at http://wiki.civicrm.org/confluence/display/CRMDOC/CiviCRM+ERD+2.0 )  instead of letting Drupal create its own tables, columns, and relations? 

I ask, because I am contemplating building a web application that has a large amount of structured data (similar complexity to the CiviCRM ERD) and it needs to be queried in many ways and bulk loaded from external data sources.  I am wondering if I should do this as a native Drupal application or if I should build my database by hand my self and then build links between my custom database and Drupal?

Thank you for your thoughts.

Jim




Donald Lobo

  • Administrator
  • I’m (like) Lobo ;)
  • *****
  • Posts: 15963
  • Karma: 470
    • CiviCRM site
  • CiviCRM version: 4.2+
  • CMS version: Drupal 7, Joomla 2.5+
  • MySQL version: 5.5.x
  • PHP version: 5.4.x
Re: native Drupal ERD vs hand crafted ERD
May 14, 2009, 01:16:34 pm

CiviCRM works across multiple CMS's (joomla and standalone) and hence we chose not to use drupal's framework for schema/forms/menu etc

lobo
A new CiviCRM Q&A resource needs YOUR help to get started. Visit our StackExchange proposed site, sign up and vote on 5 questions

dharmatech

  • I post frequently
  • ***
  • Posts: 280
  • Karma: 53
    • dharmatech.org
Re: native Drupal ERD vs hand crafted ERD
May 14, 2009, 01:19:31 pm
Quote from: piperj01 on May 14, 2009, 12:41:02 pm

Sorry if this is only indirectly CiviCRM related, but I am very curious why CiviCRM uses a database that has tables, columns and relations that have been hand crafted ( ERD at http://wiki.civicrm.org/confluence/display/CRMDOC/CiviCRM+ERD+2.0 )  instead of letting Drupal create its own tables, columns, and relations? 

The tables are generated from a schema written in XML by a program called GenCode which is not in the release tarball, but you can get it from the repository.  Try http://svn.civicrm.org/civicrm/tags/tarballs/ or so.

-- Walt

http://dharmatech.org
oss@dharmatech.org
801.541.8671

Erik Hommel

  • Forum Godess / God
  • I live on this forum
  • *****
  • Posts: 1773
  • Karma: 59
    • EE-atWork
  • CiviCRM version: all sorts
  • CMS version: Drupal
  • MySQL version: Ubuntu's latest LTS version
  • PHP version: Ubuntu's latest LTS version
Re: native Drupal ERD vs hand crafted ERD
May 14, 2009, 11:28:15 pm
I understand the reason for a CiviCRM database, makes sense. Out of curiosity, would you recommend using a separate database if it is not necessary to support many CMS's, or would you then recommend the Drupal module functionality?
Consultant/project manager at EEatWork and CiviCooP (http://www.civicoop.org/)

acrosman

  • Guest
Re: native Drupal ERD vs hand crafted ERD
May 15, 2009, 06:10:46 am
A couple people kicked this question around during a workshop I was in at NTC.  The general conclusion we came to (beyond "it depends"), was that if you're talking about a 1-off application that is likely to have to be supported by someone else some day, then it makes sense to stay as close to Drupal's built-in frameworks as possible.  That allows you to be replaced by another Drupal expert who will have some idea where to start when reviewing your work.  On the other hand if you're looking for something that's going to be a larger stand-alone project with its own support structure (like CiviCRM) then it can make sense to build something more independent.

dharmatech

  • I post frequently
  • ***
  • Posts: 280
  • Karma: 53
    • dharmatech.org
Re: native Drupal ERD vs hand crafted ERD
May 15, 2009, 07:44:33 am
First question is of course, does your new software have a meaningful existence independently of Drupal?  Of CiviCRM? Or is it intimately tied to both?

We've seen various combinations and permutations, which in the past have led to various decisions.  You can get some schema support from the Drupal 6 hook_schema and database abstraction layer or from CiviCRM GenCode.

The Drupal facilities are new in Drupal 6, which is scheduled to be replaced by Drupal 7 late this year.  If you decide to go with the Drupal approach, you might want to keep a close watch on D7 development for any changes in this area.

The CiviCRM facilities have been there since 1.1 and haven't changed much.  On the other hand you need to check them out of the repository since they aren't in the distribution.  There is also no defined way to interface between the distributed DB and your additions.

-- Walt
http://dharmatech.org
oss@dharmatech.org
801.541.8671

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Developer Discussion »
  • APIs and Hooks (Moderator: Donald Lobo) »
  • native Drupal ERD vs hand crafted ERD

This forum was archived on 2017-11-26.